Jump to content

  • Log In with Google      Sign In   
  • Create Account


UpdateSubresource usage


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Deortuka   Members   -  Reputation: 493

Like
0Likes
Like

Posted 27 November 2012 - 12:40 PM

I am using Chromium Embedded Framework (CEF1) to run my user interface. I have a 2D texture, it's size matching the screen resolution, that will be updated at a constant rate (30 times per second) regardless of framerate. I will then render a quad on top of the scene with this "interface texture". From the reading and research I have done, UpdateSubresource is what I should use to accomplish this.

This is the function that is called when it is time to update the interface data:
void OnPaint(CefRefPtr<CefBrowser> Browser, PaintElementType Type, const RectList&amp; DirtyRects, const void* pBuffer)

pBuffer is the entire updated image data. DirtyRects is a list of the pixels that have changed since the last call to this function.

Is it wise to make multiple calls to UpdateSubresource() per update to change just the DirtyRects, or should I just make one call to UpdateSubresource() and update the entire texture with pBuffer? Would Map/Unmap be a better option for handling the DirtyRects option?

I ask this because the size of the list of DirtyRects will obviously vary widely per call. Thanks in advance.

Edited by Deortuka, 27 November 2012 - 12:43 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS