Advertisement

two texture questions

Started by December 02, 2003 05:28 PM
2 comments, last by nitzan 21 years, 3 months ago
#1, what sizes are textures allowed to be. Is it any 2^n x 2^n ? or does it always have to be a square ? Meaning can I do 128x256 ? #2, how do I remove textures from video memory ? Lets say I am changing levels and I want to clear my video memory of all the previous level''s textures. Is this handled automatically by the video card or do I have to manually do it ? Thanks, Nitzan
1: Textures don''t have to be square.
2: You delete them with glDeleteTextures. Any descent driver will clean up after you when the rendering context is destroyed, but it can''t do it in the middle of the program. After all, there''s no way for the driver to know when you don''t need it any more.
Advertisement
Thanks for the quick reply!

DO textures have to be 2^n or just multiples of 2 and of each other ? Meaning does 320x64 work ?

Thanks,

Nitzan
2^n unless your GL driver says it supports non-power of 2 textures.

This topic is closed to new replies.

Advertisement