Skip to main content
GameDev.net gamedev.net
🔒 Locked

different texture filters

Started by schattenmaennlein Jan 26, 2008 at 3:11 AM 1 replies 700+ views
Original Post
schattenmaennlein
schattenmaennlein
I want some of my textures filtered linear and some filtered nearest for optimal results. Thats possible, right? Ive got this working in my engine but in a way that does not make sense, so I distrust my solution. Where do I have to place glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); or linear?
AndiDog
AndiDog
Like this:

glGenTextures(1, &textureIndexGL);    glBindTexture(GL_TEXTURE_2D, textureIndexGL);    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);    glTexImage2D(GL_TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT5_EXT, width, height, 0, GL_RGB, UNSIGNED_BYTE, buffer);
schattenmaennlein
schattenmaennlein
ty very much Andidog,

I think my mistake was not putting it behind glBindTexture

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.