@H&K, you can simply change bglcreatecontext to glgraphics
and it seems to work.
'Framework brl.blitzgl
'Import brl.system
Global ScreenWidth:Int=800
Global ScreenHeight:Int=600
Global ScreenDepth:Int=32
GLGraphics(ScreenWidth,ScreenHeight,ScreenDepth,0,BGL_BACKBUFFER | BGL_DEPTHBUFFER) '| BGL_FULLSCREEN
InitGl()
While Not KeyHit( KEY_ESCAPE )
nehe2()
glColor3f(1.0,1.0,1.0)
'Framecounter--------------------------------------------
Framecounter_counter=Framecounter_counter+1
If Framecounter_time=0 Then Framecounter_time=MilliSecs()
If Framecounter_time+1001 <MilliSecs() Then
Framecounter_framerate=Framecounter_counter
Framecounter_counter=0
Framecounter_time=MilliSecs()
EndIf
GLDrawText("FPS : "+Framecounter_framerate,ScreenWidth-(8*12),ScreenHeight-16-8)
'--------------------------------------------------------
GLDrawText("Nehe lesson 2",10,24)
' FlushMem
Flip
Wend
End
Function InitGl()
glClearColor(0.0, 0.0, 0.0, 0.0)
glClearDepth 1.0
glDepthFunc(GL_LESS)
glEnable(GL_DEPTH_TEST)
glFrontFace(GL_CW)
glShadeModel(GL_SMOOTH)
glViewport(0,0,ScreenWidth,ScreenHeight)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(45.0,Float(ScreenWidth)/Float(ScreenHeight),1.0,100.0)
glMatrixMode(GL_MODELVIEW)
End Function
Function nehe2()
glClear GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
glLoadIdentity
glTranslatef -1.5,0.0,-6.0
glBegin %GL_POLYGON
glVertex3f 0.0, 1.0, 0.0 ' Top
glVertex3f 1.0,-1.0, 0.0 ' Bottom Right
glVertex3f -1.0,-1.0, 0.0 ' Bottom Left
glEnd
glTranslatef 3.0,0.0,0.0
glBegin %GL_QUADS
glVertex3f -1.0, 1.0, 0.0 ' Top Left
glVertex3f 1.0, 1.0, 0.0 ' Top Right
glVertex3f 1.0,-1.0, 0.0 ' Bottom Right
glVertex3f -1.0,-1.0, 0.0 ' Bottom Left
glEnd
End Function
might be some additional changes required in later tutorials (e.g. bglSetMouseVisible False to hidemouse or comment it out) but that should be a start on 1.22