Non-Power of two

Started by
1 comment, last by AverageJoeSSU 15 years, 1 month ago
quick easy question.... i believe i read somewhere that geforce 8ish cards support non power of two stuff... great! but i cant find an example ANYWHERE.... glBindTexture( GL_TEXTURE_2D, depthBuffer); glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT, width, height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glGenTextures(1, &this->Pos0); glBindTexture(GL_TEXTURE_2D, this->Pos0); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, width, height, 0, GL_RGBA, GL_FLOAT, NULL); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); how do i set these as non power of two? thanks!

------------------------------

redwoodpixel.com

Advertisement
You don't have to setup anything. If the GPU supports NPOT, then you can just plug any value into width and height without power-of-two limitation.
lol... oh... that would explain things a lot... thanks haha

------------------------------

redwoodpixel.com

This topic is closed to new replies.

Advertisement