Archived

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

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

Recommended Posts

Share on other sites
quote:
Original post by Beserkerfork
I turn the PS on, and map my texture, then turn it off. Then I turn the VS on, draw my happy little box, and turn it off. And the problem that I am facing is that my box that I''ve drawn with my vertex shader is TOTALLY black- only a sillouhette.

The above is a tad confusing. Can you post some pseudocode of what you''re doing? Do you mean:
EnablePS();dev->SetTexture( blah );DisablePS();...EnableVS();dev->Draw*Primitive*( blah );DisableVS();

If that''s what you have, then that''s your problem, D3D doesn''t quite work that way - it isn''t blocking/synchronous - what you pass in to the Set* calls is simply flagged until Draw* time - that''s when things actually start happening.

You should have something like:
EnableVS();EnablePS();dev->SetTexture( blah );dev->Draw*Primitive*( blah );DisablePS();DisableVS();

The two Disables are also unnecessary.

If that isn''t the problem, try using the DEBUG D3D runtimes with the level slider up high and see if D3D tells you anything in the debug output.

Additionally try a ValidateDevice() call immediately before you Draw* to see if the driver is unhappy over something in your pipeline setup.

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

Share on other sites
Thanks, you had the idea right- and how I was trying to work the shaders was incorrect.

I think more of the problem was involved with me not wanting to actually tackle the two together yet... and so I tried to get one at a time.

So your response was helpful, thank you- mostly due to the fact that you stated what I didn''t want to hear... "you can''t slack your way past this one". And so, with a lot of effort on it this morning I made huge steps of progress combining the two shaders together with success (for the moment).

So crisis averted! Thanks!

• Forum Statistics

• Total Topics
628653
• Total Posts
2984054

• 10
• 9
• 9
• 10
• 21