Mipmapping and OpenGL
Here is a problem which has been bugging me for a long time.
Whenever I enable mipmapping in my engine, it works find for about 2 levels, and then I see a lot of weird texturing going on. Then after that weird texture level, it is fine again. What gives? I have checked all of my mips, and they are fine.
Thanks.
-e
Well... how do you build them? gluBuildMipmap2D? Are your textures square? power of two sized?
i seem to remember having a problem a bit like that... can''t remember how i solved it though...
that''s useful of me
that''s useful of me
I build them using my own custom functions, the textures are not all square, all power of two sized... wait a second. I just had a thought. Is there a limit on the difference between width and height? For example, can you have a texture of size 128x16, or is there some maximum width/height ratio?
-e
-e
Yes, there is a limit to the width and height... All of the textures under OpenGL must be square and an exponent of 2 (8,16,32,...256 etc.). That''s not to say that your artists (or you) can''t create textures that aren''t that size, or even a power of two, because you can make a call to glScalef(...) to resize the textures at run time. Or you could just use a bitmap editor to do the same. Either way, if you need to put it on a rectangle, it will look the same, don''t worry about that.
Mike Weber
shockonline.homestead.com/openglgameprogramming.html
quote:Original post by Frag_Daddy_
Yes, there is a limit to the width and height... All of the textures under OpenGL must be square...
You''d better think twice and read some documentation before posting such crap.
to e:
Some 3D chips may have some limits for texture size.
For example, Voodoo1..3 allows textures with width and height <=256 and with width/height ratio (1/8)...(8/1).
But I guess it cannot explain this problem, because "..after that weird texture level, it is fine again. "
You should try your code with software OpenGL.
If it will work fine (but slow..) - you need new driver.
Otherwise the problen is in your code...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement