PDA

View Full Version : Question about NeHe tutorial ( #35 I think)



vgohan
07-29-2002, 08:48 AM
I have a question on the AVI texture OpenGL tutorial on Nehe's site. It's great, but does anyone know why when the avi becomes a texture it's seems more pixelated than when it was just an avi file? Is there any way to preserve the resolution when the AVI becomes a texture?

kehziah
07-29-2002, 10:33 PM
Hi,

if you want better quality, you should move from point sampling to bilinear interpolation :
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_NEAREST);// Set Texture Max Filter
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_NEAREST);// Set Texture Min Filter
becomes
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR);// Set Texture Max Filter
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR);// Set Texture Min Filter

(Tip : read NeHe's comments in the tutorial, it's all explained)