Method GL.GLSLUtils.RenderBuffer()->create()


Method create

GL.GLSLUtils.RenderBuffer GL.GLSLUtils.RenderBuffer(int w, int h, int type, bool depth, bool mipmap, bool alpha, int|void internal_format, int|void format)

Description

Create a new render buffer, with the size given by w and h, the texture target will be type (generally speaking GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB, the latter is needed if the size is not a power of two. This is not checked by the create function)

depth mipmap and alpha specifies if the corresponding extra buffers should be created. mipmap is not supported for GL_TEXTURE_RECTANGLE_ARB

If w or h is 0, the actual texture creation is postponed until resize is called. The buffer will not be valid before it has a size.

If internal_format and format are specified they are used to override the defaults (GL_RGB[A]16F_ARB and GL_RGB[A] respectively)

Setting these also makes the buffer ignore the alpha paramenter.

The mipmap parameter depends on the existance of the glGenerateMipmapEXT extension.