Skip to content

many extra render buffers & textures w/ even simple sketches on OS X #1776

@allesblinkt

Description

@allesblinkt

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:

  1. GL_DEPTH24_STENCIL_8 (1440x860 pixels)
  2. GL_DEPTH24_STENCIL_8 (1440x860 pixels)
  3. GL_RGBA8 (1440x860 pixels @4samples)
  4. GL_DEPTH24_STENCIL_8 (1440x860 pixels @4samples)
  5. GL_DEPTH_COMPONENT24

It seems like 3 and 4 are the buffers actually used, the others contain garbage and do not change.

screen shot 2013-05-17 at 23 56 35

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.

screen shot 2013-05-18 at 00 07 38

I hope that those hints are somehow useful for eliminating some performance problems in Processing.

Best,

Benjamin

Metadata

Metadata

Assignees

Labels

highWe'd like to fix this as soon as possiblemacosxopengl

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions