Posted: Tue May 01, 2007 10:53 am
I say that, coming soontmyke wrote: We try to solve the problem so that in the months to come, even old card can be run with DM3D.

http://www.purebasic.com
https://www.purebasic.fr/english/
I say that, coming soontmyke wrote: We try to solve the problem so that in the months to come, even old card can be run with DM3D.
We modified the code of Dreamotion3D to adapt itself better in old video card.Chrono Syndrome wrote:OK, I will wait for it.
tmyke wrote:Try this, and say me what's happen ?
http://www.dreamotion3d.com/_downloads/ ... stDM3D.zip
There is an update of the engine almost every week, we work a lot.kawasaki wrote:Any news on whats going on, or when to expect the next update on the 3d renderer
or even the physics lib?
somes video card run correctly (except shader):dontmailme wrote:Still doesn't work on my older card..... is there a memory requirement for the 3d card ?
Aldo the zip you posted gives a memory access violation
Still works great on my 7950GTX though
Code: Select all
; with Dreglor contribution...
;-------------------
;- Includes
;-------------------
IncludePath "Include" : IncludeFile "dreamotion3d.pbi"
;-------------------
;- Globals
;-------------------
Global *D3D.IDIRECT3D9
Global *D3DDevice.IDIRECT3DDEVICE9
Global Rendering.D3DPRESENT_PARAMETERS
Global Current.D3DDISPLAYMODE
Global DevCaps.d3dcaps9
Global BehaviorFlags
Global hwnd.l
InitMouse()
;-------------------
;- Procedures
;-------------------
Procedure InitD3D9()
If hwnd = #Null
*D3D = Direct3DCreate9(#D3D_SDK_VERSION)
ProcedureReturn #True
Else
ProcedureReturn #False
EndIf
EndProcedure
Procedure D3D9_OpenWindowedScreen(Window.l, x.l, y.l, Width.l, Height.l, Title.s, WindowFlags.l = #PB_Window_ScreenCentered | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
If *D3D <> #Null And *D3DDevice = #Null
If *D3DDevice <> #Null
;Device Check
*D3DDevice\Release()
*D3DDevice = #Null
EndIf
If *D3D\GetAdapterDisplayMode(#D3DADAPTER_DEFAULT, Current) = #D3D_Ok
;Back Buffer Check
If *D3D\CheckDeviceType(#D3DADAPTER_DEFAULT, #D3DDEVTYPE_HAL, Current\Format, Current\Format, #True) = #D3D_Ok
;Z-buffer Check
If *D3D\CheckDeviceFormat(#D3DADAPTER_DEFAULT, #D3DDEVTYPE_HAL, Current\Format, #D3DUSAGE_DEPTHSTENCIL, #D3DRTYPE_SURFACE, #D3DFMT_D24S8) = #D3D_Ok
If *D3D\GetDeviceCaps(#D3DADAPTER_DEFAULT, #D3DDEVTYPE_HAL, DevCaps) = #D3D_Ok
If DevCaps\VertexProcessingCaps <> 0
BehaviorFlags = BehaviorFlags | #D3DCREATE_HARDWARE_VERTEXPROCESSING ;if it can
Else
BehaviorFlags = BehaviorFlags | #D3DCREATE_SOFTWARE_VERTEXPROCESSING ;if it can't
EndIf
Else
Debug "GetDeviceCaps Failed"
ProcedureReturn #False
EndIf
hwnd = OpenWindow(Window, x, y, Width, Height, Title, WindowFlags)
If hwnd <> #Null
Rendering\BackBufferCount = 1
Rendering\MultiSampleType = #D3DMULTISAMPLE_NONE
Rendering\MultiSampleQuality = 0
Rendering\SwapEffect = #D3DSWAPEFFECT_DISCARD
Rendering\hDeviceWindow = hwnd
Rendering\flags = #Null
Rendering\FullScreen_RefreshRateInHz = #D3DPRESENT_RATE_DEFAULT
Rendering\PresentationInterval = #D3DPRESENT_INTERVAL_ONE
Rendering\BackBufferFormat = Current\Format
Rendering\EnableAutoDepthStencil = #True
Rendering\AutoDepthStencilFormat = #D3DFMT_D24S8
Rendering\Windowed = #True
Rendering\BackBufferWidth = 0
Rendering\BackBufferHeight = 0
If *D3D\CreateDevice(#D3DADAPTER_DEFAULT, #D3DDEVTYPE_HAL, hwnd, BehaviorFlags, Rendering, @*D3DDevice) = #D3D_Ok
ProcedureReturn #True
Else
Debug "Creation of the device failed"
CloseWindow(Window)
ProcedureReturn #False
EndIf
Else
Debug "Window Failed"
ProcedureReturn #False
EndIf
Else
Debug "z-buffer does not work"
ProcedureReturn #False
EndIf
Else
Debug "the back buffer format failed"
ProcedureReturn #False
EndIf
Else
Debug "Failed to get the current mode"
ProcedureReturn #False
EndIf
Else
Debug "D3D not initilized!"
ProcedureReturn #False
EndIf
EndProcedure
Procedure Shutdown(Window)
DM_ClearGraphics()
If IsWindow(Window)
CloseWindow(Window)
EndIf
ProcedureReturn #True
EndProcedure
;----------------
;- Main Loop
;----------------
If InitD3D9() = #True
If D3D9_OpenWindowedScreen(0, 10, 10, 640, 480, "DirectX For PB: Initilization") = #True
; set parameters dreamotion engine with params initialized by directx
Repeat
Until WindowEvent() = #PB_Event_CloseWindow
EndIf
EndIf
Shutdown(0)
End
Well, zis code works for me.Here is the small code which normally opens asingle DX9 windows.
To try in Debug mode, and ...
Code: Select all
;----------------
;- Main Loop
;----------------
If InitD3D9() = #True
If D3D9_OpenWindowedScreen(0, 10, 10, 640, 480, "DirectX For PB: Initilization") = #True
DM_SetDevices(hwnd, *D3D, *D3DDevice)
DM_SetGraphics(@Rendering, 32, 0)
; set parameters dreamotion engine with params initialized by directx
Repeat
Until WindowEvent() = #PB_Event_CloseWindow
EndIf
EndIf
Shutdown(0)
End
and this:Chrono Syndrome wrote:Still works.
Code: Select all
;----------------
;- Main Loop
;----------------
If InitD3D9() = #True
If D3D9_OpenWindowedScreen(0, 10, 10, 640, 480, "DirectX For PB: Initilization") = #True
DM_SetDevices(hwnd, *D3D, *D3DDevice)
DM_SetGraphics(@Rendering, 32, 0)
; create camera
*camera = DM_CreateCamera(0)
DM_TranslateEntity(*camera, 0,3,-20)
*cube=DM_CreateCube()
; set parameters dreamotion engine with params initialized by directx
Repeat
DM_BeginScene()
DM_RenderWorld()
DM_EndScene()
Until WindowEvent() = #PB_Event_CloseWindow
EndIf
EndIf
Shutdown(0)
End
install DLL in the 'compiles' folder of PureBasic.Dare wrote:The install does what, and where?
folder the PureBasic, it's better ( we need compilers folder for DLL)Dare wrote:The install is looking for a folder - is this folder the PureBasic folder or will any
folder do?
Dare wrote:When you cancel the install it says "impossible to install the dll" (or something similar) ..
.. it then does something and says "Installation successful" (or similar) ..
.. Do I need to hunt down some files installed in weird places and if so, which files and where?