09-04-2005, 10:19 PM
I'm trying to open an OpenGL window, though, when I use Screenres with 2 as parameter (which means, an opengl window), it just crashes...does this crash for you aswell?
Code:
Declare Function InitOpenGL (scrWidth As Integer, scrHeight As Integer)
'$include: "\gl\gl.bi"
'$include: "\gl\glu.bi"
ScreenRes 640, 480, 32, 1, 2
InitOpenGL(640, 480)
Do
Loop Until Multikey(1)
Function InitOpenGL (scrWidth As Integer, scrHeight As Integer)
glViewPort 0, 0, scrWidth, scrHeight
glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 45, scrWidth / scrHeight, 1.0, 100
glMatrixMode GL_MODELVIEW
glLoadIdentity
glShadeModel GL_SMOOTH
glClearColor 0.0, 0.0, 0.0, 0.0
glClearDepth 1.0
glEnable GL_DEPTH_TEST
End Function