I’m getting an assertion when calling juce::ImageCache::getFromMemory() with a large filmstrip file.
The filmstrip file is pretty big, 19200 pixels high and I’m getting the following assertion
#if JUCE_DEBUG
// Verify that the GPU can handle a bitmap of this size
//
// If you need a bitmap larger than this, you'll need to either split it up into multiple bitmaps
// or use a software image (see SoftwareImageType).
auto maxBitmapSize = deviceContext->GetMaximumBitmapSize();
jassert (size.width <= maxBitmapSize && size.height <= maxBitmapSize);
#endif
We run into the same issue. We have lots of bitmaps organized as filmstrips and their are all too large. I tried to find out, how I could fall back to using the software renderer, but that does not fix this issue, as the bitmap loading isn’t related to the window renderer. Is there a switch to avoid Direct2D entirely ?
Each GPU has a maximum texture size that in turn limits the size of a Direct2D bitmap. I believe the JUCE team is working on an update that supports using multiple Direct2D bitmaps for a single JUCE Image.