Sign in to follow this  

Wireframe drawing

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

Alrighty, here we go again. I'm working on building a very basic model class, currently it just supports colored quads and tris, like I said, very basic. Anyways, I keep 2 vectors, one of quads and another of triangles. Inside of my render code it does a glBegin(GL_QUADS), runs through the quads vector, and repeats for the triangles. The rendering is just dandy, looks good, its the shapes I want and expect. Now I am trying to implement wireframe rendering, so my first thought was to use the points in all the quads and tris with glBegin(GL_LINE_STRIP) and I'm getting odd results. The lines are all there for all the edges, but some of the faces of the quads have lines going through the cross wise, like this:
 -------
|\      |
|  \    |
|    \  |
|_____ \|
And some of them even have lines making a full X, any ideas ?

Share this post


Link to post
Share on other sites
Thanks again guys, I'm in the process of learning OpenGL and have yet to afford a decent book. Luckily between NeHe, GD.net, and google :) I have managed to make it this far. Hopefully I can continue before I have to go back to MTU. Rating++ on both of you.

Share this post


Link to post
Share on other sites
Quote:
Original post by neodingo
Thanks again guys, I'm in the process of learning OpenGL and have yet to afford a decent book. Luckily between NeHe, GD.net, and google :) I have managed to make it this far. Hopefully I can continue before I have to go back to MTU. Rating++ on both of you.
I recommend getting the OpenGL Programming Guide (AKA: the Red Book) as your first book. There's an older version online here, but I recommend buying the newest version when you can.

Also, add OpenGL.org to your list of websites for OpenGL info.

Share this post


Link to post
Share on other sites

This topic is 4529 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this