Jump to content
  • Advertisement
Sign in to follow this  
John_Idol

How to apply texture to glutSolidCube

This topic is 3614 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 can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube). So, my question is: Is there any way of mapping a texture to a solid cube (and other solids) when using glutSolidCube? Any help would be appreciated!

Share this post


Link to post
Share on other sites
Advertisement
glutsolidcube doesnt supply texture coords thus its not possible (u could rig up a quasi working example with auto texture generation but thats most likely not what u want)

u will need to create a box model yourself with the desired texture coordinates

Share this post


Link to post
Share on other sites
thanks for replying!
I am thinking to re-use the solidCube source-code adding glTexCoord's in order to have my texturizable solidCube.

Got the idea here: http://stackoverflow.com/questions/327043/how-to-apply-texture-to-glutsolidcube

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!