Really primitive primitives

Started by
8 comments, last by JWAce 24 years ago
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
Advertisement
When you call glBegin you can specify GL_POINTS or GL_LINES.
STOP!

stop with whatever you''re doing and go to the closest bookstore and buy the OpenGL Programming Guide.. NOW!

----------
Drago
osu!
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).


that is sofa king cool dude.
Styles
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.
Styles
Oh I totally agree with getting a book, I just haven''t seen any good books on the subject the last few times I visited the bookstore. Any suggestions?

JW
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.
---I write code.DelphiGL (http://delphigl.cfxweb.net)
Actually its not so old because the second edition was relased a short while back.
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.

This topic is closed to new replies.

Advertisement