Jump to content
  • Advertisement


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


Texture Coordinates

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

Hello, I''m fairly new to OGL. I''ve got some code that builds a space station. The station is constructed of many smaller parts, which the data is stored in arrays. The display lists are built from these arrays. My problem is that one part of the station (spheres) is built by a loop in which many polygons (GL_POLYGON) are constructed. I''m trying to add textures to this station...but I don''t really fully understand textures and the texture coordinate system. Typical data for building these spheres are...{1.64837f, 141.01301f, -295.02335f}, {1.65344f, -140.96367f, -294.77301f} etc... The spheres are built by a loop with three glVertex3fv calls with the data from the above array. Could someone please explain how to map the textures to a triangle and how to arrive at the texture coordinates? Thanks in advance

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I don''t exactly know how it works, but why not to try Vertex Arrays? Then you will have to pipoint vertex coordinates, and your texture. After that OpenGL will do all the drawing for you!

glColorPointer (...);

Is everything you need!

Good luck!

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!