How to get a screenshot without drawing the object?

Started by
3 comments, last by yulair 19 years, 10 months ago
I want to generate the screenshot of a set of .x models, but I do not want to use the D3DDevice to draw''em on screen. Any one got the idea, thanks!
Doing the right thing ain''t doing the right thing!
Advertisement
You''ll find it tough.

If you did use Direct3D to do it, you could just use D3DX to load it, render it to a texture, and then save out that texture.

If you''re not, you''ll have to write your own .X file loader and renderer.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

You could use a modeling program, such as 3D Studio or Truespace. Or you could write it in OpenGL.

Chris
Chris ByersMicrosoft DirectX MVP - 2005
You could always create the device, but indicate that you want it in windowed mode, and pass it a handle to a window that is hidden. Then you can use the device to render to a texture, as superpig suggested. So although you technically do have a device and a window and everything, it doesn''t really look like it. You won''t have to worry about mode-changes, unnecessary windows popping up, etc. Or at least, I would think that this should theoretically work...
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
SetRenderTarget() to a surface -> Save surface.

--
You''re Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net''s DirectX FAQ. (not as cool as the Graphics and Theory FAQ)

This topic is closed to new replies.

Advertisement