|
openscenegraph
|
Public Member Functions | |
| ShaderBinary () | |
| ShaderBinary (const ShaderBinary &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| META_Object (osg, ShaderBinary) | |
| void | assign (unsigned int size, const unsigned char *data) |
| unsigned int | getSize () const |
| unsigned char * | getData () |
| const unsigned char * | getData () const |
Static Public Member Functions | |
| static ShaderBinary * | readShaderBinaryFile (const std::string &fileName) |
Protected Types | |
| typedef std::vector< unsigned char > | Data |
Protected Attributes | |
| Data | _data |
Simple class for wrapping up the data used in OpenGL ES 2's glShaderBinary calls. ShaderBinary is set up with the binary data then assigned to one or more osg::Shader.
typedef std::vector<unsigned char> osg::ShaderBinary::Data [protected] |
| osg::ShaderBinary::ShaderBinary | ( | const ShaderBinary & | rhs, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy constructor using CopyOp to manage deep vs shallow copy.
| void osg::ShaderBinary::assign | ( | unsigned int | size, |
| const unsigned char * | data | ||
| ) |
Allocated a data buffer of specified size/*/ void allocate(unsigned int size);
/** Assign shader binary data, copying the specified data into locally stored data buffer, the original data can then be deleted.
| unsigned char* osg::ShaderBinary::getData | ( | ) | [inline] |
Get a ptr to the shader binary data.
| const unsigned char* osg::ShaderBinary::getData | ( | ) | const [inline] |
Get a const ptr to the shader binary data.
| unsigned int osg::ShaderBinary::getSize | ( | ) | const [inline] |
Get the size of the shader binary data.
| osg::ShaderBinary::META_Object | ( | osg | , |
| ShaderBinary | |||
| ) |
| static ShaderBinary* osg::ShaderBinary::readShaderBinaryFile | ( | const std::string & | fileName | ) | [static] |
Read shader binary from file. Return the resulting Shader or 0 if no valid shader binary could be read.
Data osg::ShaderBinary::_data [protected] |
1.7.6.1