Class WGLARBRenderTexture


  • public class WGLARBRenderTexture
    extends java.lang.Object
    Native bindings to the WGL_ARB_render_texture extension.

    This extension allows a color buffer to be used for both rendering and texturing. When a color buffer is bound to a texture target it cannot be rendered to. Once it has been released from the texture it can be rendered to once again.

    This extension may provide a performance boost and reduce memory requirements on architectures that support rendering to the same memory where textures reside and in the same memory format and layout required by texturing. The functionality is similar to CopyTexImage1D and CopyTexImage2D. However, some changes were made to make it easier to avoid copying data:

    • Only color buffers of a pbuffer can be bound as a texture. It is not possible to use the color buffer of a window as a texture.
    • The texture internal format is determined when the color buffer is associated with the texture, guaranteeing that the color buffer format is equivalent to the texture internal format.
    • When a color buffer of a pbuffer is being used as a texture, the pbuffer can not be used for rendering; this makes it easier for implementations to avoid a copy of the image since the semantics of the pointer swap are clear.
    • The application must release the color buffer from the texture before it can render to the pbuffer again. When the color buffer is bound as a texture, draw and read operations on the pbuffer are undefined.
    • A mipmap attribute can be set, in which case memory will be allocated up front for mipmaps. The application can render the mipmap images or, if SGIS_generate_mipmap is supported, they can be automatically generated when the color buffer is bound as a texture.
    • A texture target is associated with the pbuffer, so that cubemap images can be rendered into a single color buffer.

    Requires WGL_ARB_extensions_string, WGL_ARB_pixel_format, WGL_ARB_pbuffer.