Rectangular Textures == Bad?

Started by
4 comments, last by Telamon 20 years ago
Is there any way to use power of two rectangular textures in DirectX without wasting video memory and without assigning weird texture coordinates to all your 3d objects (so as to render a rectangular portion of a square texture)? I''m looking for a general solution, as opposed to graphic card specific extensions. I have a feeling it''s not possible? I hope those DirectX people got some good performance gains out of ditching rectangular textures, because it''s kind of a pain... ---------------------------------------- Let be be finale of seem, seems to me. ---------------------------------------- Shedletsky''s Code Library: Open source projects and demos

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

Advertisement
Who says textures have to be rectangle? That''s right, no one! Only limit is that textures MUST be power of two, so you can create textures like:

16x16
32x16
64x16
32x32
1024x32

and so on... And of course you can pack your tile/sprites into one texture, so that you don''t need to change current texture state so often.
Also if your card/driver supports it, you can even use non-power of 2 textures.
There is a CAP that says whether they have to be square or not. Have you checked it? If you want to run on an S3 Savage then you''ll have to deal with it, but if you''re working on anything released in the last 5 years I''d be surprised if it had that limit.

More info:
http://www.drunkenhyena.com/cgi-bin/view_article.pl?article=18

Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena
Oh...

I seem to remember way back when I was learning DX that one of the main differences between OpenGL and DX was that OpenGL allowed rectangular textures and DX didn''t. But it would seem like I am wrong. Whoops.

----------------------------------------
Let be be finale of seem, seems to me.
----------------------------------------

Shedletsky''s Code Library:

Open source projects and demos

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

quote:Original post by Telamon
Oh...

I seem to remember way back when I was learning DX that one of the main differences between OpenGL and DX was that OpenGL allowed rectangular textures and DX didn''t. But it would seem like I am wrong. Whoops.


If it was in the earlier days then it''s possible that it was a driver issue. OpenGL drivers were much more mature then so they would expose more functionality than the D3D drivers of the time.

Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement