new dxgraphics
BlitzMax Forums/BlitzMax Programming/new dxgraphics
| ||
Hi, The new dxgraphics module will cause problems with any apps that depended on low level details of the old one. These will need to be rewritten, using the following: D3D7GraphicsDriver().DirectDraw7() D3D7GraphicsDriver().Direct3D7() D3D7GraphicsDriver().Direct3DDevice7() In addition, there is a global 'IsValid' flag: TD3D7GraphicsDriver.IsValid If this is true, then you can safely use the above objects. Otherwise, you can't. Best to check this at the entry to any function that wants to use one of the above objects. Finally, use GetActiveWindow() if you really need the graphics HWND. |
| ||
For example, instead of:PrimaryDevice.ddraw.WaitForVerticalBlank DDWAITVB_BLOCKBEGIN,0use D3D7GraphicsDriver().DirectDraw7().WaitForVerticalBlank DDWAITVB_BLOCKBEGIN,0 |
| ||
... well that's going to be a pain. |
| ||
. |
| ||
. |
| ||
. |
| ||
. |
| ||
. |
| ||
. |
| ||
. |
| ||
Good idea BrEgOrS. Left my original post as it was feedback to Mark's update. |
| ||
What new 'dxgraphics module' is this? |
| ||
Mark just rewrote the original BRL.DXGraphics because it was getting messy. As far I can tell there are no major additions. |
| ||
Does it do anything different - like work faster? |
| ||
I don't think so, could be wrong though. |
| ||
Mark, could you make it default that when a graphics window is opened it will be centered on the desktop (height and width wise) automatically? |
| ||
. |
| ||
Mark, could you make it default that when a graphics window is opened it will be centered on the desktop (height and width wise) automatically? OR if you don't want to break existing apps, have a flag on the end of Graphics OR have a Blitz global flag that defaults to non-centred but which we can change before we call Graphics. |
| ||
An example please. All I get when I add:if TD3D7GraphicsDriver.IsValid D3D7GraphicsDriver().DirectDraw7().SetRenderState( D3DRS_EDGEANTIALIAS, True ) Endif Compiler Error Identifier 'IsValid' not found and after searching for "IsValid" in the modules folder it is not there? |
| ||
Can anyone tell me how to roll back to my previous blitz max modules before I sync'd to fix a problem im having? Cheers. |