Package org.lwjgl.opengl
Class WGLARBRenderTexture
java.lang.Object
org.lwjgl.opengl.WGLARBRenderTexture
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
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Accepted by theattributes
parameter ofGetPixelFormatAttribivARB
, and theattribIList
parameters ofChoosePixelFormatARB
.static final int
Accepted by theattributes
parameter ofGetPixelFormatAttribivARB
, and theattribIList
parameters ofChoosePixelFormatARB
.static final int
Accepted by theattribList
parameter ofSetPbufferAttribARB
and by theattribute
parameter ofQueryPbufferARB
.static final int
static final int
static final int
Accepted by theattribList
parameter ofSetPbufferAttribARB
and by theattribute
parameter ofQueryPbufferARB
.static final int
Accepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.static final int
Accepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.static final int
Accepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.static final int
Accepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
nwglSetPbufferAttribARB
(long pbuffer, long attribList) Unsafe version of:SetPbufferAttribARB
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.static boolean
wglReleaseTexImageARB
(long pbuffer, int buffer) Releases the specified color buffer back to the pbuffer.static boolean
wglSetPbufferAttribARB
(long pbuffer, int[] attribList) Array version of:SetPbufferAttribARB
static boolean
wglSetPbufferAttribARB
(long pbuffer, IntBuffer attribList) Sets an attribute to the specified pbuffer.
-
Field Details
-
WGL_BIND_TO_TEXTURE_RGB_ARB
public static final int WGL_BIND_TO_TEXTURE_RGB_ARBAccepted by theattributes
parameter ofGetPixelFormatAttribivARB
, and theattribIList
parameters ofChoosePixelFormatARB
.- See Also:
-
WGL_BIND_TO_TEXTURE_RGBA_ARB
public static final int WGL_BIND_TO_TEXTURE_RGBA_ARBAccepted by theattributes
parameter ofGetPixelFormatAttribivARB
, and theattribIList
parameters ofChoosePixelFormatARB
.- See Also:
-
WGL_TEXTURE_FORMAT_ARB
public static final int WGL_TEXTURE_FORMAT_ARBAccepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
.- See Also:
-
WGL_TEXTURE_TARGET_ARB
public static final int WGL_TEXTURE_TARGET_ARBAccepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
.- See Also:
-
WGL_MIPMAP_TEXTURE_ARB
public static final int WGL_MIPMAP_TEXTURE_ARBAccepted by theattribList
parameter ofCreatePbufferARB
and by theattribute
parameter ofQueryPbufferARB
.- See Also:
-
WGL_TEXTURE_RGB_ARB
public static final int WGL_TEXTURE_RGB_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.- See Also:
-
WGL_TEXTURE_RGBA_ARB
public static final int WGL_TEXTURE_RGBA_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.- See Also:
-
WGL_NO_TEXTURE_ARB
public static final int WGL_NO_TEXTURE_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_FORMAT_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_ARB
public static final int WGL_TEXTURE_CUBE_MAP_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.- See Also:
-
WGL_TEXTURE_1D_ARB
public static final int WGL_TEXTURE_1D_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.- See Also:
-
WGL_TEXTURE_2D_ARB
public static final int WGL_TEXTURE_2D_ARBAccepted as a value in theattribList
parameter ofCreatePbufferARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isTEXTURE_TARGET_ARB
.- See Also:
-
WGL_MIPMAP_LEVEL_ARB
public static final int WGL_MIPMAP_LEVEL_ARBAccepted by theattribList
parameter ofSetPbufferAttribARB
and by theattribute
parameter ofQueryPbufferARB
.- See Also:
-
WGL_CUBE_MAP_FACE_ARB
public static final int WGL_CUBE_MAP_FACE_ARBAccepted by theattribList
parameter ofSetPbufferAttribARB
and by theattribute
parameter ofQueryPbufferARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
public static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
public static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
public static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
public static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
public static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
public static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARBAccepted as a value in theattribList
parameter ofSetPbufferAttribARB
and returned in the value parameter ofQueryPbufferARB
whenattribute
isCUBE_MAP_FACE_ARB
.- See Also:
-
WGL_FRONT_LEFT_ARB
public static final int WGL_FRONT_LEFT_ARB- See Also:
-
WGL_FRONT_RIGHT_ARB
public static final int WGL_FRONT_RIGHT_ARB- See Also:
-
WGL_BACK_LEFT_ARB
public static final int WGL_BACK_LEFT_ARB- See Also:
-
WGL_BACK_RIGHT_ARB
public static final int WGL_BACK_RIGHT_ARB- See Also:
-
WGL_AUX0_ARB
public static final int WGL_AUX0_ARB- See Also:
-
WGL_AUX1_ARB
public static final int WGL_AUX1_ARB- See Also:
-
WGL_AUX2_ARB
public static final int WGL_AUX2_ARB- See Also:
-
WGL_AUX3_ARB
public static final int WGL_AUX3_ARB- See Also:
-
WGL_AUX4_ARB
public static final int WGL_AUX4_ARB- See Also:
-
WGL_AUX5_ARB
public static final int WGL_AUX5_ARB- See Also:
-
WGL_AUX6_ARB
public static final int WGL_AUX6_ARB- See Also:
-
WGL_AUX7_ARB
public static final int WGL_AUX7_ARB- See Also:
-
WGL_AUX8_ARB
public static final int WGL_AUX8_ARB- See Also:
-
WGL_AUX9_ARB
public static final int WGL_AUX9_ARB- See Also:
-
-
Method Details
-
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 inbuffer
for the specifiedpbuffer
and 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_ARB
FRONT_RIGHT_ARB
BACK_LEFT_ARB
BACK_RIGHT_ARB
AUX0_ARB
WGL_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_ARB
FRONT_RIGHT_ARB
BACK_LEFT_ARB
BACK_RIGHT_ARB
AUX0_ARB
WGL_AUX[1-9]_ARB
-
nwglSetPbufferAttribARB
public static int nwglSetPbufferAttribARB(long pbuffer, long attribList) Unsafe version of:SetPbufferAttribARB
-
wglSetPbufferAttribARB
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, @Nullable int[] attribList) Array version of:SetPbufferAttribARB
-