34 #include "../../Core/IOData/file_system.h" 35 #include "graphic_context.h" 43 class GraphicContextProvider;
44 class XMLResourceDocument;
45 class ShaderObject_Impl;
46 class ShaderObjectProvider;
185 explicit operator bool()
const {
return bool(impl); }
203 std::shared_ptr<ShaderObject_Impl> impl;
Shader Object.
Definition: shader_object.h:67
bool is_null() const
Returns true if this object is invalid.
Definition: shader_object.h:184
I/O Device interface.
Definition: iodevice.h:49
Interface for implementing a GraphicContext target.
Definition: graphic_context_provider.h:85
static ShaderObject load_and_compile(GraphicContext &gc, ShaderType type, const std::string &filename, const FileSystem &fs)
Load and compile.
std::string get_shader_source() const
Get shader source code.
ShaderObject()
Constructs a null instance.
ShaderType get_shader_type() const
Gets the shader type.
std::string get_info_log() const
Get shader object's info log.
Shader Object provider.
Definition: shader_object_provider.h:41
Virtual File System (VFS).
Definition: file_system.h:46
ShaderType
Shader Type.
Definition: shader_object.h:49
bool operator==(const ShaderObject &other) const
Handle comparison operator.
ShaderObjectProvider * get_provider() const
Get Provider.
Interface to drawing graphics.
Definition: graphic_context.h:256
XML Resource Document.
Definition: xml_resource_document.h:47
static ShaderObject load(GraphicContext &gc, const std::string &resource_id, const XMLResourceDocument &resources)
Load.
bool compile()
Compile program.
unsigned int get_handle() const
Returns the OpenGL shader handle.
void throw_if_null() const
Throw an exception if this object is invalid.