Mipmapping and OpenGL

Started by
6 comments, last by e 23 years, 8 months ago
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
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
Advertisement
Just bringing this to the top...

-e
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
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
[email=ehremo@hotmail.com][/email]
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
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein

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
-----------------------------1. "Diplomacy is the art of saying 'Nice doggie!'... till you can find a rock." 2. "Always remember you're unique, just like everyone else." 3. "If we don't succeed, we run the risk of failure."-Dan Quayle4. If life gives you sour grapes, squash them and make wine!
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...
Ya, I figured out what the problem was. I had a V3 2000 and the ratio was more then 1/8.

Serge K: Sorry for not explaining my problem better .

-e
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein

This topic is closed to new replies.

Advertisement