Stellarium 0.12.3
List of all members | Public Member Functions
StelProjector::GLSLProjector Class Referenceabstract

Base class for classes implementing vertex projection in GLSL. More...

#include <StelProjector.hpp>

Public Member Functions

virtual bool init (class StelGLSLShader *shader)=0
 Initialize GLSL projection. More...
 
virtual void preDraw (class StelGLSLShader *shader)=0
 Called after init() succeeds, directly before drawing. More...
 
virtual void postDraw (class StelGLSLShader *shader)=0
 Called after init() succeeds, after drawing. More...
 

Detailed Description

Base class for classes implementing vertex projection in GLSL.

Each StelProjector implementation can have its own GLSLProjector implementation implementing the project() member function in GLSL.

Definition at line 47 of file StelProjector.hpp.

Member Function Documentation

virtual bool StelProjector::GLSLProjector::init ( class StelGLSLShader shader)
pure virtual

Initialize GLSL projection.

Called by renderer backend before drawing.

This attempts to attach (or re-enable, if already attached) the projection GLSL code to specified shader.

This function may fail (e.g. due to a build error). In that case, the renderer will fall back to CPU projection.

Parameters
shaderShader to attach the GLSL projection code to.
Returns
true on success, false on failure.
virtual void StelProjector::GLSLProjector::postDraw ( class StelGLSLShader shader)
pure virtual

Called after init() succeeds, after drawing.

Used to disable the projection GLSL code.

virtual void StelProjector::GLSLProjector::preDraw ( class StelGLSLShader shader)
pure virtual

Called after init() succeeds, directly before drawing.

This is used to set up uniforms.

Parameters
shaderShader previously passed to init() in bound state, ready to set uniforms.

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