Archived

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

Most strange problem with D3D

This topic is 5143 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

Hello everyone. I had the following problem, which is the most strange one I ever meet in D3D. I have some 3D code for graphics running. Usual stuff: clear, beginscene, set states, set textures, etc, drawprimitive, endscene, present. Everything works fine. But... if I insert between beginscene/endscene anywhere SetRenderState( filltype, wireframe ) the output becomes garbage, there are displayed on screen lines ( which seems to be proportional in number with the actual number of triangles to draw ), but those lines are random on screen, usually over entire screen and the coloring is garbage also on the lines. Some times it even crhases. I added a key to turn switch fill mode solid/wireframe and it works fine for solid but bad for wireframe. So, I''m lost. I compiled a D3D tutorial and there it works for wireframe. Has anyone have any ideas ? Thanks alot. Pet.

Share this post


Link to post
Share on other sites
1) Use the DEBUG D3D runtime and turn up the output level slider for D3D in the DirectX control panel applet.


2) Run your app in the debugger and check if you get any errors, first chance exceptions or debug assertions in your output. If you''ve done something bad you''ll be told in there.


3) Next try changing your device creation from the HAL device to the REF device (you may need to enable it in the DirectX control panel applet). See if it works there - and check the debug output again.

a. If it works with REF, it could hint that your hardware either doesn''t support something you''re attempting or the drivers for your hardware are broken.

b. If it doesn''t work with REF (same problem or different problem), then something is wrong in your code - double check the debug output.

c. If you suspect a driver problem, try: the latest gfx card drivers, then the latest WHQL certified drivers, then some older drivers - see if the problem changes.

d. If the drivers still seem to be at fault - try modifying an SDK sample to get the problem to happen - you may need to make it much more like your app than you are so far - once you have code that demonstrates the problem: contact the card manufacturer and directx@microsoft.com in case you''ve found a bug


4)
a. Unfortunately line support isn''t very good on many graphics card drivers. Wireframe fillmode support is even worse!!

b. In the past I''ve experienced a problem on one driver where you could toggle between wireframe and solid fillmode exactly ONCE - otherwise it would choose one or the other.


5)
a. What polygons are you rendering? - are they D3DFVF_XYZRHW/screenspace?, are they all on-screen?

b. What do you have D3DRS_CLIPPING set to?, if its TRUE, make sure your viewport and projection matrix are sensible for what you''re rendering.

c. Rendered output that blows up into a list of garbage polygons often hints at issues with clipping or vertex and index buffers (and flags for calls involving them).

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
Thanks for info S1CA.
To some points: all points are inside view frushroom; fixed transform pipeline; custom vertex format like XYZ and color; all D3D calls return D3D_OK;

I''ll give REF a try;
Thanks,
Pet.

Share this post


Link to post
Share on other sites
Well, on REF device it works.
I tested with HALL in DX8.1 and DX9.0.
In debug mode, no DX error, only warnings about redundant state changes.
Anyway, I assume it''s a driver/ videocard problem as I have another problem with stencil buffers, but that one is fixed if I change the driver.
So, I suppose that a Radeon 7000 (pretty old) is not DX8 compatible (I''m using DX8 interfaces).

Thanks anyway,
Petru.

Share this post


Link to post
Share on other sites