Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Texture Size

This topic is 5216 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, i know a texture size has to be to the power of 2 and has to be atleast 64x64. I am trying to make a menu with a button(quad) that is 200x50. So is there a way to make a texture to fit that ? or how would i make this ... |----------| |----------| |New Game| |----------| |----------| to this: |----------| |New Game| |----------| [edited by - Worthless_Knowledge on February 8, 2004 6:18:35 PM]

Share this post


Link to post
Share on other sites
Advertisement
i would create the texture the size you want it to be, then when you go to save it, resize it to the nearest power of two, then when you render the button you stretch/squish the texture back to its orginal size.

- Thomas

[edited by - cow_in_the_well on February 8, 2004 6:25:18 PM]

Share this post


Link to post
Share on other sites
Im not gonna be able to get code, but I can tell you that you make your texture to the nearest power of 2, and then use the correct texture coordinates on a 200x50 quad.

Share this post


Link to post
Share on other sites
There are many options. You could use one of the non-power-of-two texture extensions (ARB_texture_non_power_of_two, EXT_texture_rectangle or NV_texture_rectanges), you could stretch your image to 256 by 64 and display it on a 200 by 50 quad or you could pad your image to 256 by 64 (or any other valid size) and adjust your texture coordinates to only display the relevant part of the texture.

By the way, It''s not the minimum texture size that is 64 by 64, it''s the minimum maximum (i.e. an implementation must support everything upto and including 64 by 64).

Enigma

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!