Handling Opengl error Out of memory

by the way, may i ask does VTK support Vulkan now?

No, VTK does not use Vulkan.

In general, Vulkan lets us probe the amount of memory available and many interesting limits of the GPU. In fact, vkAllocateMemory returns VK_ERROR_TOO_MANY_OBJECTS when trying to allocate larger than the limit VkPhysicalDeviceMaintenance3Properties::maxMemoryAllocationSize. This way, applications can know the system configuration at run time and prefer lower memory code paths. As a result, systems with higher limits and processing power do not need to waste cycles loading low resolution and then switch up to high resolution.

Unfortunately, there is no concept of a physical device in OpenGL. So you’re left to emulate a physical device backed by an OpenGL buffer as it’s ‘memory’ and use that through out OpenGL. It’s easier to just use Vulkan or webgpu in VTK instead of resorting to such tricks.

If you’re interested in this solution for a project, or just discuss about it, feel free to contact us for professional support.

1 Like