Leo77
March 2nd, 2005, 11:40 AM
How can I access the value of each pixel in a texture without using the RenderTexture.h ( http://www.markmark.net/misc/rendertexture.html ) and <GL/glew.h> ( http://glew.sourceforge.net/basic.html ) and without displaying it?
This headers are incompatible to the ones I'm using...
thanks
Elementer
March 2nd, 2005, 02:38 PM
Hi,
what do you mean ? If you use a texture, mean that you have the pixels array of texture, array you use to generate the texture and apply it to a poligon...
Maybe you're using libs that allow you to generate OGL textures and refer to it, only with the texture_id like this: (without other code)
uint texture_floor_id = you_library_load_image("floor.tga");
your_library_use_texture(texture_floor_id);
draw_something....
If yes, if the libs you use have something to access to texture array data, you should use it (these functions), otherwise, you must load image by yourself and generate also by yourself the OGL texture, thus you have the pixel array, and you can do all what you want with them.
Regards ;)
Leo77
March 2nd, 2005, 04:22 PM
I am using the NVIDIA registers combiners to change the texture value that was originally loaded.
This is the thing Im doing: Im loading an Stereo pair and calculating the disparity of each pixel using registers combiners (this disparity is the texture I have). This Disparity is used to calculate a 3D image warping to the right image loaded before and the final result is the right image from the Stereo pair warped.
But all Im asking is how can I access the value of the texture without displaying it (I wanna dysplay only the image warped...).