Drawing a 2D-Grid

  • Follow


Hi

I need to draw a two-dimensional Grid with OpenGL. I do not need any
3D-projection. So, how do I draw lines, and how to do it in 2D?

Thanks in advance

Michael
0
Reply Michael 11/13/2003 10:32:40 PM

Michael Arens wrote:
> Hi
> 
> I need to draw a two-dimensional Grid with OpenGL. I do not need any
> 3D-projection. So, how do I draw lines, and how to do it in 2D?
> 
> Thanks in advance
> 
> Michael

first of all if you only want 2D functionality, there may be 
better/easier ways to get it instead of OpenGL (eg SDL), but since you 
ask for OpenGL... just draw lines (GL_LINES), two vertices each of 
course. as for the projection... well if you don't want perspective then 
don't do perspective. set your projection matrix accordingly, or call 
glOrtho.

-- Nuclear / the Lab --

0
Reply John 11/15/2003 12:45:23 AM


1 Replies
576 Views

(page loaded in 0.029 seconds)

Similiar Articles:













7/23/2012 11:25:34 AM


Reply: