Jump to content
  • Advertisement
Sign in to follow this  
Anton11

Loading images from disk and drawing them to Direct2D resource

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

Hello,

 

I am writing an application using DirectX11 Direct2D, part of which is loading and drawing sequence of image files in realtime (video overlay). The size of these image files vary (100x100 ~ 2000x2000 x RGBA). There will be optiziations, preloading(prebuffering) logic, but I want to understand what is the proper/best practice/method to do this.

 

Here is the current workflow, I follow:

  1. Load file with WIC,

  2. Convert to PBGRA bitmap (optional),  

  3. Lock the WIC pixels,

  4. Create D2D1Bitmap using this pixel data

 

However, this seems to be a slow procedure. It bottlenecks at point #4 - transfering pixel data to the VRAM. So I am looknig for a faster way (ie - what is the fastest one). 

 

So, is there a way to load image, in a form of texture, or other way, directly as a DirectX resource, so I can minimize the time for the whole process/iteration ?

 

Thanks in advance

Best Regards

Share this post


Link to post
Share on other sites
Advertisement
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!