Jump to content
  • Advertisement

Archived

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

BradDaBug

OGL Game Programming problems

This topic is 5761 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
draw it as a triangle strip or a quadstrip(slow but will look better in wireframe) and use glPolygonMode(GL_FRONT_AND_BACK, GL_LINES)

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.

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!