[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: GSL shell release 0.9.6 plus standard Lua module
- From: Wesley Smith <wesley.hoke@...>
- Date: Mon, 4 Jan 2010 14:08:59 -0800
You have to do your typical OpenGL stuff.
gl and GL map to cgl
local
function draw()
gl.MatrixMode(GL.PROJECTION)
gl.PushMatrix()
gl.LoadIdentity()
glu.Perspective(45, 1, 1, 100)
gl.MatrixMode(GL.MODELVIEW)
gl.PushMatrix()
gl.LoadIdentity()
gl.Translate(0, 0, -4)
gl.Color(1, 1, 1, 1)
gl.Begin(GL.LINES)
gl.Vertex(-1, 1, 0)
gl.Vertex(1, 1, 0)
gl.End()
gl.PointSize(10)
gl.Begin(GL.POINTS)
gl.Vertex(-1, 1, 0)
gl.Vertex(1, 1, 0)
gl.End()
gl.MatrixMode(GL.PROJECTION)
gl.PopMatrix()
gl.MatrixMode(GL.MODELVIEW)
gl.PopMatrix()
end