now i want to test when will openGL use Mag or Min filter. I use the following test:
My texture is a 64*64 pics and the filter setting
is as followed:
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_NEAREST);
and the perspective setting :
(1)
gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 10.0);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0);
glVertex3f(-2.0, -1.0, 0.0);
glTexCoord2f(0.0, 1.0);
glVertex3f(-2.0, 1.0, 0.0);
glTexCoord2f(1.0, 1.0);
glVertex3f(0.0, 1.0, 0.0);
glTexCoord2f(1.0, 0.0);
glVertex3f(0.0, -1.0, 0.0);
glEnd();
the polygon is 2*2
(2)
gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 150.0, 3000.0);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0);
glVertex3f(-80.0, -80.0, -200.0);
glTexCoord2f(0.0, 1.0);
glVertex3f(-80.0, 80.0, -200.0);
glTexCoord2f(1.0, 1.0);
glVertex3f(80.0, 80.0, -200.0);
glTexCoord2f(1.0, 0.0);
glVertex3f(80.0, -80.0, -200.0);
glEnd()
the polygon is 160*160
the two results are all linear, and i don’t know why. Can anyone tell me the reason?
(I think the first one will be nearest…)
Thank you !!