Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

StelProjector::GLSLProjector Class Reference

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

#include <StelProjector.hpp>

List of all members.

Public Member Functions

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

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:
shader Shader 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:
shader Shader previously passed to init() in bound state, ready to set uniforms.

The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:46 2013 for Stellarium by  doxygen 1.6.3