PDA

View Full Version : Enabled texturing = disapearing polygons



Kiamo
02-12-2002, 07:22 PM
I made a terrain engine and when I got to texturing, I found the terrain and anything would just disapear. I figured it was a bug in the terrain rendering code, so I worked on it and other parts of the code. Well, later, I still couldn't get it working. I disabled glTexture2D, and then it worked. I have tried drawing a huge white cube using direct mode rendering methods, and yet it still does not show so long as texturing is enabled. Any reasons why? I do not have a texture assigned to the surface, but a color is assigned, and gl_Color_Material is enabled. The surfaces all have the 4f color of (1.0, 1.0, 1.0, 1.0). OpenGL isn't returning any errors as far as I can check. Everything else is pretty much standard and the rest of everything I know works.

So basically, whenever the line glEnable(GL_TEXTURE_2D); is not commented out, no polyes (except text, strangly) show up. If it is commented, I can at least see my huge white cube. Nothing has textures bound to it except the text, but I have tried getting rid of the text support to see if that was messing it up. It didn't help any.

Any ideas?

zed
02-13-2002, 12:46 AM
r u supplying texture coordinates for your terrain?