Jump to content
  • Advertisement


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


OpenGL opengl/ textures

This topic is 6927 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

Hi I have a problem, that i don''t see a way to solve. This is concerning textures.., I''m making an editor for my 3d objects, and i want to render a button, that suppose is size is 100x30 pixels. If all the textures i can use in opengl have to be, a power of two, how can i render my button in a 100x30 rectangle?? thanks Bruno

Share this post

Link to post
Share on other sites
Make the texture object with power-of-two-resolution and set the texture coordinates at the
lower-left: 0,0
lower-right: 1,0
upper-left: 0,1
upper-right: 1,1

OpenGL will zoom the textures to 100x30.

Visit our homepage: www.rarebyte.de.st


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!