Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3D errors - confused

Started by d000hg Aug 2, 2002 at 9:56 AM 6 replies 450+ views
Original Post
d000hg
d000hg
I switched on the debugging from d3d, and got: Direct3D8: (WARN) :Mode''s width greater than monitor maximum width (1280) Direct3D8: (INFO) :Mode was never changed by this app Direct3D8: (INFO) :Failed to create driver indexbuffer Direct3D8: (INFO) :MemFini! I get the first two no matter whether I''m in windowed mode or explicity change the resolution in full-screen mode to 800x600 )I know the mode is set becuase it''s blockier than in 1024x768) Don''t get the second two at all. I also get the error: HWND not valid In fullscreen mode but I don''t know where this error occurs. Similarly, Texture->Release() causes D3D to break out of app, but only in fullscreen. All textures load as I can see them being displayed. What''s with this then - anywhere I can look up what these errors mean?
Read about my game, project #1 NEW (31st July): There is a new demo, demo #2 at my site. Please try it out.
John 3:16
siaspete
siaspete
Sounds like you''re not clearing the structures to zero before using them. You can use memset or the ZeroMemory macro for this.

Try putting a breakpoint in before you create your D3D device and check if the structures you use are valid.

"Failed to create driver indexbuffer" is common, and I''m not sure what causes it. I don''t think it affects your program in any big way, but maybe someone who knows more about this error can clarify.


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Evil Bill
Evil Bill
siaspete: Its nothing to do with zeroing structures.

Direct3D8: (WARN) :Mode''s width greater than monitor maximum width (1280)
Your Gfx card supports a display mode that the monitor doesn''t. Its nothing you need to worry about

Direct3D8: (INFO) :Mode was never changed by this app
The desktop screen mode was never changed by this app. If its a windowed app, then obviously this will be true. If its a fullscreen app then it means that the mode you set was the same as the desktop mode/

Direct3D8: (INFO) :Failed to create driver indexbuffer
You should also see something along the lines of "HAL Driver Style 7". Your Gfx driver doesn''t do index buffers in hardware, they''re kept in system memory. It just means that it''ll be slightly slower. This is because its a DX7 style driver (AFAIK)

Direct3D8: (INFO) :MemFini!
Direct3D has finished with all memory. You''ll see this when you release your IDirect3D8 interface if everything else has been cleaned up properly.

HWND not valid
Check that youve created your window, that the HWND isn''t NULL, and that you''re passing it to CreateDevice().

I don''t know why that only happens in fulslcreen, and i don''t know about the last error.

HTH anyway, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)
S1CA
S1CA
Yup, in full agreement with Steve (Evil Bill) there, though a couple of things to add:

- if the "HWND not valid" message appears when you''re shutting down the application, then it''s likely you''re destroying the window BEFORE you release D3D. You must do it the other way round, always destroy D3D before the window. Avoid creating and destroying D3D/devices during WM_CREATE or WM_DESTROY.

- The break when you release will be beause you have some object leaks and you have the "break on memory leak" thing enabled in the D3D control panel. As a debug check, test the value returned from each Release() call - if any are 0, there is a leak of that resource (or one related to it). [Only ever do that check for debugging - never check against 0 for a release app]

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
niyaw
niyaw
quote:
Original post by S1CA
Avoid creating and destroying D3D/devices during WM_CREATE or WM_DESTROY.


can you elaborate on this bit? all code i''ve seen seems to put init and cleanup in those handlers.

---
Come to #directxdev IRC channel on AfterNET
Evil Bill
Evil Bill
Theres stuff about this int the SDK (Look at IDirect3D8::CreateDevice):
quote:

This method should not be executed during the handling of WM_CREATE. Therefore, the application should never pass a window handle to Direct3D while handling WM_CREATE. Microsoft® DirectX® 8.1 applications can expect messages to be sent to them during this call—that is, before this call is returned. Applications should take precautions not to call into Direct3D at this time. In addition, note that a call to create, release, or reset the device can only happen on the same thread as the window procedure of the focus window.


Theres nothing about WM_DESTROY in the SDK however, but i expect its the same kind of scenario.

[edit]
Damn format tags...
[/edit]

HTH, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates

[edited by - Evil Bill on August 2, 2002 7:58:20 PM]
Member of the Unban Mindwipe Society (UMWS)
thedo
thedo
quote:

Direct3D8: (INFO) :Failed to create driver indexbuffer
You should also see something along the lines of "HAL Driver Style 7". This is because its a DX7 style driver (AFAIK)



Are you sure - it says ths on my Geforce 4 (ti4200) in debug runtime?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

[edited by - thedo on August 3, 2002 2:33:17 PM]
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
S1CA
S1CA
Two cases where you''ll see that message:

1. DX7 DDI drivers, regardless of whether the chip does index buffers or not.

2. DX8 DDI drivers where the hardware or driver doesn''t support index buffers.


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.