CreateFrameFromPixmap

BlitzMax Forums/BlitzMax Programming/CreateFrameFromPixmap

BlackSp1der(Posted 2006) [#1]
600fps in DirectX and only 300fps in OpenGL...

Is there any way to get a better performance in OpenGL?

'SetGraphicsDriver D3D7Max2DDriver()
SetGraphicsDriver GLMax2DDriver()

Graphics 640,480,0
Const width:Int=10
Const height:Int=10
Local pixmap:TPixmap=GrabPixmap(0,0,width,height)

Local FPS:Int
Local FPSCount:Int
Local LastTime:Int=MilliSecs()
Local image:TImage=CreateImage(width,height)

SetClsColor 128,0,0
Repeat
	Cls

	image.Frames[0]=_Max2DDriver.CreateFrameFromPixmap(pixmap,0)

	DrawImage image,Rand(0,640),Rand(0,480)
	DrawText "FPS: "+FPS,0,0
	Flip 0
	If MilliSecs()-LastTime > 1000 Then
		LastTime=MilliSecs()
		FPS=FPSCount
		FPSCount=1
	Else
		FPSCount:+1
	EndIf
Until KeyHit(KEY_ESCAPE)



DannyD(Posted 2006) [#2]
I get the same fps(200) for both.


tonyg(Posted 2006) [#3]
I see the same results : 115 on GL and 300 on DX7.
This is my PIII S3 laptop which ALWAYS struggles with OGL so, I guess, it could be the drivers.


Torrente(Posted 2006) [#4]
I got about 1000 steady for GL, and 700 for DX.


SpaceAce(Posted 2006) [#5]
I get about 575/400 on an Athlon 64 X2 dual core 1400+ with a crummy graphics card and two gigs of RAM.

SpaceAce