
Mipmaps Problem
Hi
I am using NeHe''s IPicture Code to load MipMaps into my scene
Everything is just fine until I try to use mipmaps
I have changed texture generation code in fallowing way
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR );
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, (GLsizei) lWidthPixels,(GLsizei) lHeightPixels, GL_RGB, GL_UNSIGNED_BYTE, pBits);
And the effect is: http://www.sknou.pwsz.elblag.pl/~smarcjanski/mipmaps.jpg
Can someone help?
ps: I was trying to debug variables and it looks fine for me - I am using Visual C++ .net
OpenMIND-ed Programmer
lightworker@wp.pl

Slaweklightworker@wp.pl
Oh
I forgot - this picture is just textured cube (or it should be) - without mipmaps it loox fine...
OpenMIND-ed Programmer
lightworker@wp.pl
I forgot - this picture is just textured cube (or it should be) - without mipmaps it loox fine...
OpenMIND-ed Programmer

lightworker@wp.pl
Slaweklightworker@wp.pl
I believe the IPicture code adds an alpha channel, so instead of:
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, (GLsizei) lWidthPixels,(GLsizei) lHeightPixels, GL_RGB, GL_UNSIGNED_BYTE, pBits);
try:
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, (GLsizei) lWidthPixels,(GLsizei) lHeightPixels, GL_RGBA, GL_UNSIGNED_BYTE, pBits);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, (GLsizei) lWidthPixels,(GLsizei) lHeightPixels, GL_RGB, GL_UNSIGNED_BYTE, pBits);
try:
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, (GLsizei) lWidthPixels,(GLsizei) lHeightPixels, GL_RGBA, GL_UNSIGNED_BYTE, pBits);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement