Max2D

BlitzMax Forums/BlitzMax Programming/Max2D

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.

D3D is used not DirectDraw as DD misses alpha features. DirectX as OpenGL both run in 3D.

Its up to you to draw them in the correct order to have an optimized usage of the texture so that the graphic card hasn't to change texture all the time, although this change does not seem have any impact (at least as long as the whole data can be kept in graphics ram)

edit: I created a little benchmark to see if it is only my card or something. you will have to replace test.png, test1.png with 2 textures of the same size
' This is a rebind test

Strict
SetGraphicsDriver GLMax2DDriver ()
Graphics 800,600,0,-1|HARDSYNC

Local img1:timage = LoadImage ("test.png")
Local img2:timage = LoadImage ("test1.png")

Local t1:Int = MilliSecs ()
For Local i = 1 To 10000
	Cls	
	DrawImage img1, 200,500
	Flip
Next



For Local i = 1 To 10000
	Cls
	DrawImage img2, 200,500
	Flip
Next
t1 = MilliSecs () - t1

Print "Test 1 abgeschlossen"

Local t2:Int = MilliSecs ()

For Local i = 1 To 10000
	Cls
	DrawImage img1, 200,500
	DrawImage img2, 200,500
	Flip
Next
t2 = MilliSecs () - t2
EndGraphics 
Print "T1: " + t1 + ", T2: " + t2
End