OpenGL Surface Hang

Any idea why a simple opengl surface app would crash / hang up when moving between screens. The computer does has multiple display adapters.

All the app does it open a window with a opengl surface on it, with a timer calling render every 1/10 of a second.

The render loop is


//glLoadIdentity β€” replace the current matrix with the identity matrix

dim c as color = rgb(Rnd() * 255,Rnd() * 255,Rnd() * 255)
'clear the whole screen w/ black
//glClearColor β€” specify clear values for the color buffers
OpenGL.glClearColor( c.Red / 255, c.Green / 255, c.Blue / 255, 0.0 )

//glClear β€” clear buffers to preset values


Works on macos and my windows machines (both with single display adapters)

Maybe @Eugene_Dakin has some feedback. He wrote a book about using OpenGL with Xojo.
I never used it myself, so I can’t help myself.

1 Like