Currently, we have to use a dense 3D texture to render volumes in the viewport. The resolution of this texture is limited by GL_MAX_3D_TEXTURE_SIZE.
At the moment, Blender crashes when trying to render a volume that exceeds this limit. This patch adds some simple error checking to avoid the crash.
Users can quickly find their max resolution with this script:
import bgl buffer = bgl.Buffer(bgl.GL_INT, 1) bgl.glGetIntegerv(bgl.GL_MAX_3D_TEXTURE_SIZE, buffer) max_size = buffer[0] print(max_size)
This test file contains the above script and a simple setup that generates a very long but thin volume, which will trigger the error. The volume is generated using the Mesh to Volume modifier.
I'm not sure what's the correct way to report such errors to the user.