Jump to content
  • Advertisement

Archived

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

stupidkid

directx with and without display

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

hiya (bit new here, so please be patient). i need to use directx to render a view of a 3d environment, but i don''t actually need to see the results, just have access to the output bytes. at the moment, i can create a basic environment and display a view of it in a window, ok, that''s good. i can then (crudest of the crude now) extract the color values of each pixel in turn and copy them into a buffer and perform further processing. but... i would like to create a direct3d swapchain (or device) independently of any existing window (in an ideal world, i would then be able to attach and detach a window on the fly to acttually see what was being rendered, but i could always create a parallel swapchain to do this and render the view twice). then, i''d like to have direct memory access to the rendered view bytes to perform my further processing. finally, i''d like to do this without any overhead due to directx expecting to render into a displayed window. so, anybody know exactly what i''m looking for? no? ok, anyone got any ideas what i might try? thanks, sk

Share this post


Link to post
Share on other sites
Advertisement
1) You can CreateAdditionalSwapChain whenever you need to (you may have issues with managed resources, but it sounds like you won''t need them).

2) A window doesn''t need to be visible for DirectX to render to it _in windowed mode_ IIRC.

3a) SetRenderTarget() could be VERY handy - i.e. do the rendering to a texture, then if you need to show what''s being rendered, just apply that texture to a polygon and display it. You can also lock textures to access the individual pixels.

3b) Though if you lock the individual pixels you need to bear in mind that it will stall the render until you unlock (I''m assuming this isn''t for strictly realtime purposes anyway otherwise I''d be advising other strategies).

4) If you''re after some sort of progressive update display (like in 3DS Max if you ask it to render a complex scene and you see a per scanline update), then forget about it since D3D only displays the scene when you do a Present(). [Or Flip()/Blt() in <=DX7]

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!