Jump to content
  • Advertisement
Sign in to follow this  

OpenGL How do I get UVs to texture cube sphere?

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



I am trying to put textures on my cube which I have turned into a sphere, but alas the only thing I have gotten is a headache (I can't math).


Cube sphere code: http://pastebin.com/B6ijfdbf


I am fairly sure that I could apply my textures to the sphere following this tutorial: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/ but I have absolutely no idea how to get those UV coords.


It could be that this: http://iquilezles.org/www/articles/patchedsphere/patchedsphere.htm explains it, but as I said, can't math.


I have searched all around the google and gamedev for a solution a long time and its starting to wear me thin, so I hope that someone can help me with this.


 - Temeez

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!