Jump to content
  • Advertisement

Archived

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

OGL Game Programming problems

This topic is 5580 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''ve made this landscape engine based on the landscape engine thingy in Chapter 8 of OpenGL Game Programming. It looks great, until you change GL_TRIANGLE_STRIP to GL_LINE_LOOP and you see that there are lines shooting from the bottom of one row to the top of the next one. Is this bug really there, or is there something wrong with my implementation of the landscape engine? How do I fix it?

Share this post


Link to post
Share on other sites
Advertisement
The ways GL_LINE_LOOP and GL_TRIANGLE_STRIP are drawn are different. Obviously, as you said, GL_LINE_LOOP connects to the top of the top row. What''s wrong with GL_TRIANGLE_STRIP?

Share this post


Link to post
Share on other sites
if you dont care about speed theres a way to set the polygon drawing mode to wireframe. slow but at least it will be correct, while even a line_strip wont show you the exact mesh.

triangle_strip with (0,2, 1,3)
1---3
|.\.|
0---2

line_strip with (0,2, 1,3)
1---3
..\..
0---2

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!