Jump to content
  • Advertisement
Sign in to follow this  
riruilo

Texture aliasing problems

This topic is 4149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi friends! Can you help me? My question is where should I write these lines: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); I am using multitexturing. Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
Better yet, use new features of GL

glBindTexture(...);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexImage2D(....);

and your video card will generate the mipmaps.

Share this post


Link to post
Share on other sites
"and your video card will generate the mipmaps."

When? All times I render my scene? or just the first frame?

By the way, I using multitexturing:

glClientActiveTexture( GL_TEXTURE0_ARB );
glActiveTextureARB( GL_TEXTURE0_ARB );


glClientActiveTexture( GL_TEXTURE1_ARB );
glActiveTextureARB( GL_TEXTURE1_ARB );

Should I use it two times?

Thanks a lot!

Share this post


Link to post
Share on other sites
Quote:
Original post by riruilo
"and your video card will generate the mipmaps."

When? All times I render my scene? or just the first frame?

By the way, I using multitexturing:

glClientActiveTexture( GL_TEXTURE0_ARB );
glActiveTextureARB( GL_TEXTURE0_ARB );


glClientActiveTexture( GL_TEXTURE1_ARB );
glActiveTextureARB( GL_TEXTURE1_ARB );

Should I use it two times?

Thanks a lot!
Texture parameters are per-texture-object state. They effect the texture object that's currently bound to the current texture unit.

Texture environments and texture functions (specified with glTexEnv*) are per-texture-unit state. They effect the current texture unit (glActiveTexture).

Share this post


Link to post
Share on other sites
Quote:
Original post by riruilo
"and your video card will generate the mipmaps."

When? All times I render my scene? or just the first frame?
At load time.

Share this post


Link to post
Share on other sites
What is the exact difference between
gluBuild2DMipmaps

and

glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexImage2D(....);


?


Thanks a lot.

Share this post


Link to post
Share on other sites
Quote:
Original post by riruilo
What is the exact difference between
gluBuild2DMipmaps

and

glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexImage2D(....);


?


Thanks a lot.


IIRC gluBuild2DMipmaps() is done on the CPU and the latter is done with your GPU... Either one will get the job done.

Share this post


Link to post
Share on other sites
Quote:
Original post by riruilo
Interesting.

So, for an old card is better gluBuild2dmipmaps, idnt it?


no, just check to see if GL_SGIS_generate_mipmap extension is supported

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!