hello everyone,
I’m having a problem with my 3D engine that is written in Java and JOGL. I am using the NeHe texture mapping program as an example and I’m loading his sample png image in my current program. I can load the image just fine, but then all I can see in my world is blue, white, and a dark green…? My world is very simple right now, just a box that I can fly around in and each side of the box is a diffrent color. I’m attaching the image to a glQuad, and that is the only place currently that loads or draws any textures at all. Anybody else have a simular problem with JOGL…?
thanks in advance,
theSniff
try to call gl.glDisable(GL.GL_TEXTURE_2D) after your textured quad is drawn.
To anyone else who might have this problem on the net. I was enabling gl_texture_2D at the begining of my program and I was not disabling it ever. So when I was drawing my gl_quad’s that were texture mapped they came out fine, but when I was trying to draw a normal quad and color it with glcolor3f it was using texture mapping of my texture (since I never disabled it), but since I didn’t specify coordinates for those quads the color’s I was seeing was an interpolation of the textures textel at (0,0) starting at the top left of my quad and drawing that all of the way accross the quad. So basically it was taking one pixel from my texture and coloring my entire quad with that single pixel.
I’m new to opengl please forgive me,
theSniff