OpenSceneGraph  3.0.1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes
osg::ShaderBinary Class Reference

Simple class for wrapping up the data used in OpenGL ES 2's glShaderBinary calls. More...

Inheritance diagram for osg::ShaderBinary:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ShaderBinary ()
 ShaderBinary (const ShaderBinary &rhs, const osg::CopyOp &copyop=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 ShaderBinaryreadShaderBinaryFile (const std::string &fileName)
 Read shader binary from file.

Protected Types

typedef std::vector< unsigned
char > 
Data

Protected Attributes

Data _data

Detailed Description

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.


Member Typedef Documentation

typedef std::vector<unsigned char> osg::ShaderBinary::Data [protected]

Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation


The documentation for this class was generated from the following file:

osg logo
Generated at Mon Oct 3 2011 12:39:43 for the OpenSceneGraph by doxygen 1.7.5.