vstgui
vstgui copied to clipboard
Add support for large bitmaps with GPU rendering on Direct2D backend
Current Direct2D / DirectComposition backend implementation has a pixel limit of 16384x16384. Bitmaps which exceed this limit in one or more dimensions won't be drawn at all. This is an issue in views / controls inheriting from IMultiBitmapContol (e.g. CAnimKnob). We discussed adding an optional two dimensional arrangement of the sub-bitmap in order to work around that.
See here for further details: https://forums.steinberg.net/t/issues-with-large-bitmaps-on-windows-using-vstgui-4-10/790601
Hey @raygit83, I've made a prototype to fix this issue. Please see the multi-frame-bitmap branch and tell me if this would work for you this way, or if something is missing. Thanks.
Hey @scheffle, great work. Thanks for the quick update. I think the implementation for CMovieBitmap is missing and perhaps some other views or controls we're not using currently (?).
Two remarks, though:
- From a design perspective I think the code paths for the CBitmap case should be deprecated at some point because right now a lot of redundant implementation resides in the view/control code, while the rest is encapsulated in CMultiFrameBitmap. The latter provides all the functionality that CBitmap did up to that point, so CBitmap becomes a special case of CMultiFrameBitmap. This could be enforced by changing the API (ctor's, setBackground() and so forth) to expect a CMultiFrameBitmap instead of CBitmap.
- We're using a view's backOffset for various things in our code. I wonder why setBackOffset() has been removed at some point. Would it be feasible to add setBackOffset() for all view's that use a background bitmap and honor backOffset in the draw code?
Thanks again!
Hi @raygit83, for the backOffset stuff, can you please create a new issue? It makes it easier to track this different thing. And you are right, the current state is not the final one, I just wanted to hear if this is an approach you can work with. The plan is to get rid of IMutliBitmapControl and use the new bitmap class instead.
@scheffle alright, awesome. I'll look out for the final integration of CMultiFrameBitmap and file a new issue regarding the backOffset. Thanks again!
This is now part of VSTGUI 4.12