PDA

View Full Version : drawing pixel and line



04-01-2003, 12:27 PM
hello,
i am new in openGL and i want know how can
i draw pixel and line.
which functions may i use.
thanks.

Miguel_dup1
04-01-2003, 01:02 PM
Do a search for glBegin

nexusone
04-01-2003, 07:04 PM
A good place to start is nehe.gamedev.net for tutors.
Note that while you can work with pixels in openGL, 3D objects are made up of vector style lines.

I would be good for you to look at above website to get an idea of how openGl works since it is not like 2D graphics.

example:

// Points
glBegin(GL_POINT)
glVertex2f( 0, 0 )
glEnd()

// Line
glBegin(GL_LINES)
glVertex2f( 0, 0 )
glVertex2f( 1, 1 )
glEnd()



Originally posted by mehrdad:
hello,
i am new in openGL and i want know how can
i draw pixel and line.
which functions may i use.
thanks.