OpenGL and Threads

BlitzMax Forums/BlitzMax Programming/OpenGL and Threads

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I take it you cant use threads to update graphics using OpenGL ?


DX version shows output

Strict
Import pub.threads
Graphics 800,600	
Local loader:Int = CreateThread(Progress, Null)
Delay(3000)
DetachThread(loader) 
Delay 10
Function Progress:Object(data:Object)
		Cls
		SetColor 255,0,0
		DrawRect 0,0,30,30
		DrawText "TEST", 50, 50
		Flip 
End Function



OpenGl does not

Strict
Import pub.threads
SetGraphicsDriver GLMax2DDriver()
Graphics 800,600	
Local loader:Int = CreateThread(Progress, Null)
Delay(3000)
DetachThread(loader) 
Delay 10
Function Progress:Object(data:Object)
		Cls
		SetColor 255,0,0
		DrawRect 0,0,30,30
		DrawText "TEST", 50, 50
		Flip 
End Function