Re: Problems with Tao-Framework and Cobra
Posted: Sat Mar 15, 2008 6:56 pm
here are the atachments good luck fixing the problems or telling me what I did wrong..
Discussion about the Cobra programming language.
http://cobra-language.com/forums/
def main is shared
evt as Sdl.SDL_Event
Sdl.sdl_Init(Sdl.sdl_INIT_EVERYTHING)
surfacePtr = Sdl.sdl_SetVideoMode(640,480,32,Sdl.sdl_HWSURFACE|Sdl.sdl_DOUBLEBUF|Sdl.sdl_ANYFORMAT|Sdl.sdl_OPENGL)
h = 640.0f / 480.0f
Gl.glViewport(0, 0, 640, 480)
Gl.glMatrixMode(Gl.gl_PROJECTION)
Gl.glLoadIdentity
Gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f)
Gl.glMatrixMode(Gl.gl_MODELVIEW)
Gl.glLoadIdentity
Gl.glTranslatef(0.0 to Single, 0.0 to Single, -40.0 to Single)
while true
Sdl.sdl_PollEvent(out evt)
branch evt.type
on Sdl.sdl_QUIT
break
1f
5.0_f32
10f32