Max2D

BlitzMax Forums/BlitzMax Programming/Max2D

TartanTangerine (was Indiepath)(Posted 2005) [#1]
Single surface systems are pretty much the way to go when optimising 2D in 3D for Blitz3D, the BMAX 2D module is fantastic and affords pretty much everything that is needed for a 2d game...

However...

How does Max2D deal with single surfaces (with regard to the DirectX graphics driver)? Is this automatic? is it on a per texture basis? Am I barking up the wrong tree and does DirectDraw not have these limitations? And do I need a 3D card to use a Max2D application?

I hope someone can answer these questions.

Thanks.


ImaginaryHuman(Posted 2005) [#2]
Technically you shouldn't need a 3D card in order to get output from OpenGL, for example, not sure about DirectX. So long as there is a software driver for it you will get output. However, hardware acceleration by way of having a graphics card do as much of the work as it can, is very highly recommended. I think what you're wondering is if you have a 2D graphics card will it be able to do Max2D stuff. I would say it really depends on the driver. Your best bet would be to have a 3D graphics card.

I don't know about the single surface thing. max2D basically puts a texture onto the front face of a pair of triangles which are facing the camera.


Dreamora(Posted 2005) [#3]
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



TartanTangerine (was Indiepath)(Posted 2005) [#4]
OKay, this seems like something not to be too concerned about at this stage.

Thanks people.