openMSX
Public Member Functions | Protected Member Functions | Friends | List of all members
openmsx::Shader Class Reference

Wrapper around an OpenGL shader: a program executed on the GPU. More...

#include <GLUtil.hh>

Inheritance diagram for openmsx::Shader:
Inheritance graph
[legend]

Public Member Functions

bool isOK () const
 Returns true iff this shader is loaded and compiled without errors. More...
 

Protected Member Functions

 Shader (GLenum type, const std::string &filename)
 Instantiates a shader. More...
 
 Shader (GLenum type, const std::string &header, const std::string &filename)
 
 ~Shader ()
 

Friends

class ShaderProgram
 

Detailed Description

Wrapper around an OpenGL shader: a program executed on the GPU.

This class is a base class for vertex and fragment shaders.

Definition at line 384 of file GLUtil.hh.

Constructor & Destructor Documentation

openmsx::Shader::Shader ( GLenum  type,
const std::string &  filename 
)
protected

Instantiates a shader.

Parameters
typeThe shader type: GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
filenameThe GLSL source code for the shader.

Definition at line 221 of file GLUtil.cc.

openmsx::Shader::Shader ( GLenum  type,
const std::string &  header,
const std::string &  filename 
)
protected

Definition at line 226 of file GLUtil.cc.

openmsx::Shader::~Shader ( )
protected

Definition at line 269 of file GLUtil.cc.

Member Function Documentation

bool openmsx::Shader::isOK ( ) const

Returns true iff this shader is loaded and compiled without errors.

Definition at line 274 of file GLUtil.cc.

Referenced by openmsx::ShaderProgram::attach().

Friends And Related Function Documentation

friend class ShaderProgram
friend

Definition at line 405 of file GLUtil.hh.


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