Does BliztMaxDX use 3D acceleration?

BlitzMax Forums/BlitzMax Beginners Area/Does BliztMaxDX use 3D acceleration?

QuickSilva(Posted 2005) [#1]
Just a quickie. Does BlitzMax DX use the same 3D acceleration that the GL version uses? I only ask as the wireframe mode (F3) in the sample RockOut no longer works (for me anyway) when running under the new DX version. Does this mean that it is not using quads? Or maybe the wireframe command has been removed completely. I couldn`t see it in the guide.

Jason.


Dreamora(Posted 2005) [#2]
As DirectX supports real 2D surfaces this would be extremely "stupid" to fake 2D on 3D if not needed.


QuickSilva(Posted 2005) [#3]
I agree. But the main reason I ask is because I have a game in Blitz3D (that uses 2D) that works perfectly well on my friends computer but the exact same game under BlitzMax DX will not work properly\has graphical errors. It will not work at all in GL mode but I was hopeful that the DX mode would, after all Blitz3D works fine as I have said. Both modes work nicely on my computer but this worries me a little as far as compatibilty goes.

Jason.


Who was John Galt?(Posted 2005) [#4]
I don't think DirectX guarantees wireframe to work on all cards - so even if it's there, don't bank on it working for everyone.


QuickSilva(Posted 2005) [#5]
Wireframe will only work if 3D is being used. As this doesn`t seem to be the case that would explain why it doesn`t work.

The thing that puzzles me is why my game will not work on certain computers even though an identical Blitz3D version will. They both use DX7 after all and I`m talking simple Space Invaders here nothing complex.

Jason.


Yan(Posted 2005) [#6]
Wireframe mode has never been in BMAX (max2d).
The wire frame effect in Rockout is achieved using a GL command (glPolygonMode()).

It's early days for the DX7 stuff (especially considering it's a month early), there are bound to be some glitches.


Dreamora(Posted 2005) [#7]
What do you mean with not work?
Did you perhaps draw images in smaller size than they are and forgot about the MIPMAPPEDIMAGE flag on loading?


Yan(Posted 2005) [#8]
I've had a quick play and I've got a wire frame mode working in Rockout under DX...

Add this somewhere before the main loop...
Const D3DFILL_POINT = $01
Const D3DFILL_WIREFRAME = $02
Const D3DFILL_SOLID = $03

Global d3dDriver:TD3D7Max2DDriver = D3D7Max2DDriver()
And replace 'WireFrame()'...
Function WireFrame (enable = True)
  If enable
    'glPolygonMode (GL_FRONT_AND_BACK, GL_LINE)
    d3dDriver.device.SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME)
  Else
    'glPolygonMode (GL_FRONT_AND_BACK, GL_FILL)
    d3dDriver.device.SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID)
  EndIf
End Function



BlitzSupport(Posted 2005) [#9]

I don't think DirectX guarantees wireframe to work on all cards - so even if it's there, don't bank on it working for everyone.



Wireframe has always been dodgy in Direct3D -- apparently plenty of drivers don't support it properly. (The comment in this Blitz3D Code Archives example I submitted back in August 2001 makes mention of this!)

It's actually pretty ineffective in RockOut as it stands -- it looked really good when the blocks used to be OpenGL rectangles, but once they became images, the wireframe became pretty hard to see, and I was surprised nobody pointed this out!