OpenSceneGraph
3.0.1
|
Simple class for wrapping up the data used in OpenGL ES 2's glShaderBinary calls. More...
Public Member Functions | |
ShaderBinary () | |
ShaderBinary (const ShaderBinary &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Object (osg, ShaderBinary) | |
void | assign (unsigned int size, const unsigned char *data) |
Allocated a data buffer of specified size/*/ void allocate(unsigned int size);. | |
unsigned int | getSize () const |
Get the size of the shader binary data. | |
unsigned char * | getData () |
Get a ptr to the shader binary data. | |
const unsigned char * | getData () const |
Get a const ptr to the shader binary data. | |
Static Public Member Functions | |
static ShaderBinary * | readShaderBinaryFile (const std::string &fileName) |
Read shader binary from file. | |
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 | ( | ) |
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] |
![]() | Generated at Mon Oct 3 2011 12:39:43 for the OpenSceneGraph by doxygen 1.7.5. |