Sign in to follow this  
neodingo

Wireframe drawing

Recommended Posts

neodingo    103
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
neodingo    103
Wow...talk about way easier than what I thought...haha thanks, but out of curiosity, how do you get it back to normal shaded/textured mode ?

Share this post


Link to post
Share on other sites
neodingo    103
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
Kalidor    1087
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

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