Skip to main content
gamedev.net
🔒 Locked

Texture Problem

Started by Aurora 0 replies 200+ views
Original Post
Aurora
Aurora
I am having a strange problem with my textures. My texture loading function loads a bitmap image, swaps it from BGR to RGB and then add an alpha component to each pixel. If the pixel is pink (255, 255, 0) then it sets the alpha to 0, otherwise 255, so that I can do alpha testing. However, when I create mipmaps, if I use RGBA mode then the textures look all crappy with banding across them. I create the mipmaps as follows: gluBuild2DMipmaps(GL_TEXTURE_2D, 4, info->bmiHeader.biWidth, info->bmiHeader.biHeight, GL_RGBA, GL_UNSIGNED_BYTE, rgba); However, if I use the same data but use RGB mode: gluBuild2DMipmaps(GL_TEXTURE_2D, 3, info->bmiHeader.biWidth, info->bmiHeader.biHeight, GL_RGB, GL_UNSIGNED_BYTE, rgba); then the texures look fine. Any ideas? Is this a problem with gluBuild2DMipmaps or am I missing something?

Topic Locked

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

Sign in to reply to this topic.