Jump to content
  • Advertisement
Sign in to follow this  

[SlimDX] - Direct2D Off-screen rendering

This topic is 3152 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 there, I am pretty new to DirectX and SlimDX and trying with the Sample code provided with the SlimDX. I am trying to render couple of polygons using Direct2D in off-screen mode and stream out the image imagerated. My question is, Is there anyway I can get the byte array of the image rendered from the Target so that I can encode and stream out the image. I am able to do this using Windows API Pack and Windows Image Component. Since our other projects are using SlimDX I would like to stick to it. Below is the part of the code I am trying.
 protected override void OnRender()

            BitmapRenderTarget bmpTarget = Context2D.RenderTarget.CreateCompatibleRenderTarget();
            foreach (var geometry in _geometryList)
                bmpTarget.FillGeometry(geometry, _brush);


            //How do I get the byte array from bmpTarget and Endcode into a png image.

Thanks in advance.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!