Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBSamplerObjects

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

Native bindings to the ARB_sampler_objects extension.

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.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_SAMPLER_BINDING

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

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod 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
glDeleteSamplers(int sampler)

Deletes named sampler objects.

public static void
glDeleteSamplers(int[] samplers)

Array version of: DeleteSamplers

public static void
glGenSamplers(IntBuffer
a buffer in which the generated sampler object names are stored
samplers
)

Generates sampler object names.

public static int
glGenSamplers()

Generates sampler object names.

public static void
glGenSamplers(int[] samplers)

Array version of: GenSamplers

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 GetSamplerParameteriv.

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 GetSamplerParameteriv.

public static void
glGetSamplerParameterfv(int sampler, int pname, float[] params)

Array version of: GetSamplerParameterfv

public static int
glGetSamplerParameteri(int
the name of the sampler object from which to retrieve parameters
sampler
,
int 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 GetSamplerParameteriv.

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 GetSamplerParameteriv.

public static void
glGetSamplerParameterIiv(int sampler, int pname, int[] params)

Array version of: GetSamplerParameterIiv

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 GetSamplerParameteriv.

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 GetSamplerParameteriv.

public static void
glGetSamplerParameterIuiv(int sampler, int pname, int[] params)

Array version of: GetSamplerParameterIuiv

public static void
glGetSamplerParameteriv(int
the name of the sampler object from which to retrieve parameters
sampler
,
int 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: GetSamplerParameteriv

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 pname
param
)

Float version of SamplerParameteri.

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 pname are stored
params
)

Float version of SamplerParameteriv.

public static void
glSamplerParameterfv(int sampler, int pname, float[] params)

Array version of: SamplerParameterfv

public static void
glSamplerParameteri(int
the sampler object whose parameter to modify
sampler
,
int pname, int
the value of pname
param
)

Set 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 pname are stored
params
)

Pure integer version of SamplerParameteriv.

public static void
glSamplerParameterIiv(int sampler, int pname, int[] params)

Array version of: SamplerParameterIiv

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 pname are stored
params
)

Unsigned pure integer version of SamplerParameteriv.

public static void
glSamplerParameterIuiv(int sampler, int pname, int[] params)

Array version of: SamplerParameterIuiv

public static void
glSamplerParameteriv(int
the sampler object whose parameter to modify
sampler
,
int pname, IntBuffer
an array where the value or values of pname are stored
params
)

Pointer version of SamplerParameteri.

public static void
glSamplerParameteriv(int sampler, int pname, int[] params)

Array version of: SamplerParameteriv

public static void
nglDeleteSamplers(int
the number of sampler objects to be deleted
count
,
long samplers)

Unsafe version of: DeleteSamplers

public static void
nglGenSamplers(int
the number of sampler object names to generate
count
,
long samplers)

Unsafe version of: GenSamplers

public static void
nglGetSamplerParameterfv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterfv

public static void
nglGetSamplerParameterIiv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterIiv

public static void
nglGetSamplerParameterIuiv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterIuiv

public static void
nglGetSamplerParameteriv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameteriv

public static void
nglSamplerParameterfv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterfv

public static void
nglSamplerParameterIiv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterIiv

public static void
nglSamplerParameterIuiv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterIuiv

public static void
nglSamplerParameteriv(int sampler, int pname, long params)

Unsafe version of: SamplerParameteriv

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_SAMPLER_BINDINGback to summary
public static final int GL_SAMPLER_BINDING

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

Constructor Detail

ARBSamplerObjectsback to summary
protected ARBSamplerObjects()

Method Detail

glBindSamplerback to summary
public static void glBindSampler(int unit, int sampler)

Binds a named sampler to a texturing target.

Parameters
unit:int

the index of the texture unit to which the sampler is bound

sampler:int

the name of a sampler

glDeleteSamplersback to summary
public static void glDeleteSamplers(IntBuffer samplers)

Deletes named sampler objects.

Parameters
samplers:IntBuffer

an array of sampler objects to be deleted

glDeleteSamplersback to summary
public static void glDeleteSamplers(int sampler)

Deletes named sampler objects.

glDeleteSamplersback to summary
public static void glDeleteSamplers(int[] samplers)

Array version of: DeleteSamplers

glGenSamplersback to summary
public static void glGenSamplers(IntBuffer samplers)

Generates sampler object names.

Parameters
samplers:IntBuffer

a buffer in which the generated sampler object names are stored

glGenSamplersback to summary
public static int glGenSamplers()

Generates sampler object names.

Annotations
@NativeType:void
glGenSamplersback to summary
public static void glGenSamplers(int[] samplers)

Array version of: GenSamplers

glGetSamplerParameterfback to summary
public static float glGetSamplerParameterf(int sampler, int pname)

Float version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

Annotations
@NativeType:void
glGetSamplerParameterfvback to summary
public static void glGetSamplerParameterfv(int sampler, int pname, FloatBuffer params)

Float version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

params:FloatBuffer

the sampler parameters

glGetSamplerParameterfvback to summary
public static void glGetSamplerParameterfv(int sampler, int pname, float[] params)

Array version of: GetSamplerParameterfv

glGetSamplerParameteriback to summary
public static int glGetSamplerParameteri(int sampler, int pname)

Return the integer value(s) of a sampler parameter.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter. One of:

TEXTURE_WRAP_STEXTURE_WRAP_TTEXTURE_WRAP_RTEXTURE_MIN_FILTERTEXTURE_MAG_FILTER
TEXTURE_MIN_LODTEXTURE_MAX_LODTEXTURE_LOD_BIASTEXTURE_COMPARE_MODETEXTURE_COMPARE_FUNC
,TEXTURE_BORDER_COLOR
Annotations
@NativeType:void
glGetSamplerParameterIiback to summary
public static int glGetSamplerParameterIi(int sampler, int pname)

Pure integer version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

Annotations
@NativeType:void
glGetSamplerParameterIivback to summary
public static void glGetSamplerParameterIiv(int sampler, int pname, IntBuffer params)

Pure integer version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

params:IntBuffer

the sampler parameters

glGetSamplerParameterIivback to summary
public static void glGetSamplerParameterIiv(int sampler, int pname, int[] params)

Array version of: GetSamplerParameterIiv

glGetSamplerParameterIuiback to summary
public static int glGetSamplerParameterIui(int sampler, int pname)

Unsigned pure integer version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

Annotations
@NativeType:void
glGetSamplerParameterIuivback to summary
public static void glGetSamplerParameterIuiv(int sampler, int pname, IntBuffer params)

Unsigned pure integer version of GetSamplerParameteriv.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter

params:IntBuffer

the sampler parameters

glGetSamplerParameterIuivback to summary
public static void glGetSamplerParameterIuiv(int sampler, int pname, int[] params)

Array version of: GetSamplerParameterIuiv

glGetSamplerParameterivback to summary
public static void glGetSamplerParameteriv(int sampler, int pname, IntBuffer params)

Return the integer value(s) of a sampler parameter.

Parameters
sampler:int

the name of the sampler object from which to retrieve parameters

pname:int

the symbolic name of a sampler parameter. One of:

TEXTURE_WRAP_STEXTURE_WRAP_TTEXTURE_WRAP_RTEXTURE_MIN_FILTERTEXTURE_MAG_FILTER
TEXTURE_MIN_LODTEXTURE_MAX_LODTEXTURE_LOD_BIASTEXTURE_COMPARE_MODETEXTURE_COMPARE_FUNC
,TEXTURE_BORDER_COLOR
params:IntBuffer

the sampler parameters

glGetSamplerParameterivback to summary
public static void glGetSamplerParameteriv(int sampler, int pname, int[] params)

Array version of: GetSamplerParameteriv

glIsSamplerback to summary
public static boolean glIsSampler(int sampler)

Determines if a name corresponds to a sampler object.

Parameters
sampler:int

a value that may be the name of a sampler object

Annotations
@NativeType:GLboolean
glSamplerParameterfback to summary
public static void glSamplerParameterf(int sampler, int pname, float param)

Float version of SamplerParameteri.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a single-valued sampler parameter

param:float

the value of pname

glSamplerParameterfvback to summary
public static void glSamplerParameterfv(int sampler, int pname, FloatBuffer params)

Float version of SamplerParameteriv.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a sampler parameter

params:FloatBuffer

an array where the value or values of pname are stored

glSamplerParameterfvback to summary
public static void glSamplerParameterfv(int sampler, int pname, float[] params)

Array version of: SamplerParameterfv

glSamplerParameteriback to summary
public static void glSamplerParameteri(int sampler, int pname, int param)

Set the integer value of a sampler parameter.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a single-valued sampler parameter. One of:

TEXTURE_WRAP_STEXTURE_WRAP_TTEXTURE_WRAP_RTEXTURE_MIN_FILTERTEXTURE_MAG_FILTER
TEXTURE_MIN_LODTEXTURE_MAX_LODTEXTURE_LOD_BIASTEXTURE_COMPARE_MODETEXTURE_COMPARE_FUNC
param:int

the value of pname

glSamplerParameterIivback to summary
public static void glSamplerParameterIiv(int sampler, int pname, IntBuffer params)

Pure integer version of SamplerParameteriv.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a sampler parameter

params:IntBuffer

an array where the value or values of pname are stored

glSamplerParameterIivback to summary
public static void glSamplerParameterIiv(int sampler, int pname, int[] params)

Array version of: SamplerParameterIiv

glSamplerParameterIuivback to summary
public static void glSamplerParameterIuiv(int sampler, int pname, IntBuffer params)

Unsigned pure integer version of SamplerParameteriv.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a sampler parameter

params:IntBuffer

an array where the value or values of pname are stored

glSamplerParameterIuivback to summary
public static void glSamplerParameterIuiv(int sampler, int pname, int[] params)

Array version of: SamplerParameterIuiv

glSamplerParameterivback to summary
public static void glSamplerParameteriv(int sampler, int pname, IntBuffer params)

Pointer version of SamplerParameteri.

Parameters
sampler:int

the sampler object whose parameter to modify

pname:int

the symbolic name of a sampler parameter. One of:

TEXTURE_BORDER_COLORTEXTURE_WRAP_STEXTURE_WRAP_TTEXTURE_WRAP_R
TEXTURE_MIN_FILTERTEXTURE_MAG_FILTERTEXTURE_MIN_LODTEXTURE_MAX_LOD
TEXTURE_LOD_BIASTEXTURE_COMPARE_MODETEXTURE_COMPARE_FUNC
params:IntBuffer

an array where the value or values of pname are stored

glSamplerParameterivback to summary
public static void glSamplerParameteriv(int sampler, int pname, int[] params)

Array version of: SamplerParameteriv

nglDeleteSamplersback to summary
public static void nglDeleteSamplers(int count, long samplers)

Unsafe version of: DeleteSamplers

Parameters
count:int

the number of sampler objects to be deleted

nglGenSamplersback to summary
public static void nglGenSamplers(int count, long samplers)

Unsafe version of: GenSamplers

Parameters
count:int

the number of sampler object names to generate

nglGetSamplerParameterfvback to summary
public static void nglGetSamplerParameterfv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterfv

nglGetSamplerParameterIivback to summary
public static void nglGetSamplerParameterIiv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterIiv

nglGetSamplerParameterIuivback to summary
public static void nglGetSamplerParameterIuiv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameterIuiv

nglGetSamplerParameterivback to summary
public static void nglGetSamplerParameteriv(int sampler, int pname, long params)

Unsafe version of: GetSamplerParameteriv

nglSamplerParameterfvback to summary
public static void nglSamplerParameterfv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterfv

nglSamplerParameterIivback to summary
public static void nglSamplerParameterIiv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterIiv

nglSamplerParameterIuivback to summary
public static void nglSamplerParameterIuiv(int sampler, int pname, long params)

Unsafe version of: SamplerParameterIuiv

nglSamplerParameterivback to summary
public static void nglSamplerParameteriv(int sampler, int pname, long params)

Unsafe version of: SamplerParameteriv