Emulation mode not work at all(D3DDEVTYPE_REF)

Started by
6 comments, last by Pzh 21 years, 2 months ago
Hi all ! Simple application not work in emulation mode, it''s render black screen...why it can be ? DirectX8, WinXP, Matrox G200. also tested with S3 Savage4 card. with D3DDEVTYPE_HAL flag all work correct. function Init3D(Handle:HWND):HRESULT; var hRet:HRESULT; d3dpp:TD3DPRESENT_PARAMETERS; d3ddm:TD3DDISPLAYMODE; begin FD3D:=nil; FD3DDevice:=nil; FD3D:=Direct3DCreate8(D3D_SDK_VERSION); if (FD3D = nil) then begin result:=E_FAIL; exit; end; hRet:=FD3D.GetAdapterDisplayMode(D3DADAPTER_DEFAULT,d3ddm); if Failed(hRet) then begin result:=hRet; exit; end; ZeroMemory(@d3dpp,sizeof(d3dpp)); with d3dpp do begin Windowed:=true; SwapEffect:=D3DSWAPEFFECT_DISCARD; BackBufferFormat:=d3ddm.Format; EnableAutoDepthStencil:=true; AutoDepthStencilFormat:=D3DFMT_D16; end; result:=FD3D.CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_REF,Handle,D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp,FD3DDevice); if (Failed(result)) then begin exit; end; end; function Render:HRESULT; begin hRet:=FD3DDevice.Clear(0,nil,D3DCLEAR_TARGET or D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(255,255,255),1,0); if Failed(hRet) then begin result:=hRet; exit; end; result:=FD3DDevice.Present(nil,nil,0,nil); end;
Advertisement
1) The REF device **IS NOT** a software emulation device.

It is intended to only be used for development purposes (i.e. testing features not supported in hardware and checking for correctness). As such only machines which have the SDK installed will be able to create a REF device. Most end user machines won''t have a REF device.


2) If you DO have the SDK and you still aren''t getting the REF device, go to the control panel, and select the DirectX applet. Go to the Direct3D tab and make sure the "Enumerate Reference Rasterizer" box is ticked.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

so there is no software emulation in d3d 9?
if they dont have a 3d accelerated video card they cant play
quote:Original post by Anonymous Poster
so there is no software emulation in d3d 9?
if they dont have a 3d accelerated video card they cant play



Yes and No.

Yes - if you''re using DirectX 9 interfaces, there isn''t a software rasteriser unless someone makes a pluggable device.

No - you can still use the DirectX 7 interfaces with the DirectX 9 runtimes. The DirectX 7 interfaces provide two forms of software rasteriser.


None of the new features introduced in DirectX 8 apart from say vertex shaders and point sprites are practical to emulate at any reasonable speed. Only the features provided with the DX7 interfaces are realistically usable*. This has been the case since DirectX 8.


[*]<br><br>500 500 <br><br>–<br>Simon O''Connor<br>Creative Asylum Ltd<br><A HREF="http://www.creative-asylum.com">www.creative-asylum.com</A>

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

S1CA it appears you are a pro game developer.

I was looking at your web page.

I guess you made the games in direct3d.
do you use your own custom format for loading 3d models?
Thanks for answers, I have understood that full emulation will fail.

The question has appeared still. On Matrox G200 dxdiag determines presence of acceleration 3D
Also the test 3D normally is started and passed.
But at my initialization (see procedure written right at the beginning) if change _REF on _HAL
then function CreateDevice returns a mistake. I can not tell yet
precisely code of error, because it tested not on my computer.
But at first look in what there can be a reason?
How it doing dxdiag, that all works fine...?
WOW, I did not know that... Thanks!!!
I''m having some WEIRD problems then... My programs work with REF but not HAL.
Pzh & RaphaelMun:

1) Use the debug runtime if at all possible, this will tell you in the output window WHY the CreateDevice call failed.

2) One of the most common causes of CreateDevice failing is something wrong in your PRESENT_PARAMETERS.

3) Something else to bear in mind is that to use DirectX8 Direct3D interfaces you MUST have at least a DirectX 6 level drivers for your graphics card. DXDIAG tests for all levels of DirectX, not just the newest one, so even if a graphics card only works with DirectX 3, DXDIAG will still report information about it.

4) Since your app starts up in windowed mode, check what bit depth the desktop is in. IIRC the G200 is one of those rare cards which allows you to put your desktop in 24bit instead of 32bit. 3D rendering isn''t possible in the 24bit modes, try changing it to 16 or 32.



Anonymous Poster:

Yep, have been for a good number of years now. I work at Creative Asylum Ltd as you''ve seen.

The PC games use Direct3D, yes. The console games (including the one we''re developing now) don''t.

We do use our own custom file format known as TOD (tagged object data) for loading 3D data - since we started developing our engine technology back in the DirectX 6 days (DirectX 5 at the company before that), there weren''t nice 3DS Max exporters provided with DirectX. So we designed our own file format and wrote our own exporter and viewer to cope with all the things we required.

The format and the tools evolve for each project to cope with new requirements and to implement new ideas for things like compression. The "tags" in the formats name work in a similar way to those found in things like PNG or IFF and allow old tools to read some parts of newer formats without blowing up etc.

That file format has also been used on some console titles (not to be confused with the TOD format found in certain Sony libraries).

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement