PDA

View Full Version : glTexParameteri before glTexImage2D



ARES
10-12-2002, 09:25 AM
Does glTexParameteri change the way glTexImage2D uploads an image?

Does glTexParameteri change the mode for all textures or only for the currently binded texture?

Bob
10-12-2002, 01:38 PM
glTexParameter affects only the currently bound texture.

ARES
10-13-2002, 12:13 AM
And does glTexParameteri change the way glTexImage2D uploads an image?

Because in code written by other people I always see something like this:

glBindTexture( GL_TEXTURE_2D, t );
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, 3, bitmap.getWidth(), bitmap.getHeight(), 0, GL_RGB, GL_UNSIGNED_BYTE, bitmap.getData() );

[This message has been edited by ARES (edited 10-13-2002).]

Bob
10-13-2002, 12:47 AM
No, it does not affect the way the texture is upploaded, only the way it's used.