Top Description Constructors Methods
org.lwjgl.opengl

public Class ARBInvalidateSubdata

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the ARB_invalidate_subdata extension.

This extension adds a mechanism for an application to tell the GL that the previous contents of a subregion of an image or a range of a buffer may be invalidated.

GL implementations often include several memory spaces, each with distinct performance characteristics, and the implementations transparently move allocations between memory spaces. With this extension, an application can tell the GL that the contents of a texture or buffer are no longer needed, and the implementation can avoid transferring the data unnecessarily.

Examples of when this may be useful include:

  1. invalidating a multisample texture after resolving it into a non-multisample texture.
  2. invalidating depth/stencil buffers after using them to generate a color buffer.
  3. invalidating a subregion of a framebuffer rather than clearing it before rendering to it, when the whole subregion will be overwritten.
  4. invalidating dynamically generated data (e.g. textures written by FBO rendering or CopyTexSubImage, buffers written by transform feedback, etc.) after it is no longer needed but before the end of the frame.

It is expected that the situations in which the GL will take advantage of this knowledge and achieve increased performance as a result of its use will be implementation-dependent. The first three examples may show benefit on tiled renderers where some data won't need to be copied into or out of on-chip memory. The fourth example may show a benefit in multi-GPU systems where some data won't need to be copied between GPUs.

This extension is a superset of the EXT_discard_framebuffer extension with the following additions:

Requires OpenGL 2.0. Promoted to core in OpenGL 4.3.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glInvalidateBufferData(int
the name of a buffer object whose data store to invalidate
buffer
)

Invalidates the content of a buffer object's data store.

public static void
glInvalidateBufferSubData(int
the name of a buffer object, a subrange of whose data store to invalidate
buffer
,
long
the offset within the buffer's data store of the start of the range to be invalidated
offset
,
long
the length of the range within the buffer's data store to be invalidated
length
)

Invalidates a region of a buffer object's data store.

public static void
glInvalidateFramebuffer(int
the target to which the framebuffer is attached. One of:
FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
target
,
IntBuffer
the address of an array identifying the attachments to be invalidated
attachments
)

Invalidate the content some or all of a framebuffer object's attachments.

public static void
glInvalidateFramebuffer(int
the target to which the framebuffer is attached. One of:
FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
target
,
int attachment)

Invalidate the content some or all of a framebuffer object's attachments.

public static void
glInvalidateFramebuffer(int target, int[] attachments)

Array version of: InvalidateFramebuffer

public static void
glInvalidateSubFramebuffer(int
the target to which the framebuffer is attached. One of:
FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
target
,
IntBuffer
an array identifying the attachments to be invalidated
attachments
,
int
the X offset of the region to be invalidated
x
,
int
the Y offset of the region to be invalidated
y
,
int
the width of the region to be invalidated
width
,
int
the height of the region to be invalidated
height
)

Invalidates the content of a region of some or all of a framebuffer object's attachments.

public static void
glInvalidateSubFramebuffer(int
the target to which the framebuffer is attached. One of:
FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
target
,
int attachment, int
the X offset of the region to be invalidated
x
,
int
the Y offset of the region to be invalidated
y
,
int
the width of the region to be invalidated
width
,
int
the height of the region to be invalidated
height
)

Invalidates the content of a region of some or all of a framebuffer object's attachments.

public static void
glInvalidateSubFramebuffer(int target, int[] attachments, int x, int y, int width, int height)

Array version of: InvalidateSubFramebuffer

public static void
glInvalidateTexImage(int
the name of a texture object to invalidate
texture
,
int
the level of detail of the texture object to invalidate
level
)

Invalidates the entirety of a texture image.

public static void
glInvalidateTexSubImage(int
the name of a texture object a subregion of which to invalidate
texture
,
int
the level of detail of the texture object within which the region resides
level
,
int
the X offset of the region to be invalidated
xoffset
,
int
the Y offset of the region to be invalidated
yoffset
,
int
the Z offset of the region to be invalidated
zoffset
,
int
the width of the region to be invalidated
width
,
int
the height of the region to be invalidated
height
,
int
the depth of the region to be invalidated
depth
)

Invalidates a region of a texture image.

public static void
nglInvalidateFramebuffer(int target, int
the number of entries in the attachments array
numAttachments
,
long attachments)

Unsafe version of: InvalidateFramebuffer

public static void
nglInvalidateSubFramebuffer(int target, int
the number of entries in the attachments array
numAttachments
,
long attachments, int x, int y, int width, int height)

Unsafe version of: InvalidateSubFramebuffer

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ARBInvalidateSubdataback to summary
protected ARBInvalidateSubdata()

Method Detail

glInvalidateBufferDataback to summary
public static void glInvalidateBufferData(int buffer)

Invalidates the content of a buffer object's data store.

Parameters
buffer:int

the name of a buffer object whose data store to invalidate

glInvalidateBufferSubDataback to summary
public static void glInvalidateBufferSubData(int buffer, long offset, long length)

Invalidates a region of a buffer object's data store.

Parameters
buffer:int

the name of a buffer object, a subrange of whose data store to invalidate

offset:long

the offset within the buffer's data store of the start of the range to be invalidated

length:long

the length of the range within the buffer's data store to be invalidated

glInvalidateFramebufferback to summary
public static void glInvalidateFramebuffer(int target, IntBuffer attachments)

Invalidate the content some or all of a framebuffer object's attachments.

Parameters
target:int

the target to which the framebuffer is attached. One of:

FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
attachments:IntBuffer

the address of an array identifying the attachments to be invalidated

glInvalidateFramebufferback to summary
public static void glInvalidateFramebuffer(int target, int attachment)

Invalidate the content some or all of a framebuffer object's attachments.

Parameters
target:int

the target to which the framebuffer is attached. One of:

FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
glInvalidateFramebufferback to summary
public static void glInvalidateFramebuffer(int target, int[] attachments)

Array version of: InvalidateFramebuffer

glInvalidateSubFramebufferback to summary
public static void glInvalidateSubFramebuffer(int target, IntBuffer attachments, int x, int y, int width, int height)

Invalidates the content of a region of some or all of a framebuffer object's attachments.

Parameters
target:int

the target to which the framebuffer is attached. One of:

FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
attachments:IntBuffer

an array identifying the attachments to be invalidated

x:int

the X offset of the region to be invalidated

y:int

the Y offset of the region to be invalidated

width:int

the width of the region to be invalidated

height:int

the height of the region to be invalidated

glInvalidateSubFramebufferback to summary
public static void glInvalidateSubFramebuffer(int target, int attachment, int x, int y, int width, int height)

Invalidates the content of a region of some or all of a framebuffer object's attachments.

Parameters
target:int

the target to which the framebuffer is attached. One of:

FRAMEBUFFERDRAW_FRAMEBUFFERREAD_FRAMEBUFFER
x:int

the X offset of the region to be invalidated

y:int

the Y offset of the region to be invalidated

width:int

the width of the region to be invalidated

height:int

the height of the region to be invalidated

glInvalidateSubFramebufferback to summary
public static void glInvalidateSubFramebuffer(int target, int[] attachments, int x, int y, int width, int height)

Array version of: InvalidateSubFramebuffer

glInvalidateTexImageback to summary
public static void glInvalidateTexImage(int texture, int level)

Invalidates the entirety of a texture image.

Parameters
texture:int

the name of a texture object to invalidate

level:int

the level of detail of the texture object to invalidate

glInvalidateTexSubImageback to summary
public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth)

Invalidates a region of a texture image.

Parameters
texture:int

the name of a texture object a subregion of which to invalidate

level:int

the level of detail of the texture object within which the region resides

xoffset:int

the X offset of the region to be invalidated

yoffset:int

the Y offset of the region to be invalidated

zoffset:int

the Z offset of the region to be invalidated

width:int

the width of the region to be invalidated

height:int

the height of the region to be invalidated

depth:int

the depth of the region to be invalidated

nglInvalidateFramebufferback to summary
public static void nglInvalidateFramebuffer(int target, int numAttachments, long attachments)

Unsafe version of: InvalidateFramebuffer

Parameters
numAttachments:int

the number of entries in the attachments array

nglInvalidateSubFramebufferback to summary
public static void nglInvalidateSubFramebuffer(int target, int numAttachments, long attachments, int x, int y, int width, int height)

Unsafe version of: InvalidateSubFramebuffer

Parameters
numAttachments:int

the number of entries in the attachments array