-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hello,
I recently ran into some severe performance problems, especially having OpenGL sketches with a big resolution (e.g. 3840 x 1080 pixels). The sketches are fairly simple (no offscreen drawing / FBOs, but still performance suffers severely. I am using the most recent version from git (1fcd354). Even for simple sketches, the GPU memory usage spiked to over 500 megabytes (just by running the sketch) with not much in it. After some investigation, I suspect two circumstances:
Too many render buffers
The sketch is initalized with size(3840, 1080, OPENGL); smooth(4);
in setup(). There is no change in size or multisampling during the execution.
As for the render buffers I have the following associated with my processing sketch:
- GL_DEPTH24_STENCIL_8 (1440x860 pixels)
- GL_DEPTH24_STENCIL_8 (1440x860 pixels)
- GL_RGBA8 (1440x860 pixels @4samples)
- GL_DEPTH24_STENCIL_8 (1440x860 pixels @4samples)
- GL_DEPTH_COMPONENT24
It seems like 3 and 4 are the buffers actually used, the others contain garbage and do not change.
Too many allocated textures
There also seem to be too many textures used by the main renderer.
There are four textures containing the (same) rendered image at all times (GL_TEXTURE_2D) and eight textures with no visible content (maybe it's just Apple's OpenGL Profiler), that also have the size of the sketch.
I hope that those hints are somehow useful for eliminating some performance problems in Processing.
Best,
Benjamin