PDA

View Full Version : non-power of two performance?



canuckle
07-21-2005, 07:25 PM
I have a simple program that binds and immediately unbinds an FBO that has a texture attached to its color0 buffer.

When the texture is a POT, I get about 120 fps. When the texture is a NPOT, I get about 40 fps with a lot of stuttering.

Is this right?

I'm using a 6800 ultra (which should support NPOTs in hardware) with 77.72 release drivers.

This is code that's creating the NPOT texture:

glGenTextures(1, &nID);
glBindTexture(GL_TEXTURE_2D, nID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, nWidth, nHeight, 0, GL_RGB,
GL_UNSIGNED_BYTE, NULL);
glFramebufferTexture2DEXT(
GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D, nID, 0);