Top Description Fields Constructors Methods
org.lwjgl.opengles

public Class EXTDiscardFramebuffer

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

Native bindings to the EXT_discard_framebuffer extension.

This extension provides a new command, DiscardFramebufferEXT, which causes the contents of the named framebuffer attachable images to become undefined. The contents of the specified buffers are undefined until a subsequent operation modifies the content, and only the modified region is guaranteed to hold valid content. Effective usage of this command may provide an implementation with new optimization opportunities.

Some OpenGL ES implementations cache framebuffer images in a small pool of fast memory. Before rendering, these implementations must load the existing contents of one or more of the logical buffers (color, depth, stencil, etc.) into this memory. After rendering, some or all of these buffers are likewise stored back to external memory so their contents can be used again in the future. In many applications, some or all of the logical buffers are cleared at the start of rendering. If so, the effort to load or store those buffers is wasted.

Even without this extension, if a frame of rendering begins with a full- screen Clear, an OpenGL ES implementation may optimize away the loading of framebuffer contents prior to rendering the frame. With this extension, an application can use DiscardFramebufferEXT to signal that framebuffer contents will no longer be needed. In this case an OpenGL ES implementation may also optimize away the storing back of framebuffer contents after rendering the frame.

Requires GLES 2.0

Field Summary

Modifier and TypeField and Description
public static final int
GL_COLOR_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

public static final int
GL_DEPTH_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

public static final int
GL_STENCIL_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glDiscardFramebufferEXT(int target, IntBuffer attachments)

public static void
glDiscardFramebufferEXT(int target, int attachment)

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

Array version of: DiscardFramebufferEXT

public static native void
nglDiscardFramebufferEXT(int target, int numAttachments, long attachments)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_COLOR_EXTback to summary
public static final int GL_COLOR_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

GL_DEPTH_EXTback to summary
public static final int GL_DEPTH_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

GL_STENCIL_EXTback to summary
public static final int GL_STENCIL_EXT

Accepted in the attachments parameter of DiscardFramebufferEXT when the default framebuffer is bound to target.

Constructor Detail

EXTDiscardFramebufferback to summary
protected EXTDiscardFramebuffer()

Method Detail

glDiscardFramebufferEXTback to summary
public static void glDiscardFramebufferEXT(int target, IntBuffer attachments)
glDiscardFramebufferEXTback to summary
public static void glDiscardFramebufferEXT(int target, int attachment)
glDiscardFramebufferEXTback to summary
public static void glDiscardFramebufferEXT(int target, int[] attachments)

Array version of: DiscardFramebufferEXT

nglDiscardFramebufferEXTback to summary
public static native void nglDiscardFramebufferEXT(int target, int numAttachments, long attachments)