Sceneview
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | Friends | List of all members
sv::ShaderResource Class Reference

An OpenGL shader program. More...

#include <sceneview/shader_resource.hpp>

Public Types

typedef std::shared_ptr
< ShaderResource
Ptr
 

Public Member Functions

const QString Name () const
 
void LoadFromFiles (const QString &prefix)
 Loads a vertex shader and fragment shader into this resource. More...
 
void LoadFromFiles (const QString &prefix, const QString &preamble)
 Loads a vertex shader and fragment shader into this resource. More...
 
QOpenGLShaderProgram * Program ()
 
const ShaderStandardVariablesStandardVariables () const
 

Friends

class ResourceManager
 

Detailed Description

An OpenGL shader program.

ShaderResource objects cannot be directly instantiated. Instead, use ResourceManager or StockResources.

Member Function Documentation

void sv::ShaderResource::LoadFromFiles ( const QString &  prefix)

Loads a vertex shader and fragment shader into this resource.

filename prefix. ".vshader" will automatically be added to the vertex shader filename, and ".fshader" will automatically be added to the fragment shader filename.

void sv::ShaderResource::LoadFromFiles ( const QString &  prefix,
const QString &  preamble 
)

Loads a vertex shader and fragment shader into this resource.

Parameters
prefixfilename prefix. ".vshader" will automatically be added to the vertex shader filename, and ".fshader" will automatically be added to the fragment shader filename.
preambletext to prepend to both the vertex and fragment shaders before compiling. You can use this to define preprocessor constants, etc.

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