Topic: iB3D checks for escape key and closes window. clueless...

'#Region Initialize 3D Engine
    ib3d_Graphics3D(ScreenWidth, ScreenHeight, ScreenDepth, ScreenMode, True, True, EDT_OPENGL)
    Global ihCamera:CAMERA = ib3d_CreateCamera(Null, CT_NORMAL)
'#End Region

'#Region Load necessary Stuff
    Local ihCube:PRIMITIVE = ib3d_CreateCube()
    Local ihPlane:PLANE = ib3d_CreatePlane(1,1,16,16)
    ihPlane.Move(0,-5,0)
    Local ihLight:LIGHT = ib3d_CreateLight(ihCamera)
'#End Region

'#Region Mainloop
    Local _deg:Float
    Repeat
        ib3d_UpdateWorld()            'Update World Physics
        
        _deg :+ 1
        ihCamera.Position(Cos(_deg)*25,5,Sin(_deg)*25,True)
        ihCamera.Point(ihCube)
        
        ib3d_RenderDrawCmds()
        ib3d_RenderWorld()            'Render the World
'        If ib3d_KeyHit(1)
'            Exit
'        End If
    Forever
'#End Region

The above code snipper results in users being able to close the window with escape, but the code never even reaches the outside of the Repeat-Forever.
How do I fix this?

Re: iB3D checks for escape key and closes window. clueless...

greetings Xaymar.  My apologies for the delayed response.  I cannot replicate the behavior you are seeing withought uncommenting the keyhit code but even then it still exited the loop.  the only other way i could get this to happen is if ESC was hit while the BMAX IDE had focus.  that cancels the program and thus the window and will not exit the loop.