Class ARBProgramInterfaceQuery
- java.lang.Object
-
- org.lwjgl.opengl.ARBProgramInterfaceQuery
-
public class ARBProgramInterfaceQuery extends java.lang.Object
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 inOpenGL 4.3
.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
GL_ACTIVE_RESOURCES
Accepted by thepname
parameter of GetProgramInterfaceiv.static int
GL_ACTIVE_VARIABLES
GL_ARRAY_SIZE
GL_ARRAY_STRIDE
GL_ATOMIC_COUNTER_BUFFER_INDEX
GL_BLOCK_INDEX
GL_BUFFER_BINDING
GL_BUFFER_DATA_SIZEAccepted in theprops
array of GetProgramResourceiv.static int
GL_BUFFER_VARIABLE
GL_COMPUTE_SUBROUTINE
GL_COMPUTE_SUBROUTINE_UNIFORM
GL_FRAGMENT_SUBROUTINE
GL_FRAGMENT_SUBROUTINE_UNIFORM
GL_GEOMETRY_SUBROUTINE
GL_GEOMETRY_SUBROUTINE_UNIFORMAccepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.static int
GL_IS_PER_PATCH
GL_IS_ROW_MAJOR
GL_LOCATION
GL_LOCATION_INDEX
GL_MATRIX_STRIDEAccepted in theprops
array of GetProgramResourceiv.static int
GL_MAX_NAME_LENGTH
GL_MAX_NUM_ACTIVE_VARIABLES
GL_MAX_NUM_COMPATIBLE_SUBROUTINESAccepted by thepname
parameter of GetProgramInterfaceiv.static int
GL_NAME_LENGTH
GL_NUM_ACTIVE_VARIABLES
GL_OFFSETAccepted in theprops
array of GetProgramResourceiv.static int
GL_PROGRAM_INPUT
GL_PROGRAM_OUTPUTAccepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.static int
GL_REFERENCED_BY_COMPUTE_SHADER
GL_REFERENCED_BY_FRAGMENT_SHADER
GL_REFERENCED_BY_GEOMETRY_SHADER
GL_REFERENCED_BY_TESS_CONTROL_SHADER
GL_REFERENCED_BY_TESS_EVALUATION_SHADER
GL_REFERENCED_BY_VERTEX_SHADERAccepted in theprops
array of GetProgramResourceiv.static int
GL_SHADER_STORAGE_BLOCK
GL_TESS_CONTROL_SUBROUTINE
GL_TESS_CONTROL_SUBROUTINE_UNIFORM
GL_TESS_EVALUATION_SUBROUTINE
GL_TESS_EVALUATION_SUBROUTINE_UNIFORMAccepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.static int
GL_TOP_LEVEL_ARRAY_SIZE
GL_TOP_LEVEL_ARRAY_STRIDEAccepted in theprops
array of GetProgramResourceiv.static int
GL_TRANSFORM_FEEDBACK_VARYING
Accepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.static int
GL_TYPE
Accepted in theprops
array of GetProgramResourceiv.static int
GL_UNIFORM
GL_UNIFORM_BLOCK
GL_VERTEX_SUBROUTINE
GL_VERTEX_SUBROUTINE_UNIFORMAccepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
glGetProgramInterfacei(int program, int programInterface, int pname)
Queries a property of an interface in a program.static void
glGetProgramInterfaceiv(int program, int programInterface, int pname, int[] params)
Array version of:GetProgramInterfaceiv
static void
glGetProgramInterfaceiv(int program, int programInterface, int pname, java.nio.IntBuffer params)
Queries a property of an interface in a program.static int
glGetProgramResourceIndex(int program, int programInterface, java.nio.ByteBuffer name)
Queries the index of a named resource within a program.static int
glGetProgramResourceIndex(int program, int programInterface, java.lang.CharSequence name)
Queries the index of a named resource within a program.static void
glGetProgramResourceiv(int program, int programInterface, int index, int[] props, int[] length, int[] params)
Array version of:GetProgramResourceiv
static void
glGetProgramResourceiv(int program, int programInterface, int index, java.nio.IntBuffer props, java.nio.IntBuffer length, java.nio.IntBuffer params)
Retrieves values for multiple properties of a single active resource within a program object.static int
glGetProgramResourceLocation(int program, int programInterface, java.nio.ByteBuffer name)
Queries the location of a named resource within a program.static int
glGetProgramResourceLocation(int program, int programInterface, java.lang.CharSequence name)
Queries the location of a named resource within a program.static int
glGetProgramResourceLocationIndex(int program, int programInterface, java.nio.ByteBuffer name)
Queries the fragment color index of a named variable within a program.static int
glGetProgramResourceLocationIndex(int program, int programInterface, java.lang.CharSequence name)
Queries the fragment color index of a named variable within a program.static java.lang.String
glGetProgramResourceName(int program, int programInterface, int index)
Queries the name of an indexed resource within a program.static java.lang.String
glGetProgramResourceName(int program, int programInterface, int index, int bufSize)
Queries the name of an indexed resource within a program.static void
glGetProgramResourceName(int program, int programInterface, int index, int[] length, java.nio.ByteBuffer name)
Array version of:GetProgramResourceName
static void
glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name)
Queries the name of an indexed resource within a program.
-
-
-
Field Detail
-
GL_UNIFORM, GL_UNIFORM_BLOCK, GL_PROGRAM_INPUT, GL_PROGRAM_OUTPUT, GL_BUFFER_VARIABLE, GL_SHADER_STORAGE_BLOCK, GL_VERTEX_SUBROUTINE, GL_TESS_CONTROL_SUBROUTINE, GL_TESS_EVALUATION_SUBROUTINE, GL_GEOMETRY_SUBROUTINE, GL_FRAGMENT_SUBROUTINE, GL_COMPUTE_SUBROUTINE, GL_VERTEX_SUBROUTINE_UNIFORM, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, GL_GEOMETRY_SUBROUTINE_UNIFORM, GL_FRAGMENT_SUBROUTINE_UNIFORM, GL_COMPUTE_SUBROUTINE_UNIFORM, GL_TRANSFORM_FEEDBACK_VARYING
Accepted by theprogramInterface
parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, and GetProgramResourceLocationIndex.
-
GL_ACTIVE_RESOURCES, GL_MAX_NAME_LENGTH, GL_MAX_NUM_ACTIVE_VARIABLES, GL_MAX_NUM_COMPATIBLE_SUBROUTINES
Accepted by thepname
parameter of GetProgramInterfaceiv.
-
GL_NAME_LENGTH, GL_TYPE, GL_ARRAY_SIZE, GL_OFFSET, GL_BLOCK_INDEX, GL_ARRAY_STRIDE, GL_MATRIX_STRIDE, GL_IS_ROW_MAJOR, GL_ATOMIC_COUNTER_BUFFER_INDEX, GL_BUFFER_BINDING, GL_BUFFER_DATA_SIZE, GL_NUM_ACTIVE_VARIABLES, GL_ACTIVE_VARIABLES, GL_REFERENCED_BY_VERTEX_SHADER, GL_REFERENCED_BY_TESS_CONTROL_SHADER, GL_REFERENCED_BY_TESS_EVALUATION_SHADER, GL_REFERENCED_BY_GEOMETRY_SHADER, GL_REFERENCED_BY_FRAGMENT_SHADER, GL_REFERENCED_BY_COMPUTE_SHADER, GL_TOP_LEVEL_ARRAY_SIZE, GL_TOP_LEVEL_ARRAY_STRIDE, GL_LOCATION, GL_LOCATION_INDEX, GL_IS_PER_PATCH
Accepted in theprops
array of GetProgramResourceiv.
-
-
Method Detail
-
glGetProgramInterfaceiv
public static void glGetProgramInterfaceiv(int program, int programInterface, int pname, java.nio.IntBuffer params)
Queries a property of an interface in a program.- Parameters:
program
- the name of a program object whose interface to queryprogramInterface
- a token identifying the interface withinprogram
to query. One of:pname
- the name of the parameter withinprogramInterface
to query. One of:ACTIVE_RESOURCES
MAX_NAME_LENGTH
MAX_NUM_ACTIVE_VARIABLES
MAX_NUM_COMPATIBLE_SUBROUTINES
params
- a variable to retrieve the value ofpname
for the program interface
-
glGetProgramInterfacei
public static int glGetProgramInterfacei(int program, int programInterface, int pname)
Queries a property of an interface in a program.- Parameters:
program
- the name of a program object whose interface to queryprogramInterface
- a token identifying the interface withinprogram
to query. One of:pname
- the name of the parameter withinprogramInterface
to query. One of:ACTIVE_RESOURCES
MAX_NAME_LENGTH
MAX_NUM_ACTIVE_VARIABLES
MAX_NUM_COMPATIBLE_SUBROUTINES
-
glGetProgramResourceIndex
public static int glGetProgramResourceIndex(int program, int programInterface, java.nio.ByteBuffer name) public static int glGetProgramResourceIndex(int program, int programInterface, java.lang.CharSequence name)
Queries the index of a named resource within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the resource named {Wcode name}. One of:name
- the name of the resource to query the index of
-
glGetProgramResourceName
public static void glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name)
Queries the name of an indexed resource within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the indexed resource. One of:index
- the index of the resource withinprogramInterface
ofprogram
length
- a variable which will receive the length of the resource namename
- a character array into which will be written the name of the resource
-
glGetProgramResourceName
public static java.lang.String glGetProgramResourceName(int program, int programInterface, int index, int bufSize)
Queries the name of an indexed resource within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the indexed resource. One of:index
- the index of the resource withinprogramInterface
ofprogram
bufSize
- the size of the character array whose address is given byname
-
glGetProgramResourceName
public static java.lang.String glGetProgramResourceName(int program, int programInterface, int index)
Queries the name of an indexed resource within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the indexed resource. One of:index
- the index of the resource withinprogramInterface
ofprogram
-
glGetProgramResourceiv
public static void glGetProgramResourceiv(int program, int programInterface, int index, java.nio.IntBuffer props, java.nio.IntBuffer length, java.nio.IntBuffer params)
Retrieves values for multiple properties of a single active resource within a program object.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the resource namedname
. One of:index
- the active resource indexprops
- an array that will receive the active resource propertieslength
- a variable which will receive the number of values returnedparams
- an array that will receive the property values
-
glGetProgramResourceLocation
public static int glGetProgramResourceLocation(int program, int programInterface, java.nio.ByteBuffer name) public static int glGetProgramResourceLocation(int program, int programInterface, java.lang.CharSequence name)
Queries the location of a named resource within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the resource namedname
name
- the name of the resource to query the location of
-
glGetProgramResourceLocationIndex
public static int glGetProgramResourceLocationIndex(int program, int programInterface, java.nio.ByteBuffer name) public static int glGetProgramResourceLocationIndex(int program, int programInterface, java.lang.CharSequence name)
Queries the fragment color index of a named variable within a program.- Parameters:
program
- the name of a program object whose resources to queryprogramInterface
- a token identifying the interface withinprogram
containing the resource namedname
. Must be:PROGRAM_OUTPUT
name
- the name of the resource to query the location of
-
glGetProgramInterfaceiv
public static void glGetProgramInterfaceiv(int program, int programInterface, int pname, int[] params)
Array version of:GetProgramInterfaceiv
-
glGetProgramResourceName
public static void glGetProgramResourceName(int program, int programInterface, int index, int[] length, java.nio.ByteBuffer name)
Array version of:GetProgramResourceName
-
glGetProgramResourceiv
public static void glGetProgramResourceiv(int program, int programInterface, int index, int[] props, int[] length, int[] params)
Array version of:GetProgramResourceiv
-
-