public class Program extends BaseObj
Modifier and Type | Class and Description |
---|---|
static class |
Program.BaseProgramBuilder |
static class |
Program.TextureType
TextureType specifies what textures are attached to Program
objects
|
Modifier and Type | Method and Description |
---|---|
void |
bindConstants(Allocation a,
int slot)
Binds a constant buffer to be used as uniform inputs to the
program
|
void |
bindSampler(Sampler vs,
int slot)
Binds an object that describes how a texture at the
corresponding location is sampled
|
void |
bindTexture(Allocation va,
int slot)
Binds a texture to be used in the program
|
Type |
getConstant(int slot)
Returns the type of the constant buffer used in the program
object.
|
int |
getConstantCount()
Program object can have zero or more constant allocations
associated with it.
|
int |
getTextureCount()
Returns the number of textures used in this program object
|
String |
getTextureName(int slot)
Returns the name of the texture input at a given slot. e.g.
|
Program.TextureType |
getTextureType(int slot)
Returns the type of texture at a given slot. e.g. 2D or Cube
|
public int getConstantCount()
public Type getConstant(int slot)
slot
- index of the constant input type to returnpublic int getTextureCount()
public Program.TextureType getTextureType(int slot)
slot
- index of the texture inputpublic String getTextureName(int slot)
slot
- index of the texture inputpublic void bindConstants(Allocation a, int slot)
a
- allocation containing uniform dataslot
- index within the program's list of constant
buffer allocationspublic void bindTexture(Allocation va, int slot) throws IllegalArgumentException
va
- allocation containing texture dataslot
- index within the program's list of texturesIllegalArgumentException
public void bindSampler(Sampler vs, int slot) throws IllegalArgumentException
vs
- sampler for a corresponding textureslot
- index within the program's list of textures to
use the sampler onIllegalArgumentException