PDA

View Full Version : Texture slowdown



Theo
12-15-2000, 09:57 AM
Hi people,

I'm using textures in a very simple scene.

Its one cuboid, drawn with GL_QUAD, and 3 other quads inside the cuboid, ontop of each other like plates with a distance between them. The plates are to serve as boards to put pieces of a game on.

I'm texturing the cuboid and the plates. The texturing is really slowing the game down. I'm using a function that I'm not sure if its part of OpenGL or glut, although it is surely composed of OpenGL calls.

pngbind(filePath, PNG_NOMIPMAP, PNG_ALPHA, GL_CLAMP, GL_LINEAR, GL_LINEAR)

Now when I enlarge the window beyond the small 640*480 size, the scene slows down massively. I am sure this is due to texture drawing. I tried changing GL_LINEAR to GL_NEAREST, and I did get a speed up, but the textures were drawn all blocky. I played quake 3 and it gets smooth speeds, NO blocky textures, and complex scenes. So obviously I am doing something wrong, because GL_NEAREST shouldn't be necessary.

Any ideas? Could it be the texture format? Like my graphics card deals better with one format than another? Or any other ideas? Please, at least point me to websites dealing with it, as I am quite clueless as about how to speed up texturing without doing things that Quake 3 doesn't resort to doing (like using GL_NEAREST).

RandyU
12-15-2000, 07:44 PM
Try setting glTexEnv to gl_modulate - gl_blend and gl_decal is SLOWER.