ATI workaround

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

ATI workaround

Post by zuzuf » Sat Dec 15, 2007 10:32 pm

I added a workaround in the texture code for ATI cards. It seems it doesn't handle well compressed textures if they aren't power of two ... In fact mipmapping doesn't work very well with it, so when a non power of two texture is created its filter is set to GL_LINEAR (no mipmapping).

This is an easy solution, it decreases quality on objects that moves and uses non power of two textures, but it draws menu backgrounds correctly, requires a bit less video memory. It doesn't affect map rendering since the MAP object uses power of two squared textures.

This hack is used only on ATI cards, on Nvidia and other cards it uses mipmapping for all textures that require it when calling GFX::make_texture.

There is no visible drawbacks on unit models, and since sprites are drawn facing the camera, there is no noticeable change with them either except there is no more drawing bug on it.

There is also another solution:
scale textures to be power of two textures, but in order not to lose quality it would require much more memory so I implemented the other one.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Dec 16, 2007 9:31 am

Nice :) Well, I`m too think that chosing this way over than another is more preferable way to solve this problem. Hope we`ll get new test release today :)

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests