|
Public Types |
enum | Type { VERTEX = GL_VERTEX_SHADER,
FRAGMENT = GL_FRAGMENT_SHADER,
UNDEFINED = -1
} |
Public Member Functions |
| Shader (Type type=UNDEFINED) |
| Shader (Type type, const std::string &source) |
| Shader (const Shader &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
| META_Object (osg, Shader) |
int | compare (const Shader &rhs) const |
bool | setType (Type t) |
void | setShaderSource (const std::string &sourceText) |
bool | loadShaderSourceFromFile (const std::string &fileName) |
const std::string & | getShaderSource () const |
Type | getType () const |
const char * | getTypename () const |
void | dirtyShader () |
void | compileShader (unsigned int contextID) const |
void | attachShader (unsigned int contextID, GLuint program) const |
bool | getGlShaderInfoLog (unsigned int contextID, std::string &log) const |
void | setName (const std::string &name) |
void | setName (const char *name) |
const std::string & | getName () const |
Static Public Member Functions |
Shader * | readShaderFile (Type type, const std::string &fileName) |
void | deleteGlShader (unsigned int contextID, GLuint shader) |
void | flushDeletedGlShaders (unsigned int contextID, double currentTime, double &availableTime) |
Shader::Type | getTypeId (const std::string &tname) |
Protected Types |
typedef std::set< Program * > | ProgramSet |
Protected Member Functions |
virtual | ~Shader () |
PerContextShader * | getPCS (unsigned int contextID) const |
bool | addProgramRef (Program *program) |
bool | removeProgramRef (Program *program) |
Protected Attributes |
Type | _type |
std::string | _name |
std::string | _shaderSource |
ProgramSet | _programSet |
osg::buffered_value< osg::ref_ptr<
PerContextShader > > | _pcsList |
Friends |
class | Program |