Archived

This topic is now archived and is closed to further replies.

DirectX8 - DrawPrimitiveUP error

This topic is 4945 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, Currently I am testing a freeware engine made in VB6 with DX8 for a friend of mine, and I have run into a problem. Every time the engine tries to render a 2D TRI_STRIP (just a square for a sprite) to the display: Direct3DDevice.DrawPrimitiveUP D3DPT_TRIANGLESTRIP, 2, TextureStrip(0), Len(TextureStrip(0)) I get an automation error (not that that helps...). The only possible error you can get (according to the SDK docs) is a "bad parameter passed...". I have searched all the code, and I could not find the problem. Also, many other people have tried the engine with no problem, so it must be something hardware specific on mine... If anyone has had a similar problem, please help me out. Thanks. My specs are: 500 MHz Pentium III 64MB Radeon 9200 SE AGP 256 MB SDRAM Windows XP Pro DX 9.0b VS 6 Pro and VS .NET academic [edited by - Sr_Guapo on May 30, 2004 12:55:42 AM]

Share this post


Link to post
Share on other sites
1) Make sure you are using the Debug Direct3D runtimes. You''ll find details at: http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10#debugging


2) Run a debug output viewer such as dbmon.exe from the DirectX SDK or DebugView from www.sysinternals.com


3) Run your program, Direct3D will output a more descriptive reason for the error to the viewer, often including details of "which" parameter is wrong and why.


Simon O''Connor
Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
quote:
Original post by S1CA
1) Make sure you are using the Debug Direct3D runtimes. You''ll find details at: http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10#debugging


2) Run a debug output viewer such as dbmon.exe from the DirectX SDK or DebugView from www.sysinternals.com


3) Run your program, Direct3D will output a more descriptive reason for the error to the viewer, often including details of "which" parameter is wrong and why.


Simon O''Connor
Game Programmer &
Microsoft DirectX MVP


Dear Mr.O''Connor,

I want to contact you.
Could you tell me your email address?


Sungkwan Park
My Email : skpark@softweb.co.kr
My MSN Messenger : sungkwanpark@hotmail.com
My Phone : +82-11-256-9917

Share this post


Link to post
Share on other sites
Mr Sungkwan Park,

I have now emailed you in response to your enquiry and provided details of why an immediate answer hasn't been possible.

Thanks,
Simon.

[mods: someone could do with cleaning off the personal messages in these posts now, cheers]

[edited by - s1ca on May 31, 2004 2:09:03 PM]

Share this post


Link to post
Share on other sites
Okay, I ran dbmon during this program... I got a whole mess of warnings and a few errors:

2196: Direct3D8: (ERROR) :*** Exception in d:\builds\nt32_chk\multimedia\directx\dxg\d3d8\fe\vshader.cpp Line: 666 (coincedence?)

2196: Direct3D8: (ERROR) :Stream 0 stride should match stride, implied by the current vertex shader

2196: Direct3D8: (ERROR) :DrawPrimitiveUP failed (really?!?!)

2196: Direct3D8: (ERROR) :Unsupported Interface identifier passed to QueryInterface for IDirect3DDevice8
2196: Direct3D8: (ERROR) :Unsupported Interface identifier passed to QueryInterface for IDirect3DDevice8


Alot of this made little sense to me. Is it saying that my vertex shader is messed up? Is that even possible?

[edited by - Sr_Guapo on May 31, 2004 2:34:20 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Sr_Guapo
2196: Direct3D8: (ERROR) :Stream 0 stride should match stride, implied by the current vertex shader


The stride is the offset you need to go from one element in the array to the next, which is typically the same as the size of a single element. You seem to be passing that in properly.

Are you calling SetFVF with the proper FVF?



Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
All that is fine... It has worked on many other computers, including my slightly better one (PIV @ 2.4 GHz, 128 MB Radeon 9700). I can't imagine that something like that would work on other computers, but not this one... I think it might have something to do with the problems I had installing DX9, though the engine is written with DX8...

[edited by - Sr_Guapo on May 31, 2004 2:58:10 PM]

Share this post


Link to post
Share on other sites
Please, I can't be the only one who has had this error!!! Any comments are greatly appretiated.

[edited by - Sr_Guapo on May 31, 2004 12:35:10 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Sr_Guapo
All that is fine... It has worked on many other computers, including my slightly better one (PIV @ 2.4 GHz, 128 MB Radeon 9700). I can''t imagine that something like that would work on other computers, but not this one... I think it might have something to do with the problems I had installing DX9, though the engine is written with DX8...



The fact that Direct3D is producing an error with the debug D3D runtimes means there IS a bug that needs fixing, even if it doesn''t show up on the other computers!.

If the other computers are using the retail Direct3D runtimes and the program isn''t being run in a debugger or the VB IDE, then it''s highly likely you won''t see the error message and instead the primitive you''re rendering just won''t show up -- (or in other cases the machine could crash).

In all cases where I have seen error messages similar to those you have posted, as DrunkenHyena suggested, the vertex format described by the FVF code that has been passed to SetFVF differs from the size/length of the actual data structure passed as the stride member.



Simon O''Connor
Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites