Hi everyone.
I have a strange trouble with OpenGL.
The scenery:
-nVidia GTX560 Ti from ASUS.
-Using nVidia drivers version 290.10.
-CPU core i5 3.2Ghz (model 650) on ASUS MB
I’m trying build an address map based on colors.
What I am doing:
+Off-screen rendering
+Load textures and associate pure white color silhouette texture for address mapping (non 100% opaque pixel=white (0xFFFFFFFF) and opacity set to 100%, either pixel=back (0x0) an full transparency)
+Using ARB buffers for pixel read/write
+Clear ALL buffers (stencil, color, depth, etc… even though only color buffer is relevant)
+Render user scene view (i.e normal render, with lights, fog, etc…)
+Render for composing a color address key:
+Select an auxiliary (GL_AUX*) buffer
+Take the first 24bits offset from a structure related with rendered texture
+Use these bits as RGB color components
+Set Alpha component always as 0xFF
+Set as active texture the white silhouette associated with the rendered texture
+Set as active color my composed color
+Render
+and so far until all structure address is stored into OpenGL auxiliary color buffers.
The problem:
Some times the colors are not correct and fails when I rebuild the addresses from GL_AUX’s, giving me a seg. fault.
I already tried:
glDisable(GL_BLEND);
glDisable(GL_FOG);
glDisable(GL_LIGHTING);
glDisable(GL_DITHER);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_RESCALE_NORMAL);
glShadeModel(GL_FLAT);
and use GL_BACK instead GL_AUX*
Any ideas?
Thanks for read.