|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.neovisionaries.android.opengl.Sampler
public class Sampler
A class to manipulate a uniform sampler variable in OpenGL Shader Language.
// E X A M P L E // Get a program from somewhere.Programprogram = ...; // Get an accessor to a uniform sampler variable.Samplers_texture = program.getSampler("s_texture"); // Get a texture from somewhere.Texture<?> texture = ...; // Set the texture to the uniform sampler variable. s_texture.set(texture);
| Constructor Summary | |
|---|---|
Sampler(Program program,
String name)
A constructor. |
|
| Method Summary | |
|---|---|
int |
getLocation()
Get the location of this uniform sampler variable. |
Sampler |
set(Texture<?> texture)
Set a texture to this uniform sampler variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sampler(Program program,
String name)
throws GLESException
program - name -
IllegalArgumentException - Either or both of the arguments are null.
GLESException - There is no such a uniform variable having the specified name.Program.getSampler(String)| Method Detail |
|---|
public int getLocation()
public Sampler set(Texture<?> texture)
This method does the same thing as glUniformli(getLocation(), texture.getUnit()).
texture - A texture to set to this uniform sampler variable.
IllegalArgumentException - The argumenet is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||