In unextended OpenGL textures are considered to be sets of image data (mip-chains, arrays, cube-map face sets, etc.) and sampling state (sampling mode, mip-mapping state, coordinate wrapping and clamping rules, etc.) combined into a single object. It is typical for an application to use many textures with a limited set of sampling states that are the same between them. In order to use textures in this way, an application must generate and configure many texture names, adding overhead both to applications and to implementations. Furthermore, should an application wish to sample from a texture in more than one way (with and without mip-mapping, for example) it must either modify the state of the texture or create two textures, each with a copy of the same image data. This can introduce runtime and memory costs to the application.
This extension separates sampler state from texture image data. A new object type is introduced, the sampler (representing generic sampling parameters). The new sampler objects are represented by a new named type encapsulating the sampling parameters of a traditional texture object. Sampler objects may be bound to texture units to supplant the bound texture's sampling state. A single sampler may be bound to more than one texture unit simultaneously, allowing different textures to be accessed with a single set of shared sampling parameters. Also, by binding different sampler objects to texture units to which the same texture has been bound, the same texture image data may be sampled with different sampling parameters.
Promoted to core in OpenGL 3..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_SAMPLER_BINDING
Accepted by the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void | glBindSampler(int
the index of the texture unit to which the sampler is bound unit, int the name of a sampler sampler)Binds a named sampler to a texturing target. | ||||||||||||
| public static void | glDeleteSamplers(IntBuffer
an array of sampler objects to be deleted samplers)Deletes named sampler objects. | ||||||||||||
| public static void | |||||||||||||
| public static void | |||||||||||||
| public static void | glGenSamplers(IntBuffer
a buffer in which the generated sampler object names are stored samplers)Generates sampler object names. | ||||||||||||
| public static int | |||||||||||||
| public static void | |||||||||||||
| public static float | glGetSamplerParameterf(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname)Float version of | ||||||||||||
| public static void | glGetSamplerParameterfv(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname, FloatBuffer the sampler parameters params)Float version of | ||||||||||||
| public static void | glGetSamplerParameterfv(int sampler, int pname, float[] params)
Array version of: | ||||||||||||
| public static int | glGetSamplerParameteri(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter. One of: pname)
Return the integer value(s) of a sampler parameter. | ||||||||||||
| public static int | glGetSamplerParameterIi(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname)Pure integer version of | ||||||||||||
| public static void | glGetSamplerParameterIiv(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname, IntBuffer the sampler parameters params)Pure integer version of | ||||||||||||
| public static void | glGetSamplerParameterIiv(int sampler, int pname, int[] params)
Array version of: | ||||||||||||
| public static int | glGetSamplerParameterIui(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname)Unsigned pure integer version of | ||||||||||||
| public static void | glGetSamplerParameterIuiv(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter pname, IntBuffer the sampler parameters params)Unsigned pure integer version of | ||||||||||||
| public static void | glGetSamplerParameterIuiv(int sampler, int pname, int[] params)
Array version of: | ||||||||||||
| public static void | glGetSamplerParameteriv(int
the name of the sampler object from which to retrieve parameters sampler, int the symbolic name of a sampler parameter. One of: pname, IntBuffer
the sampler parameters params)Return the integer value(s) of a sampler parameter. | ||||||||||||
| public static void | glGetSamplerParameteriv(int sampler, int pname, int[] params)
Array version of: | ||||||||||||
| public static boolean | glIsSampler(int
a value that may be the name of a sampler object sampler)Determines if a name corresponds to a sampler object. | ||||||||||||
| public static void | glSamplerParameterf(int
the sampler object whose parameter to modify sampler, int the symbolic name of a single-valued sampler parameter pname, float the value of param)pnameFloat version of | ||||||||||||
| public static void | glSamplerParameterfv(int
the sampler object whose parameter to modify sampler, int the symbolic name of a sampler parameter pname, FloatBuffer an array where the value or values of params)pname are storedFloat version of | ||||||||||||
| public static void | |||||||||||||
| public static void | glSamplerParameteri(int
the sampler object whose parameter to modify sampler, int the symbolic name of a single-valued sampler parameter. One of: pname, int
the value of param)pnameSet the integer value of a sampler parameter. | ||||||||||||
| public static void | glSamplerParameterIiv(int
the sampler object whose parameter to modify sampler, int the symbolic name of a sampler parameter pname, IntBuffer an array where the value or values of params)pname are storedPure integer version of | ||||||||||||
| public static void | |||||||||||||
| public static void | glSamplerParameterIuiv(int
the sampler object whose parameter to modify sampler, int the symbolic name of a sampler parameter pname, IntBuffer an array where the value or values of params)pname are storedUnsigned pure integer version of | ||||||||||||
| public static void | |||||||||||||
| public static void | glSamplerParameteriv(int
the sampler object whose parameter to modify sampler, int the symbolic name of a sampler parameter. One of: pname, IntBuffer
an array where the value or values of params)pname are storedPointer version of | ||||||||||||
| public static void | |||||||||||||
| public static void | nglDeleteSamplers(int
the number of sampler objects to be deleted count, long samplers)Unsafe version of: | ||||||||||||
| public static void | nglGenSamplers(int
the number of sampler object names to generate count, long samplers)Unsafe version of: | ||||||||||||
| public static void | nglGetSamplerParameterfv(int sampler, int pname, long params)
Unsafe version of: | ||||||||||||
| public static void | nglGetSamplerParameterIiv(int sampler, int pname, long params)
Unsafe version of: | ||||||||||||
| public static void | nglGetSamplerParameterIuiv(int sampler, int pname, long params)
Unsafe version of: | ||||||||||||
| public static void | nglGetSamplerParameteriv(int sampler, int pname, long params)
Unsafe version of: | ||||||||||||
| public static void | |||||||||||||
| public static void | |||||||||||||
| public static void | |||||||||||||
| public static void |
| GL_SAMPLER_BINDING | back to summary |
|---|---|
| public static final int GL_SAMPLER_BINDING Accepted by the | |
| ARBSamplerObjects | back to summary |
|---|---|
| protected ARBSamplerObjects() | |
| glBindSampler | back to summary |
|---|---|
| public static void glBindSampler(int unit, int sampler) Binds a named sampler to a texturing target.
| |
| glDeleteSamplers | back to summary |
|---|---|
| public static void glDeleteSamplers(IntBuffer samplers) Deletes named sampler objects.
| |
| glDeleteSamplers | back to summary |
|---|---|
| public static void glDeleteSamplers(int sampler) Deletes named sampler objects. | |
| glDeleteSamplers | back to summary |
|---|---|
| public static void glDeleteSamplers(int[] samplers) Array version of: | |
| glGenSamplers | back to summary |
|---|---|
| public static void glGenSamplers(IntBuffer samplers) Generates sampler object names.
| |
| glGenSamplers | back to summary |
|---|---|
| public static int glGenSamplers() Generates sampler object names.
| |
| glGenSamplers | back to summary |
|---|---|
| public static void glGenSamplers(int[] samplers) Array version of: | |
| glGetSamplerParameterf | back to summary |
|---|---|
| public static float glGetSamplerParameterf(int sampler, int pname) Float version of
| |
| glGetSamplerParameterfv | back to summary |
|---|---|
| public static void glGetSamplerParameterfv(int sampler, int pname, FloatBuffer params) Float version of
| |
| glGetSamplerParameterfv | back to summary |
|---|---|
| public static void glGetSamplerParameterfv(int sampler, int pname, float[] params) Array version of: | |
| glGetSamplerParameteri | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static int glGetSamplerParameteri(int sampler, int pname) Return the integer value(s) of a sampler parameter.
| |||||||||||||
| glGetSamplerParameterIi | back to summary |
|---|---|
| public static int glGetSamplerParameterIi(int sampler, int pname) Pure integer version of
| |
| glGetSamplerParameterIiv | back to summary |
|---|---|
| public static void glGetSamplerParameterIiv(int sampler, int pname, IntBuffer params) Pure integer version of
| |
| glGetSamplerParameterIiv | back to summary |
|---|---|
| public static void glGetSamplerParameterIiv(int sampler, int pname, int[] params) Array version of: | |
| glGetSamplerParameterIui | back to summary |
|---|---|
| public static int glGetSamplerParameterIui(int sampler, int pname) Unsigned pure integer version of
| |
| glGetSamplerParameterIuiv | back to summary |
|---|---|
| public static void glGetSamplerParameterIuiv(int sampler, int pname, IntBuffer params) Unsigned pure integer version of
| |
| glGetSamplerParameterIuiv | back to summary |
|---|---|
| public static void glGetSamplerParameterIuiv(int sampler, int pname, int[] params) Array version of: | |
| glGetSamplerParameteriv | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glGetSamplerParameteriv(int sampler, int pname, IntBuffer params) Return the integer value(s) of a sampler parameter.
| |||||||||||||
| glGetSamplerParameteriv | back to summary |
|---|---|
| public static void glGetSamplerParameteriv(int sampler, int pname, int[] params) Array version of: | |
| glIsSampler | back to summary |
|---|---|
| public static boolean glIsSampler(int sampler) Determines if a name corresponds to a sampler object.
| |
| glSamplerParameterf | back to summary |
|---|---|
| public static void glSamplerParameterf(int sampler, int pname, float param) Float version of
| |
| glSamplerParameterfv | back to summary |
|---|---|
| public static void glSamplerParameterfv(int sampler, int pname, FloatBuffer params) Float version of
| |
| glSamplerParameterfv | back to summary |
|---|---|
| public static void glSamplerParameterfv(int sampler, int pname, float[] params) Array version of: | |
| glSamplerParameteri | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glSamplerParameteri(int sampler, int pname, int param) Set the integer value of a sampler parameter.
| |||||||||||
| glSamplerParameterIiv | back to summary |
|---|---|
| public static void glSamplerParameterIiv(int sampler, int pname, IntBuffer params) Pure integer version of
| |
| glSamplerParameterIiv | back to summary |
|---|---|
| public static void glSamplerParameterIiv(int sampler, int pname, int[] params) Array version of: | |
| glSamplerParameterIuiv | back to summary |
|---|---|
| public static void glSamplerParameterIuiv(int sampler, int pname, IntBuffer params) Unsigned pure integer version of
| |
| glSamplerParameterIuiv | back to summary |
|---|---|
| public static void glSamplerParameterIuiv(int sampler, int pname, int[] params) Array version of: | |
| glSamplerParameteriv | back to summary | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void glSamplerParameteriv(int sampler, int pname, IntBuffer params) Pointer version of
| ||||||||||||
| glSamplerParameteriv | back to summary |
|---|---|
| public static void glSamplerParameteriv(int sampler, int pname, int[] params) Array version of: | |
| nglDeleteSamplers | back to summary |
|---|---|
| public static void nglDeleteSamplers(int count, long samplers) Unsafe version of:
| |
| nglGenSamplers | back to summary |
|---|---|
| public static void nglGenSamplers(int count, long samplers) Unsafe version of:
| |
| nglGetSamplerParameterfv | back to summary |
|---|---|
| public static void nglGetSamplerParameterfv(int sampler, int pname, long params) Unsafe version of: | |
| nglGetSamplerParameterIiv | back to summary |
|---|---|
| public static void nglGetSamplerParameterIiv(int sampler, int pname, long params) Unsafe version of: | |
| nglGetSamplerParameterIuiv | back to summary |
|---|---|
| public static void nglGetSamplerParameterIuiv(int sampler, int pname, long params) Unsafe version of: | |
| nglGetSamplerParameteriv | back to summary |
|---|---|
| public static void nglGetSamplerParameteriv(int sampler, int pname, long params) Unsafe version of: | |
| nglSamplerParameterfv | back to summary |
|---|---|
| public static void nglSamplerParameterfv(int sampler, int pname, long params) Unsafe version of: | |
| nglSamplerParameterIiv | back to summary |
|---|---|
| public static void nglSamplerParameterIiv(int sampler, int pname, long params) Unsafe version of: | |
| nglSamplerParameterIuiv | back to summary |
|---|---|
| public static void nglSamplerParameterIuiv(int sampler, int pname, long params) Unsafe version of: | |
| nglSamplerParameteriv | back to summary |
|---|---|
| public static void nglSamplerParameteriv(int sampler, int pname, long params) Unsafe version of: | |