psychopy.tools.gltools.createRenderbuffer

psychopy.tools.gltools.createRenderbuffer(width, height, internalFormat=32856, samples=1)[source]

Create a new Renderbuffer Object with a specified internal format. A multisample storage buffer is created if samples > 1.

Renderbuffers contain image data and are optimized for use as render targets. See https://www.khronos.org/opengl/wiki/Renderbuffer_Object for more information.

Parameters
  • width (int) – Buffer width in pixels.

  • height (int) – Buffer height in pixels.

  • internalFormat (int) – Format for renderbuffer data (e.g. GL_RGBA8, GL_DEPTH24_STENCIL8).

  • samples (int) – Number of samples for multi-sampling, should be >1 and power-of-two. Work with one sample, but will raise a warning.

Returns

A descriptor of the created renderbuffer.

Return type

Renderbuffer

Notes

The ‘userData’ field of the returned descriptor is a dictionary that can be used to store arbitrary data associated with the buffer.


Back to top