Jump to content
  • Advertisement
Sign in to follow this  
@xi@g@me

OpenGL Direct3D 9 - NVidia works, ATI fails

This topic is 2215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

Last week, I developed a small rendering task for a technical test (I won't say the company name neither the complete topic, for confidential reasons).

I finished the test in time, but for a strange reason it perfeclty works on NVidia hardware, but not on ATI hardware. The rendering is done in a right-handed environment, because it must be compatible with both Direct3D and OpenGL.

I tried to have a look at PIX, and all is fine (index buffers, streams, textures, shaders, render state...). The vertex shader works well (tried to look at the different steps of a single mesh rendering), but the rasterizer seems to discard all the triangles, and it seems that the pixel shader is never called (if I right click a pixel and select "debug this pixel", I have nothing excepted the "clear" pixel setting). Sometimes, I read "this pixel has been discarded for the following reason : did not pass the alpha test", but there is no vertex shader/pixel shader to debug. Also, the alpha test is set to false, and the func is set to "always" !

Is there something I missed in the process ?

If you need more info that can help me solve the problem, just ask me for them and I'll give you what you need smile.png

Thanks in advance smile.png

@xi@g@me.

(PS : the D3D9 debug mode tells me that the ATI driver does not support index buffers ("(info) : failed to create driver index buffer"), so I tried primitive rendering without indices but it still draws nothing. Trying to update my ATI driver brought me to a blue screen)

Share this post


Link to post
Share on other sites
Advertisement
You're likely performing some operation which isn't strictly valid, but is allowed by the nVidia driver.

Which shader models are you using? Are you mixing VS2 with PS3?
Which GPU models are you testing?
Use the DirectX control panel to enable to Debug version of Direct3D 9, turn output level up to one-step-below maximum, tick Maximum Validation and Break on D3D9 Error, and run the game from your IDE/Debugger to monitor for output messages and/or crashes.

Share this post


Link to post
Share on other sites
Hi Hodgman,

thanks for your answer, I always knew NVidia was more indulgent than ATI ^^

I am exclusively using SM 3.0
my NVidia GPU is GTX 470
my ATI GPU is HD 5750

Here is my output log with my ATI device used :



'RenderingTask.exe': Loaded 'S:\Havok\Out\Win32\Debug D3D9\RenderingTask.exe', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'RenderingTask.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcp90d.dll', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcr90d.dll', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\version.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3dx9d_43.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'RenderingTask.exe': Loaded 'C:\Program Files (x86)\DisplayFusion\Hooks\DisplayFusionHookx86_af572312-ca22-4a6a-ba57-d87af4583ea5.dll', Binary was not built with debug information.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d9d.dll'
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\nvd3dum.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiu9pag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\atiumdva.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (INFO) :======================= Hal HWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style b
Direct3D9: (INFO) :Using FF to VS converter
Direct3D9: (INFO) :Using FF to PS converter
D3DX: Unicode support: 1
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
Direct3D9: (INFO) :Failed to create driver indexbuffer
D3DX: (INFO) Using SSE2 optimizations
D3DX: Matrix should be 16-byte aligned for better performance
The thread 'Win32 Thread' (0x1788) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1244) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1798) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1348) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x10c8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1458) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x11e8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x105c) has exited with code 0 (0x0).
Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 215
Direct3D9: (ERROR) :Current Process (pid) = 000016e8
Direct3D9: (ERROR) :Memory Address: 010707fc lAllocID=1 dwSize=00004bc4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010753f4 lAllocID=2 dwSize=00000350, ReturnAddr=54c602fa (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107577c lAllocID=3 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a974a4 lAllocID=5 dwSize=00027408, ReturnAddr=54c6e508 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00abe8e4 lAllocID=6 dwSize=00001fa4, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac08bc lAllocID=7 dwSize=00000320, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac0c14 lAllocID=8 dwSize=00000018, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a70064 lAllocID=25 dwSize=00001d1c, ReturnAddr=54c53cab (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010766a4 lAllocID=26 dwSize=00000320, ReturnAddr=54c53cf1 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076e7c lAllocID=27 dwSize=00000018, ReturnAddr=54c53d3e (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a71db4 lAllocID=28 dwSize=00000350, ReturnAddr=54c602fa (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7213c lAllocID=29 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac0fc4 lAllocID=31 dwSize=0001c384, ReturnAddr=54c6e508 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a73064 lAllocID=32 dwSize=00001c44, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00add37c lAllocID=33 dwSize=00000560, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076ecc lAllocID=34 dwSize=00000014, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a74cdc lAllocID=36 dwSize=000019bc, ReturnAddr=54c53cab (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00add914 lAllocID=37 dwSize=00000560, ReturnAddr=54c53cf1 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076f14 lAllocID=38 dwSize=00000014, ReturnAddr=54c53d3e (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a76a54 lAllocID=46 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076f5c lAllocID=47 dwSize=00000030, ReturnAddr=54c70881 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7797c lAllocID=48 dwSize=00001c44, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a795f4 lAllocID=49 dwSize=00000560, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addeac lAllocID=50 dwSize=00000014, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a79b8c lAllocID=52 dwSize=00004138, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010769fc lAllocID=53 dwSize=00000198, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076bcc lAllocID=54 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7dcfc lAllocID=55 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7ed54 lAllocID=56 dwSize=00000a48, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addef4 lAllocID=57 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a766cc lAllocID=58 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7677c lAllocID=59 dwSize=00000024, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a767d4 lAllocID=60 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a768a4 lAllocID=61 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a76954 lAllocID=62 dwSize=00000044, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a769cc lAllocID=63 dwSize=00000024, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f7d4 lAllocID=64 dwSize=000000a8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f8b4 lAllocID=65 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f984 lAllocID=66 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addfc4 lAllocID=67 dwSize=0002b330, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0932c lAllocID=68 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0938c lAllocID=69 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b093ec lAllocID=70 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09844 lAllocID=71 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b098ac lAllocID=72 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7fa34 lAllocID=73 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09914 lAllocID=74 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09a6c lAllocID=75 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a80a8c lAllocID=76 dwSize=00000e20, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09b04 lAllocID=77 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09c5c lAllocID=78 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a818e4 lAllocID=79 dwSize=000003ec, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09cf4 lAllocID=80 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09d7c lAllocID=81 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09e04 lAllocID=82 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09e8c lAllocID=83 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09f14 lAllocID=84 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81d04 lAllocID=85 dwSize=00000054, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81d8c lAllocID=86 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81e0c lAllocID=89 dwSize=000000b8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81efc lAllocID=90 dwSize=00010020, ReturnAddr=54c5d65a (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a91f54 lAllocID=91 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92004 lAllocID=92 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a920fc lAllocID=93 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a921ac lAllocID=94 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a922a4 lAllocID=95 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92354 lAllocID=96 dwSize=000000b0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9243c lAllocID=97 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a924ec lAllocID=98 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09f94 lAllocID=99 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92574 lAllocID=100 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a925d4 lAllocID=101 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076fc4 lAllocID=102 dwSize=0000517c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92634 lAllocID=103 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c174 lAllocID=104 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09ff4 lAllocID=105 dwSize=00004020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c1e4 lAllocID=106 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9368c lAllocID=107 dwSize=0000183c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0e04c lAllocID=108 dwSize=0000fab8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c254 lAllocID=109 dwSize=00000068, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c2f4 lAllocID=110 dwSize=00000140, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c46c lAllocID=111 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b1db3c lAllocID=112 dwSize=00004020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c4dc lAllocID=113 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b21b94 lAllocID=114 dwSize=0000183c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c54c lAllocID=115 dwSize=0000021c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b23404 lAllocID=116 dwSize=0002b044, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c79c lAllocID=117 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c7fc lAllocID=118 dwSize=00000224, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ca54 lAllocID=119 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cac4 lAllocID=120 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cc2c lAllocID=122 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ccb4 lAllocID=123 dwSize=00000038, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cd24 lAllocID=124 dwSize=00000080, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cddc lAllocID=125 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ce3c lAllocID=126 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ceb4 lAllocID=127 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cf2c lAllocID=128 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e47c lAllocID=129 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e514 lAllocID=130 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e57c lAllocID=131 dwSize=00000b38, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a94efc lAllocID=132 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f0ec lAllocID=133 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f244 lAllocID=134 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a95f54 lAllocID=135 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a96fac lAllocID=136 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a97104 lAllocID=137 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f2dc lAllocID=138 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9719c lAllocID=139 dwSize=000000e4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cfa4 lAllocID=140 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107d004 lAllocID=201 dwSize=000008b4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107d8ec lAllocID=202 dwSize=00000254, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a972b4 lAllocID=203 dwSize=00000034, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dd14 lAllocID=211 dwSize=0000002a, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9731c lAllocID=213 dwSize=00000038, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9738c lAllocID=214 dwSize=00000084, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107db74 lAllocID=215 dwSize=00000074, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dd74 lAllocID=216 dwSize=00000268, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a97444 lAllocID=217 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107e014 lAllocID=218 dwSize=000006fc, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107e744 lAllocID=284 dwSize=000002c8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dc1c lAllocID=285 dwSize=00000034, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ea44 lAllocID=286 dwSize=0000017c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ee64 lAllocID=294 dwSize=0000002a, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ebf4 lAllocID=295 dwSize=00000070, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ec9c lAllocID=296 dwSize=00000190, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dc84 lAllocID=297 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107eec4 lAllocID=298 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0683003c lAllocID=299 dwSize=00155574, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f01c lAllocID=300 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f1c4 lAllocID=302 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f274 lAllocID=303 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f324 lAllocID=304 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f3d4 lAllocID=305 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f484 lAllocID=306 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f534 lAllocID=307 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f5e4 lAllocID=308 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f694 lAllocID=309 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f744 lAllocID=310 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f7f4 lAllocID=311 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f09c lAllocID=312 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f10c lAllocID=313 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f8a4 lAllocID=314 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f914 lAllocID=315 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f984 lAllocID=316 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f9f4 lAllocID=317 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fa64 lAllocID=318 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fad4 lAllocID=319 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fb44 lAllocID=320 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fbb4 lAllocID=321 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fc24 lAllocID=322 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fc9c lAllocID=323 dwSize=000001a0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fe74 lAllocID=325 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107feec lAllocID=326 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f734 lAllocID=327 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f7e4 lAllocID=328 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f8dc lAllocID=329 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f98c lAllocID=330 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fa84 lAllocID=331 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fb34 lAllocID=332 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fc2c lAllocID=333 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fcdc lAllocID=334 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fdd4 lAllocID=335 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fe84 lAllocID=336 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4ff7c lAllocID=337 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5002c lAllocID=338 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50124 lAllocID=339 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b501d4 lAllocID=340 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b502cc lAllocID=341 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5037c lAllocID=342 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50474 lAllocID=343 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50524 lAllocID=346 dwSize=000000a8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50604 lAllocID=347 dwSize=00000068, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b506a4 lAllocID=348 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f17c lAllocID=349 dwSize=00000010, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50754 lAllocID=350 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b508ac lAllocID=351 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50a54 lAllocID=353 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50b04 lAllocID=354 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50bb4 lAllocID=355 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50c64 lAllocID=356 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50d14 lAllocID=357 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50dc4 lAllocID=358 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50e74 lAllocID=359 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50f24 lAllocID=360 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50fd4 lAllocID=361 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51084 lAllocID=362 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5092c lAllocID=363 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5099c lAllocID=364 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51134 lAllocID=365 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b511a4 lAllocID=366 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51214 lAllocID=367 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51284 lAllocID=368 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b512f4 lAllocID=369 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51364 lAllocID=370 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b513d4 lAllocID=371 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51444 lAllocID=372 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586584 lAllocID=398 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5228c lAllocID=426 dwSize=00000054, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52314 lAllocID=427 dwSize=00000080, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52b6c lAllocID=456 dwSize=00000114, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52cb4 lAllocID=457 dwSize=000003e4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b530cc lAllocID=458 dwSize=000001a4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b532a4 lAllocID=459 dwSize=00000170, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cb5c lAllocID=460 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5344c lAllocID=461 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b534e4 lAllocID=462 dwSize=000000f0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5360c lAllocID=463 dwSize=000000ac, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b536ec lAllocID=464 dwSize=000001a4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b538c4 lAllocID=465 dwSize=00000170, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b53a6c lAllocID=466 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586e5c lAllocID=467 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586c34 lAllocID=469 dwSize=000000f0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5184c lAllocID=471 dwSize=000000ac, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0658646c lAllocID=486 dwSize=0000007c, ReturnAddr=54c7b592 (pid=000016e8)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 2377360 bytes
D3DX: MEMORY LEAKS DETECTED: 17 allocations unfreed (1528 bytes)
D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0xa to debug
The program '[5864] RenderingTask.exe: Native' has exited with code 0 (0x0).

As you can see, the driver does not like the index buffer:
"Direct3D9: (INFO) :Failed to create driver indexbuffer"

After that, no apparent error located but a memory leak (still didn't find where it came from)

Share this post


Link to post
Share on other sites
Google search suggests the error 'Direct3D9: (INFO) :Failed to create driver indexbuffer' might signify the driver failed to create a hardware index buffer. I notice you've selected HW vertex processing. Could you try changing that and see if your rendering task works?

Share this post


Link to post
Share on other sites
Yes, I also googled this message, and found similar topics, quite all saying that I don't have to matter this :S

Already tried Sw VP and mixed VP, no differences... it seems that direct3D automatically set the index buffer in central memory, PIX giving me a good index buffer...

and as already said, the vertex shader properly handles the vertices...

WTH is going on ??

This may be a general issue in my programming methods, because quite all of my developments don't work with ATI (only my screen saver works !)

Share this post


Link to post
Share on other sites
I do not know the reason, but please consider testing your application on the Intel GPU for having complete knowledge.

Share this post


Link to post
Share on other sites
I'm sorry, I don't have any intel integrated GPU to test the application :(

perhaps :

Is there a difference between DrawIndexedPrimitive and DrawIndexedPrimitiveUP ?
It seems that the D3DXMesh interface uses the second call to draw the subsets, but I personally use the first version for my rendering task (for optimization reasons)

Share this post


Link to post
Share on other sites
I had a bug in the index buffer creation at the beginning (memory overflow), but it has been solved some time ago (before that, the application directly crashed when running on ATI/AMD runtime...).

Here is my index buffer creation and filling code:

[source lang="cpp"] /*... creating streams... */

m_pDevice->CreateIndexBuffer(sizeof(short) * 12 * 3, D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &m_pIndices, NULL); // 12 faces, 3 vertices

/*... filling streams... */

m_pIndices->Lock(0, sizeof(short) * 12 * 3, (void **)&pIData, 0);
for (cpt = 0; cpt < 12 * 3; ++cpt)
{
pIData[cpt] = ((short *)skCubeIndexStream)[cpt];
}
m_pIndices->Unlock();[/source]

Then, here is my "skCybeIndexStream" variable contents :

[source lang="cpp"]// the index stream
// 12 faces of 3 vertices each
short const skCubeIndexStream[12][3] =
{
/* vert1 vert2 vert3 */
{ 0, 1, 2, },
{ 2, 3, 0, },
{ 4, 5, 6, },
{ 6, 7, 4, },

{ 8, 9, 10, },
{ 10, 11, 8, },
{ 12, 13, 14, },
{ 14, 15, 12, },

{ 16, 17, 18, },
{ 18, 19, 16, },
{ 20, 21, 22, },
{ 22, 23, 20, }
};[/source]


And finally, my device creation code (we never know...)

[source lang="cpp"] // locals
unsigned int cpt; // looper variable
unsigned int nbAdapters; // number of available adapterss
D3DCAPS9 caps; // current device caps
D3DPRESENT_PARAMETERS params; // params to give to device creation
unsigned int retCode; // device creation return code

// here, we construct the main D3D9 object, and then try to create the device
m_pObject = Direct3DCreate9(D3D_SDK_VERSION);
if (!m_pObject)
{
MessageBox(window, L"Failed to create the Direct3D 9 main object", L"error", MB_OK);
}

// now, prepare the device creation
// the first step is to parse all devices and find the first that matches the Shader model 3.0
nbAdapters = m_pObject->GetAdapterCount();

for (cpt = 0; cpt < nbAdapters; ++cpt)
{
// get device caps (as HAL device for each one)
m_pObject->GetDeviceCaps(cpt, D3DDEVTYPE_HAL, &caps);

if (((caps.VertexShaderVersion & 0xFF00) >> 8) >= 3 &&
((caps.PixelShaderVersion & 0xFF00) >> 8) >= 3)
break; // compatible with shader model 3.0 (we assume then that the other needed caps are here, because more ancient)
}

//cpt = 1; // for ATI

// if no device is avaiable
if (cpt == nbAdapters)
{
MessageBox(window, L"Failed to initialize Direct3D engine : no shader model 3.0 compatible hardware found.", L"Error", MB_OK);
return false;
}

// prepare the structure for device creation
params.AutoDepthStencilFormat = D3DFMT_D16; // no need of stencil buffer
params.BackBufferCount = 1;
params.BackBufferFormat = D3DFMT_A8R8G8B8;
params.BackBufferHeight = height;
params.BackBufferWidth = width;
params.EnableAutoDepthStencil = true;
params.Flags = 0;
params.FullScreen_RefreshRateInHz = 0;
params.hDeviceWindow = window;
params.MultiSampleQuality = 0;
params.MultiSampleType = D3DMULTISAMPLE_NONE;
params.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
params.SwapEffect = D3DSWAPEFFECT_DISCARD;
params.Windowed = true;

// finally, try to create the device
if (FAILED(retCode = m_pObject->CreateDevice(cpt, D3DDEVTYPE_HAL, window, D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING, &params, &m_pDevice)))
{
switch(retCode)
{
case D3DERR_DEVICELOST:
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : device lost", L"Error", MB_OK);
break;
case D3DERR_INVALIDCALL:
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : invalid call", L"Error", MB_OK);
break;
case D3DERR_NOTAVAILABLE:
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : device not available", L"Error", MB_OK);
break;
case D3DERR_OUTOFVIDEOMEMORY:
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : out of video memory !", L"Error", MB_OK);
break;
}
return false;
}[/source]

Hope this will give ideas ^^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!