Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBProgramInterfaceQuery

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

Native bindings to the ARB_program_interface_query extension.

This extension provides a single unified set of query commands that can be used by applications to determine properties of various interfaces and resources used by program objects to communicate with application code, fixed-function OpenGL pipeline stages, and other programs. In unextended OpenGL 4.2, there is a separate set of query commands for each different type of interface or resource used by the program. These different sets of queries are structured nearly identically, but the queries for some interfaces have limited capability (e.g., there is no ability to enumerate fragment shader outputs).

With the single set of query commands provided by this extension, a consistent set of queries is available for all interfaces, and a new interface can be added without having to introduce a completely new set of query commands. These queries are intended to provide a superset of the capabilities provided by similar queries in OpenGL 4.2, and should allow for the deprecation of the existing queries.

This extension defines two terms: interfaces and active resources. Each interface of a program object provides a way for the program to communicate with application code, fixed-function OpenGL pipeline stages, and other programs. Examples of interfaces for a program object include inputs (receiving values from vertex attributes or outputs of other programs), outputs (sending values to other programs or per-fragment operations), uniforms (receiving values from API calls), uniform blocks (receiving values from bound buffer objects), subroutines and subroutine uniforms (receiving API calls to indicate functions to call during program execution), and atomic counter buffers (holding values to be manipulated by atomic counter shader functions). Each interface of a program has a set of active resources used by the program. For example, the resources of a program's input interface includes all active input variables used by the first stage of the program. The resources of a program's uniform block interface consists of the set of uniform blocks with at least one member used by any shader in the program.

Requires OpenGL 2.0. Promoted to core in OpenGL 4.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_ACTIVE_RESOURCES

Accepted by the pname parameter of GetProgramInterfaceiv.

public static final int
GL_ACTIVE_VARIABLES

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_ARRAY_SIZE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_ARRAY_STRIDE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_ATOMIC_COUNTER_BUFFER_INDEX

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_BLOCK_INDEX

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_BUFFER_BINDING

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_BUFFER_DATA_SIZE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_BUFFER_VARIABLE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_COMPUTE_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_COMPUTE_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_FRAGMENT_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_FRAGMENT_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_GEOMETRY_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_GEOMETRY_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_IS_PER_PATCH

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_IS_ROW_MAJOR

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_LOCATION

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_LOCATION_INDEX

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_MATRIX_STRIDE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_MAX_NAME_LENGTH

Accepted by the pname parameter of GetProgramInterfaceiv.

public static final int
GL_MAX_NUM_ACTIVE_VARIABLES

Accepted by the pname parameter of GetProgramInterfaceiv.

public static final int
GL_MAX_NUM_COMPATIBLE_SUBROUTINES

Accepted by the pname parameter of GetProgramInterfaceiv.

public static final int
GL_NAME_LENGTH

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_NUM_ACTIVE_VARIABLES

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_OFFSET

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_PROGRAM_INPUT

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_PROGRAM_OUTPUT

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_REFERENCED_BY_COMPUTE_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_REFERENCED_BY_FRAGMENT_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_REFERENCED_BY_GEOMETRY_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_REFERENCED_BY_TESS_CONTROL_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_REFERENCED_BY_TESS_EVALUATION_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_REFERENCED_BY_VERTEX_SHADER

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_SHADER_STORAGE_BLOCK

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TESS_CONTROL_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TESS_CONTROL_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TESS_EVALUATION_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TESS_EVALUATION_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TOP_LEVEL_ARRAY_SIZE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_TOP_LEVEL_ARRAY_STRIDE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_TRANSFORM_FEEDBACK_VARYING

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_TYPE

Accepted in the props array of GetProgramResourceiv.

public static final int
GL_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_UNIFORM_BLOCK

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_VERTEX_SUBROUTINE

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

public static final int
GL_VERTEX_SUBROUTINE_UNIFORM

Accepted by the programInterface parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
public static void
public static void
glGetProgramInterfaceiv(int program, int programInterface, int pname, int[] params)

Array version of: GetProgramInterfaceiv

public static int
public static int
public static void
glGetProgramResourceiv(int
the name of a program object whose resources to query
program
,
int programInterface, int
the active resource index
index
,
IntBuffer
an array that will receive the active resource properties
props
,
IntBuffer
a variable which will receive the number of values returned
length
,
IntBuffer
an array that will receive the property values
params
)

Retrieves values for multiple properties of a single active resource within a program object.

public static void
glGetProgramResourceiv(int program, int programInterface, int index, int[] props, int[] length, int[] params)

Array version of: GetProgramResourceiv

public static int
glGetProgramResourceLocation(int
the name of a program object whose resources to query
program
,
int
a token identifying the interface within program containing the resource named name
programInterface
,
ByteBuffer
the name of the resource to query the location of
name
)

Queries the location of a named resource within a program.

public static int
glGetProgramResourceLocation(int
the name of a program object whose resources to query
program
,
int
a token identifying the interface within program containing the resource named name
programInterface
,
CharSequence
the name of the resource to query the location of
name
)

Queries the location of a named resource within a program.

public static int
glGetProgramResourceLocationIndex(int
the name of a program object whose resources to query
program
,
int
a token identifying the interface within program containing the resource named name. Must be:
PROGRAM_OUTPUT
programInterface
,
ByteBuffer
the name of the resource to query the location of
name
)

Queries the fragment color index of a named variable within a program.

public static int
glGetProgramResourceLocationIndex(int
the name of a program object whose resources to query
program
,
int
a token identifying the interface within program containing the resource named name. Must be:
PROGRAM_OUTPUT
programInterface
,
CharSequence
the name of the resource to query the location of
name
)

Queries the fragment color index of a named variable within a program.

public static void
glGetProgramResourceName(int
the name of a program object whose resources to query
program
,
int programInterface, int
the index of the resource within programInterface of program
index
,
IntBuffer
a variable which will receive the length of the resource name
length
,
ByteBuffer
a character array into which will be written the name of the resource
name
)

Queries the name of an indexed resource within a program.

public static String
glGetProgramResourceName(int
the name of a program object whose resources to query
program
,
int programInterface, int
the index of the resource within programInterface of program
index
,
int
the size of the character array whose address is given by name
bufSize
)

Queries the name of an indexed resource within a program.

public static String
glGetProgramResourceName(int
the name of a program object whose resources to query
program
,
int programInterface, int
the index of the resource within programInterface of program
index
)

Queries the name of an indexed resource within a program.

public static void
glGetProgramResourceName(int program, int programInterface, int index, int[] length, ByteBuffer name)

Array version of: GetProgramResourceName

public static void
nglGetProgramInterfaceiv(int program, int programInterface, int pname, long params)

Unsafe version of: GetProgramInterfaceiv

public static int
nglGetProgramResourceIndex(int program, int programInterface, long name)

Unsafe version of: GetProgramResourceIndex

public static void
nglGetProgramResourceiv(int program, int programInterface, int index, int
the number of properties in props
propCount
,
long props, int
the size of the integer array whose address is given by params
bufSize
,
long length, long params)

Unsafe version of: GetProgramResourceiv

public static int
nglGetProgramResourceLocation(int program, int programInterface, long name)

Unsafe version of: GetProgramResourceLocation

public static int
nglGetProgramResourceLocationIndex(int program, int programInterface, long name)

Unsafe version of: GetProgramResourceLocationIndex

public static void
nglGetProgramResourceName(int program, int programInterface, int index, int
the size of the character array whose address is given by name
bufSize
,
long length, long name)

Unsafe version of: GetProgramResourceName

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait