What is the difference between CreateCompatibleRenderTarget and CreateHwndRenderTarget

StackOverflow https://stackoverflow.com/questions/18965221

  •  29-06-2022
  •  | 
  •  

سؤال

I am just confused about the difference since, we can just make a bitmap the size of the window and then draw the image onto the window?

هل كانت مفيدة؟

المحلول

The difference is in the name: CreateCompatibleRenderTarget does just that in that it creates a render target that is compatible with the current display settings. CreateHwndRenderTarget conversely creates a RT that simply renders to a window. So it is not set up the same way as the compatible target.

What is a render target?

Even though that talks about XNA, most of the primitive information there is agnostic of even DirectX and simply discusses the idea of a render target.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top