uicore::ShaderObject Class Referenceabstract

Shader Object. More...

#include <shader_object.h>

Public Member Functions

virtual void compile ()=0
 Compile program. More...
 
virtual std::string info_log () const =0
 Get shader object's info log. More...
 
virtual std::string shader_source () const =0
 Get shader source code. More...
 
virtual ShaderType shader_type () const =0
 Gets the shader type. More...
 
virtual bool try_compile ()=0
 Compile program. More...
 

Static Public Member Functions

static std::shared_ptr< ShaderObjectcreate (const GraphicContextPtr &gc, ShaderType type, const std::string &source)
 Constructs a shader. More...
 
static std::shared_ptr< ShaderObjectcreate (const GraphicContextPtr &gc, ShaderType type, const void *bytecode, int bytecode_size)
 
static std::shared_ptr< ShaderObjectload (const GraphicContextPtr &gc, ShaderType type, const std::string &fullname)
 Load. More...
 
static std::shared_ptr< ShaderObjectload (const GraphicContextPtr &gc, ShaderType type, const IODevicePtr &file)
 
static std::shared_ptr< ShaderObjectload_and_compile (const GraphicContextPtr &gc, ShaderType type, const std::string &filename)
 Load and compile. More...
 
static std::shared_ptr< ShaderObjectload_and_compile (const GraphicContextPtr &gc, ShaderType type, const IODevicePtr &file)
 

Detailed Description

Shader Object.

Member Function Documentation

virtual void uicore::ShaderObject::compile ( )
pure virtual

Compile program.

An exception will be thrown if the compiling fails

static std::shared_ptr<ShaderObject> uicore::ShaderObject::create ( const GraphicContextPtr gc,
ShaderType  type,
const std::string source 
)
static

Constructs a shader.

static std::shared_ptr<ShaderObject> uicore::ShaderObject::create ( const GraphicContextPtr gc,
ShaderType  type,
const void *  bytecode,
int  bytecode_size 
)
static
virtual std::string uicore::ShaderObject::info_log ( ) const
pure virtual

Get shader object's info log.

static std::shared_ptr<ShaderObject> uicore::ShaderObject::load ( const GraphicContextPtr gc,
ShaderType  type,
const std::string fullname 
)
static

Load.

static std::shared_ptr<ShaderObject> uicore::ShaderObject::load ( const GraphicContextPtr gc,
ShaderType  type,
const IODevicePtr file 
)
static
static std::shared_ptr<ShaderObject> uicore::ShaderObject::load_and_compile ( const GraphicContextPtr gc,
ShaderType  type,
const std::string filename 
)
static

Load and compile.

static std::shared_ptr<ShaderObject> uicore::ShaderObject::load_and_compile ( const GraphicContextPtr gc,
ShaderType  type,
const IODevicePtr file 
)
static
virtual std::string uicore::ShaderObject::shader_source ( ) const
pure virtual

Get shader source code.

virtual ShaderType uicore::ShaderObject::shader_type ( ) const
pure virtual

Gets the shader type.

virtual bool uicore::ShaderObject::try_compile ( )
pure virtual

Compile program.

If the compiling fails, info_log() will return the compile log


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