• Advertisement

Archived

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

D3D in a Window Problem, please help

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

Ok, here''s the situation. I have a windowed application that uses Direct3D. When ever I move the window I get a strange tracing effect, like it doesn''t clear the viewport. Which is odd because at the beginning of the render function I have included a call to g_pD3DDevice->Clear(0,NULL, D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET,0,0.0f,0); and when I minimize the window the 3d is still there on the desktop ?? Is there a way to lock it to the window that I have forgotten, sorry for the rambling i''m kind of frustrated. Any suggestion would be greatly appreciated Prairie

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Doesn''t answer your question, but clearing the z buffer to 0.0F is not really a good idea if you want to render anything with it - better to set it to 1.0F

g_pD3DDevice->Clear(0,NULL, D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET,0,0.0f,0);



Share this post


Link to post
Share on other sites
in the SDK check out mssdk/samples/multimedia/D3DIM/tutorials/drawprims..there''s a basic app that uses windowed mode, and there''s not a bunch of extra files and crap with this one..should give you a basic framework to use for all windowed D3D apps..sorry I can''t give you specifics, I had the same problem and just ripped the code out of that example..I try to avoid using other people''s code, but this is pretty barebones..I went nuts trying to find an example app that used windowed mode that DIDN''T have 2000 extra files that came with it, and this is the first one I found..


"Like all good things, it starts with a monkey.."

Share this post


Link to post
Share on other sites

  • Advertisement