Archived

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

SpiralGuru3d

Move to DX8.1 SDK - Blackout

Recommended Posts

Hey guys I''ve just moved to the DX8.1 SDK and now have a nasty problem. I thought I''d throw it to the boards and see if anybody can help me out before I spend too long hunting for it... :O) --- Since moving to 8.1, switching to fullscreen (or back) or resizing the window when windowed...(this means, when I Reset() the device)...untransformed geometry blacks out! The textures aren''t lost, I can use the same ones for HUD icons (transformed geometry) and they''re fine. Diffuse...well...without cycling through the vertex buffers and checking, I''d say its unlikely...the geometry is managed, or even when I force it to system memory, so it''s not device dependant and doesn''t need re-creating. The Reset() doesn''t fail. So, if anybody has *seen* this when they moved to 8.1...give me a shout! Oh, and it''s not drivers, I''ve rolled back and tried three versions. Thanks guys! :O) -Spiral

Share this post


Link to post
Share on other sites
Additionally, lines black-out...which proves something actually...hmm...I mean, they just have a diffuse don''t they?

How the heck is the diffuse component getting zeroed out...

Texture stage states now then... :O(

Suggestions still appreciated!

-Spiral

Share this post


Link to post
Share on other sites
OK...more leads...hope this is of use to somebody searching the forums at some point!

---

I''ve just tried re-creating all the indexed geometry after resetting the device...and it doesn''t help! CAN YOU BELIEVE IT! So, basically, after I reset the device, *any* geometry I draw with DrawIndexedPrimitve(...) comes out black all over!

I''m going to go and look for changes in the Reset() procedure new to 8.1 now...and if I find anything, I''ll post it up.

-Spiral

Share this post


Link to post
Share on other sites
FIXED! :O)

For some reason, back in 8.0a, I was getting away with not calling one-off render states (culprit, D3DRS_LIGHTING) after resetting the device.

Now I do that, disable D3D''s lighting pipeline in favour of my own...and my geometry is back.

No innocuous "it''s an indexed primitive" bug...the vertices that were blacking out were:

FLOAT x, y, z;
DWORD Diffuse;
FLOAT u, v;
FVF_XYZ | FVF_DIFFUSE | FVF_TEX1

The ones that were not:

FLOAT x, y, z, w;
DWORD Diffuse;
FLOAT u, v;
FVF_XYZRHW | FVF_DIFFUSE | FVF_TEX1

So, maybe I got off lightly with a bug in the older version...retaining those render-states...but all is ok now!

DOH! I feel really rather silly!

-Spiral

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
That was great... you posted a question, and then worked through it and fixed it before anyone else said a thing!

Share this post


Link to post
Share on other sites