Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBFramebufferNoAttachments

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

Native bindings to the ARB_framebuffer_no_attachments extension.

Framebuffer objects as introduced by ARB_framebuffer_object and OpenGL 3.0 provide a generalized mechanism for rendering to off-screen surfaces. Each framebuffer object may have depth, stencil and zero or more color attachments that can be written to by the GL. The size of the framebuffer (width, height, layer count, sample count) is derived from the attachments of that framebuffer. In unextended OpenGL 4.2, it is not legal to render into a framebuffer object that has no attachments. Such a framebuffer would be considered incomplete with the FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status.

With OpenGL 4.2 and ARB_shader_image_load_store, fragment shaders are capable of doing random access writes to buffer and texture memory via image loads, stores, and atomics. This ability enables algorithms using the conventional rasterizer to generate a collection of fragments, where each fragment shader invocation will write its outputs to buffer or texture memory using image stores or atomics. Such algorithms may have no need to write color or depth values to a conventional framebuffer. However, a framebuffer with no attachments will be considered incomplete and no rasterization or fragment shader exectuion will occur. To avoid such errors, an application may be required to create an otherwise unnecessary "dummy" texture and attach it to the framebuffer (possibly with color writes masked off). If the algorithm requires the rasterizer to operate over a large number of pixels, this dummy texture will needlessly consume a significant amount of memory.

This extension enables the algorithms described above to work even with a framebuffer with no attachments. Applications can specify default width, height, layer count, and sample count parameters for a framebuffer object. When a framebuffer with no attachments is bound, it will be considered complete as long as the application has specified non-zero default width and height parameters. For the purposes of rasterization, the framebuffer will be considered to have a width, height, layer count, and sample count derived from its default parameters. Framebuffers with one or more attachments are not affected by these default parameters; the size of the framebuffer will still be derived from the sizes of the attachments in that case.

Additionally, this extension provides queryable implementation-dependent maximums for framebuffer width, height, layer count, and sample count, which may differ from similar limits on textures and renderbuffers. These maximums will be used to error-check the default framebuffer parameters and also permit implementations to expose the ability to rasterize to an attachment-less framebuffer larger than the maximum supported texture size.

Requires OpenGL 3.0 or ARB_framebuffer_object. Promoted to core in OpenGL 4.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

public static final int
GL_FRAMEBUFFER_DEFAULT_HEIGHT

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

public static final int
GL_FRAMEBUFFER_DEFAULT_LAYERS

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

public static final int
GL_FRAMEBUFFER_DEFAULT_SAMPLES

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

public static final int
GL_FRAMEBUFFER_DEFAULT_WIDTH

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

public static final int
GL_MAX_FRAMEBUFFER_HEIGHT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

public static final int
GL_MAX_FRAMEBUFFER_LAYERS

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

public static final int
GL_MAX_FRAMEBUFFER_SAMPLES

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

public static final int
GL_MAX_FRAMEBUFFER_WIDTH

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glFramebufferParameteri(int
target of the operation. One of:
READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
target
,
int pname, int
the new value for the parameter named pname
param
)

Sets a named parameter of a framebuffer.

public static int
glGetFramebufferParameteri(int
target of the operation. One of:
READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
target
,
int pname)

Retrieves a named parameter from a framebuffer.

public static void
glGetFramebufferParameteriv(int
target of the operation. One of:
READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
target
,
int pname, IntBuffer
a variable to receive the value of the parameter named pname
params
)

Retrieves a named parameter from a framebuffer.

public static void
glGetFramebufferParameteriv(int target, int pname, int[] params)

Array version of: GetFramebufferParameteriv

public static int
public static void
glGetNamedFramebufferParameterivEXT(int
the framebuffer object
framebuffer
,
int pname, IntBuffer
a variable to receive the value of the parameter named pname
params
)

DSA version of GetFramebufferParameteriv.

public static void
glGetNamedFramebufferParameterivEXT(int framebuffer, int pname, int[] params)

Array version of: GetNamedFramebufferParameterivEXT

public static native void
glNamedFramebufferParameteriEXT(int
the framebuffer object
framebuffer
,
int pname, int
the new value for the parameter named pname
param
)

DSA version of FramebufferParameteri.

public static void
nglGetFramebufferParameteriv(int target, int pname, long params)

Unsafe version of: GetFramebufferParameteriv

public static native void
nglGetNamedFramebufferParameterivEXT(int framebuffer, int pname, long params)

Unsafe version of: GetNamedFramebufferParameterivEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONSback to summary
public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

GL_FRAMEBUFFER_DEFAULT_HEIGHTback to summary
public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

GL_FRAMEBUFFER_DEFAULT_LAYERSback to summary
public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

GL_FRAMEBUFFER_DEFAULT_SAMPLESback to summary
public static final int GL_FRAMEBUFFER_DEFAULT_SAMPLES

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

GL_FRAMEBUFFER_DEFAULT_WIDTHback to summary
public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH

Accepted by the pname parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and GetNamedFramebufferParameterivEXT.

GL_MAX_FRAMEBUFFER_HEIGHTback to summary
public static final int GL_MAX_FRAMEBUFFER_HEIGHT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

GL_MAX_FRAMEBUFFER_LAYERSback to summary
public static final int GL_MAX_FRAMEBUFFER_LAYERS

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

GL_MAX_FRAMEBUFFER_SAMPLESback to summary
public static final int GL_MAX_FRAMEBUFFER_SAMPLES

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

GL_MAX_FRAMEBUFFER_WIDTHback to summary
public static final int GL_MAX_FRAMEBUFFER_WIDTH

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev.

Constructor Detail

ARBFramebufferNoAttachmentsback to summary
protected ARBFramebufferNoAttachments()

Method Detail

glFramebufferParameteriback to summary
public static void glFramebufferParameteri(int target, int pname, int param)

Sets a named parameter of a framebuffer.

Parameters
target:int

target of the operation. One of:

READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
pname:int

a token indicating the parameter to be modified. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
param:int

the new value for the parameter named pname

glGetFramebufferParameteriback to summary
public static int glGetFramebufferParameteri(int target, int pname)

Retrieves a named parameter from a framebuffer.

Parameters
target:int

target of the operation. One of:

READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
pname:int

a token indicating the parameter to be retrieved. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
Annotations
@NativeType:void
glGetFramebufferParameterivback to summary
public static void glGetFramebufferParameteriv(int target, int pname, IntBuffer params)

Retrieves a named parameter from a framebuffer.

Parameters
target:int

target of the operation. One of:

READ_FRAMEBUFFERDRAW_FRAMEBUFFERFRAMEBUFFER
pname:int

a token indicating the parameter to be retrieved. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
params:IntBuffer

a variable to receive the value of the parameter named pname

glGetFramebufferParameterivback to summary
public static void glGetFramebufferParameteriv(int target, int pname, int[] params)

Array version of: GetFramebufferParameteriv

glGetNamedFramebufferParameteriEXTback to summary
public static int glGetNamedFramebufferParameteriEXT(int framebuffer, int pname)

DSA version of GetFramebufferParameteriv.

Parameters
framebuffer:int

the framebuffer object

pname:int

a token indicating the parameter to be retrieved. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
Annotations
@NativeType:void
glGetNamedFramebufferParameterivEXTback to summary
public static void glGetNamedFramebufferParameterivEXT(int framebuffer, int pname, IntBuffer params)

DSA version of GetFramebufferParameteriv.

Parameters
framebuffer:int

the framebuffer object

pname:int

a token indicating the parameter to be retrieved. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
params:IntBuffer

a variable to receive the value of the parameter named pname

glGetNamedFramebufferParameterivEXTback to summary
public static void glGetNamedFramebufferParameterivEXT(int framebuffer, int pname, int[] params)

Array version of: GetNamedFramebufferParameterivEXT

glNamedFramebufferParameteriEXTback to summary
public static native void glNamedFramebufferParameteriEXT(int framebuffer, int pname, int param)

DSA version of FramebufferParameteri.

Parameters
framebuffer:int

the framebuffer object

pname:int

a token indicating the parameter to be modified. One of:

FRAMEBUFFER_DEFAULT_WIDTHFRAMEBUFFER_DEFAULT_HEIGHT
FRAMEBUFFER_DEFAULT_LAYERSFRAMEBUFFER_DEFAULT_SAMPLES
FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS
param:int

the new value for the parameter named pname

nglGetFramebufferParameterivback to summary
public static void nglGetFramebufferParameteriv(int target, int pname, long params)

Unsafe version of: GetFramebufferParameteriv

nglGetNamedFramebufferParameterivEXTback to summary
public static native void nglGetNamedFramebufferParameterivEXT(int framebuffer, int pname, long params)

Unsafe version of: GetNamedFramebufferParameterivEXT