|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.shader.ShaderProgram
public class ShaderProgram
Stores information on an OpenGL Shading Language "program" object.
The vertex shader object, fragment shader object, and the "program"
object they are linked with are all stored on the graphics card.
OpenGL assigns an integer reference (a C language type handle) that
is needed by OpenGL commands that work with these objects. This Java
class stores these integer references, as well as the Java File
objects that refer to the shader source code files.
This class is only for storing information. The ShaderProgramFactory
has the methods used to compile and link shaders, as well as a method
to delete them from graphics card memory.
Constructor Summary | |
---|---|
ShaderProgram()
Constructs a ShaderProgram object to store info on an OpenGL Shading Language "program" object. |
|
ShaderProgram(File vertFile,
File fragFile,
ShaderEnum pair)
Constructs a ShaderProgram object to store info on an OpenGL Shading Language "program" object. |
Method Summary | |
---|---|
File |
getFragFile()
Returns the File the fragment shader source code was obtained from. |
int |
getFragShaderName()
Returns the name (an integer) of the fragment shader object. |
ShaderEnum |
getPair()
Returns the type of shader pair (vertex and fragment pair). |
int |
getProgramName()
Returns the name (an integer) of the OpenGL Shading Language "program" object. |
File |
getVertFile()
Returns the File the vertex shader source code was obtained from. |
int |
getVertShaderName()
Returns the name (an integer) of the vertex shader object. |
void |
setFragFile(File fragFile)
Sets the fragment shader source code File. |
void |
setFragShaderName(int fragShaderName)
Sets the name (an integer) of the OpenGL fragment shader object. |
void |
setPair(ShaderEnum pair)
Sets the type of shader pair (vertex and fragment pair). |
void |
setProgramName(int programName)
Sets the name (an integer) of the OpenGL Shading Language "program" object. |
void |
setVertFile(File vertFile)
Sets the vertex shader source code File. |
void |
setVertShaderName(int vertShaderName)
Sets the name (an integer) of the OpenGL vertex shader object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShaderProgram(File vertFile, File fragFile, ShaderEnum pair)
vertFile
- the file with the vertex shader source code.fragFile
- the file with the fragment shader source code.pair
- the ShaderEnum that the vertex and fragment shader
filenames were originally stored in.public ShaderProgram()
Method Detail |
---|
public ShaderEnum getPair()
public void setPair(ShaderEnum pair)
pair
- the type of shader pair.public int getProgramName()
public void setProgramName(int programName)
programName
- the name (an integer) of the OpenGL "program"
object.public int getVertShaderName()
public void setVertShaderName(int vertShaderName)
vertShaderName
- the name (an integer) of the vertex shader.public int getFragShaderName()
public void setFragShaderName(int fragShaderName)
fragShaderName
- the name (an integer) of the fragment
shader.public File getVertFile()
public void setVertFile(File vertFile)
vertFile
- the vertex shader File.public File getFragFile()
public void setFragFile(File fragFile)
fragFile
- the fragment shader File.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |