Archived

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

JWAce

Really primitive primitives

Recommended Posts

Hey all, I''ve just started learning to code OGL (it''s a hell of a lot easier than DX), so this may sound like a stupid question, but I''m wondering how you can use OGL to draw the really primitive primitives aka lines and points. I''m trying to get some simple animation routines to work, and for what I''m doing lines and points are sufficient. JWAce

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Why not start at the 1st NeHe tutorial and go through them each step by step. I think lesson 2 deals with simple unshaded polys...

To get a point or a line, rather than a filled poly you would change your render method from..

glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)

to

glPolygonMode(GL_FRONT_AND_BACK, GL_POINT) or
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE).


Share this post


Link to post
Share on other sites
I agree with the guy who says to go buy a book for opengl. Maybe its just me, but I think it is easier to have a program in front of you and a book next to you at the same time as a reference. Usually, tutorials suck because they don''t explain all the necassary details.

Share this post


Link to post
Share on other sites
I know of two very good books, one is sort of beginner to advanced and the other is more intermediate to advanced.

The beginner book is called the OpenGL SuperBible, a VERY good book if you are just getting into OpenGL, one drawback is its kinda old but all the information is still relevant they just don''t cover newer features of OpenGL.

The more advanced one is the so called OpenGL Red Book (it has a red cover). NeHe has a link on his main page to the web version.

Jason A.

---
I write code.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
definetly go through the tutorials on this site. they are very simple to understand.

the red book is good for reference, but when just starting what''s better than just compiling code and reading all of the documentation in the tutorials as you look through it.

i''ve never read the super bible, i heard it was to simple and might not offer much for a more experienced programmer but i really don''t know.

also i have this thing against glut, so definetly any source you see that doesn''t use it is a huge plus in my mind.

Share this post


Link to post
Share on other sites