Package org.lwjgl.opengl
Class WGLARBRenderTexture
- java.lang.Object
-
- org.lwjgl.opengl.WGLARBRenderTexture
-
public class WGLARBRenderTexture extends java.lang.ObjectNative 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.
-
-
Field Summary
Fields Modifier and Type Field and Description static intWGL_AUX0_ARB
WGL_AUX1_ARB
WGL_AUX2_ARB
WGL_AUX3_ARB
WGL_AUX4_ARB
WGL_AUX5_ARB
WGL_AUX6_ARB
WGL_AUX7_ARB
WGL_AUX8_ARB
WGL_AUX9_ARB
WGL_BACK_LEFT_ARB
WGL_BACK_RIGHT_ARBstatic intWGL_BIND_TO_TEXTURE_RGB_ARB
WGL_BIND_TO_TEXTURE_RGBA_ARBAccepted by theattributesparameter ofGetPixelFormatAttribivARB, and theattribIListparameters ofChoosePixelFormatARB.static intWGL_CUBE_MAP_FACE_ARBAccepted by theattribListparameter ofSetPbufferAttribARBand by theattributeparameter ofQueryPbufferARB.static intWGL_FRONT_LEFT_ARB
WGL_FRONT_RIGHT_ARBstatic intWGL_MIPMAP_LEVEL_ARBAccepted by theattribListparameter ofSetPbufferAttribARBand by theattributeparameter ofQueryPbufferARB.static intWGL_MIPMAP_TEXTURE_ARBAccepted by theattribListparameter ofCreatePbufferARBand by theattributeparameter ofQueryPbufferARB.static intWGL_NO_TEXTURE_ARBAccepted as a value in theattribListparameter ofCreatePbufferARBand returned in the value parameter ofQueryPbufferARBwhenattributeisTEXTURE_FORMAT_ARB.static intWGL_TEXTURE_1D_ARB
WGL_TEXTURE_2D_ARB
WGL_TEXTURE_CUBE_MAP_ARBAccepted as a value in theattribListparameter ofCreatePbufferARBand returned in the value parameter ofQueryPbufferARBwhenattributeisTEXTURE_TARGET_ARB.static intWGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARBAccepted as a value in theattribListparameter ofSetPbufferAttribARBand returned in the value parameter ofQueryPbufferARBwhenattributeisCUBE_MAP_FACE_ARB.static intWGL_TEXTURE_FORMAT_ARBAccepted by theattribListparameter ofCreatePbufferARBand by theattributeparameter ofQueryPbufferARB.static intWGL_TEXTURE_RGB_ARB
WGL_TEXTURE_RGBA_ARBAccepted as a value in theattribListparameter ofCreatePbufferARBand returned in the value parameter ofQueryPbufferARBwhenattributeisTEXTURE_FORMAT_ARB.static intWGL_TEXTURE_TARGET_ARBAccepted by theattribListparameter ofCreatePbufferARBand by theattributeparameter ofQueryPbufferARB.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleanwglBindTexImageARB(long pbuffer, int buffer)Defines a one-dimensional texture image or two-dimensional texture image or a set of two-dimensional cube map texture images.static booleanwglReleaseTexImageARB(long pbuffer, int buffer)Releases the specified color buffer back to the pbuffer.static booleanwglSetPbufferAttribARB(long pbuffer, int[] attribList)Array version of:SetPbufferAttribARBstatic booleanwglSetPbufferAttribARB(long pbuffer, java.nio.IntBuffer attribList)Sets an attribute to the specified pbuffer.
-
-
-
Field Detail
-
WGL_BIND_TO_TEXTURE_RGB_ARB, WGL_BIND_TO_TEXTURE_RGBA_ARB
Accepted by theattributesparameter ofGetPixelFormatAttribivARB, and theattribIListparameters ofChoosePixelFormatARB.
-
WGL_TEXTURE_FORMAT_ARB, WGL_TEXTURE_TARGET_ARB, WGL_MIPMAP_TEXTURE_ARB
Accepted by theattribListparameter ofCreatePbufferARBand by theattributeparameter ofQueryPbufferARB.
-
WGL_TEXTURE_RGB_ARB, WGL_TEXTURE_RGBA_ARB, WGL_NO_TEXTURE_ARB
Accepted as a value in theattribListparameter ofCreatePbufferARBand returned in the value parameter ofQueryPbufferARBwhenattributeisTEXTURE_FORMAT_ARB.
-
WGL_TEXTURE_CUBE_MAP_ARB, WGL_TEXTURE_1D_ARB, WGL_TEXTURE_2D_ARB
Accepted as a value in theattribListparameter ofCreatePbufferARBand returned in the value parameter ofQueryPbufferARBwhenattributeisTEXTURE_TARGET_ARB.
-
WGL_MIPMAP_LEVEL_ARB, WGL_CUBE_MAP_FACE_ARB
Accepted by theattribListparameter ofSetPbufferAttribARBand by theattributeparameter ofQueryPbufferARB.
-
WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
Accepted as a value in theattribListparameter ofSetPbufferAttribARBand returned in the value parameter ofQueryPbufferARBwhenattributeisCUBE_MAP_FACE_ARB.
-
-
Method Detail
-
wglBindTexImageARB
public static boolean wglBindTexImageARB(long pbuffer, int buffer)Defines a one-dimensional texture image or two-dimensional texture image or a set of two-dimensional cube map texture images. The texture image or images consist of the image data inbufferfor the specifiedpbufferand need not be copied. The texture target, the texture format and the size of the texture components are derived from attributes of pbuffer specified bypbuffer.- Parameters:
pbuffer- a pbuffer handlebuffer- the target buffer. One of:FRONT_LEFT_ARBFRONT_RIGHT_ARBBACK_LEFT_ARBBACK_RIGHT_ARBAUX0_ARBWGL_AUX[1-9]_ARB
-
wglReleaseTexImageARB
public static boolean wglReleaseTexImageARB(long pbuffer, int buffer)Releases the specified color buffer back to the pbuffer. The pbuffer is made available for reading and writing when it no longer has any color buffers bound as textures.- Parameters:
pbuffer- a pbuffer handlebuffer- the target buffer. One of:FRONT_LEFT_ARBFRONT_RIGHT_ARBBACK_LEFT_ARBBACK_RIGHT_ARBAUX0_ARBWGL_AUX[1-9]_ARB
-
wglSetPbufferAttribARB
public static boolean wglSetPbufferAttribARB(long pbuffer, java.nio.IntBuffer attribList)Sets an attribute to the specified pbuffer.- Parameters:
pbuffer- a pbuffer handleattribList- a 0-terminated list of attribute {type, value} pairs containing integer values
-
wglSetPbufferAttribARB
public static boolean wglSetPbufferAttribARB(long pbuffer, int[] attribList)Array version of:SetPbufferAttribARB
-
-