View Full Version : texture operations

01-06-2012, 09:26 AM
Hello guys,

First time poster and totally newbie, easy on me please.:)

I have an rgb texture. I'd like to read in every single row and rearrange it's texels in y based on a given function. Add them together and get a new texture.

Could you tell me please what functions should I use?


01-06-2012, 02:10 PM
Suggestion: Start with shader programming - GLSL and also read about 2D samplers.

Else if you do not wish to do shader programming, then do what ever operations you wish in a buffer. Then use that buffer data to load as a texture in texture unit with GL_RGB format. Details are covered in chapter related to texture in red book.

01-07-2012, 04:27 AM
More information on your requirements are needed. The given question mentions nothing about showing something on a screen, which means OpenGL is not needed.

I think this is best done outside of OpenGL. Use any programming language you prefer.

Or is it that you want to show the result on screen, with changes every frame?