Original Post
When I load my textures for my GUI in my game, there are not drawing perfectly like they should. They are being rendered almost as if they are being dithered, or in a lower colour depth. In this pic, I pasted the original texture above, and below you can see it as it's being rendered in game. The quads is the same pixel size as the image in Ortho mode. You may have to look very close to the screen to see it. The glow around the letters isn't as smooth.
Here is the relevant code that I'm using in my texture loader. The GUI elements are loaded with FILTER_SHARP and bMipMaps = false. But They were doing it before when I was giving everything mipmaps and using filtering. [Edited by - Vampyre_Dark on October 19, 2005 5:47:27 PM]
Here is the relevant code that I'm using in my texture loader. The GUI elements are loaded with FILTER_SHARP and bMipMaps = false. But They were doing it before when I was giving everything mipmaps and using filtering.
if (nFilter == FILTER_SMOOTH)
{
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
}
else if (nFilter == FILTER_SHARP)
{
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
}
int nMode = GL_RGBA;
if (m_Format == TEX_FORMAT_RGB) nMode = GL_RGB;
if (bMipMaps)
{
gluBuild2DMipmaps(GL_TEXTURE_2D,nMode,m_Width,m_Height,
nMode,GL_UNSIGNED_BYTE,m_ImgData);
}
else
{
glTexImage2D(GL_TEXTURE_2D,0,nMode,m_Width,m_Height,
0,nMode,GL_UNSIGNED_BYTE,m_ImgData);
}