Archived

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

force DirectX to render in wirefrime.

This topic is 5654 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, Does anyone know if it is possible to force some program I did not write to render in wireframe mode? I''d like to see how they did some things, and seeing that application in wireframe mode would help a lot. Is there a way I can do a hostile takeover on a directx app, and have it only render wireframes? Thanks, Lucas

Share this post


Link to post
Share on other sites
in their initializing d3d function, add at the bottom:
D3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
I think that does it

Share this post


Link to post
Share on other sites
You are also not restricted to one rendering mode in an app. You can switch between them in your render functions according to user input or whatever. Look up D3DFILLMODE in the SDK for all the possible modes.

Share this post


Link to post
Share on other sites
quote:
Original post by LucasMeijer
Is there a way I can do a hostile takeover on a directx app, and have it only render wireframes?


Assuming you''re talking about a foreign app: I think it''s quite possible. You just have to wrap Direct3D a bit. Here''s the plan:

Create new d3d8.dll. it should export Direct3DCreate8, that returns your own implementation of IDirect3D8. Your implementation will just call "real" IDirect3D8 methods, except for CreateDevice. CreateDevice will again return your implementation of IDirect3DDevice8 interface.

Again, you will just call the real IDirect3DDevice8 methods, except for SetRenderState. When the device is created, call SetRenderState with FILLMODE set to WIREFRAME and ignore all subsequent SetRenderState calls that are attempting to change FILLMODE.

Need more details?

Share this post


Link to post
Share on other sites
Doh. Sorry about that...I guess I misunderstood our problem. I hope the mind of IndirectX helped you out.

*proceeds on a shameless post deleting rampage*

Share this post


Link to post
Share on other sites