The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::ProgrammableGeometry Struct Reference

A helper class to create a OpenGL geometry shader programs. More...

#include <ocean/GLvish/Programmable.hpp>

Inheritance diagram for Wizt::ProgrammableGeometry:
Wizt::Programmable

Public Member Functions

RefPtr< RenderBasin::ProgramCompileGeometryShader (VRenderContext &Context, const std::string &Name, const RenderBasin::Program::Setup &setup=nullptr) const
 Compile the shader into an OpenGL Program.
 
GL::render_primitives RenderPrimitive () const
 Provide the render primitive type for the input type of the associated geometry shader here.
 
- Public Member Functions inherited from Wizt::Programmable
RefPtr< RenderBasin::ProgramCompileShader (VRenderContext &Context, const std::string &Name, const RenderBasin::Program::Setup &SetupFunction=nullptr, const RefPtr< RenderBasin::Program > &ExistingProgram=NullPtr(), const glsl &LocalVertexShaderPrefixCode="", const glsl &LocalGeometryShaderPrefixCode="", const glsl &LocalFragmentShaderPrefixCode="") const
 Compile the shader into an OpenGL Program.
 
void enableViewportArray (bool EnableFragmentLayerViewport=true)
 
virtual glsl fragment_shader (VRenderContext &Context) const =0
 Vertexshader GLGS code.
 
virtual glsl geometry_shader (VRenderContext &Context) const
 Geometry GLGS code, not used here, only in subclass ProgrammableGeometry .
 
virtual glsl GeometryShaderPrefix (VRenderContext &Context) const
 Optional context-dependent prefix shader code.
 
std::pair< glsl, string > getCode (VRenderContext &Context, const std::string &Name, const std::string &Ext, std::string(Programmable::*shader)(VRenderContext &Context) const, const string &PrefixCode) const
 Return the combination of GLSL source code and the filename from which it was read.
 
void setGLSLVersion (const string &v_version, const string &g_version, const string &f_version)
 Set the version number string, e.g.
 
void setGLSLVersion (const string &version)
 Set the version number string, e.g.
 
virtual glsl vertex_shader (VRenderContext &Context) const =0
 Vertexshader GLGS code.
 

Additional Inherited Members

- Public Types inherited from Wizt::Programmable
typedef RenderBasin::Program Program
 Shortcut typedef.
 
- Static Public Member Functions inherited from Wizt::Programmable
static string OptionalFileRead (const string &filename, const string &text)
 Read some string from the given file, using the given text as default if no such file exists.
 
static glsl setNumberOfLightSources (VRenderContext &Context, const std::string &VariableName="lightNum")
 Produce GLSL code including the number of light sources that are currently active in the render context.
 
- Public Attributes inherited from Wizt::Programmable
glsl f_prefix
 Optional shader code to be always prefixed in the fragment shader.
 
glsl g_prefix
 Optional static shader code to be always prefixed in the geometry shader.
 
RenderBasin::GeometryInputType GeometryInput
 Input type for geometry shaders.
 
RenderBasin::GeometryOutputType GeometryOutput
 Output type for geometry shaders.
 
glsl v_prefix
 Optional shader code to be always prefixed in the vertex shader.
 
- Static Public Attributes inherited from Wizt::Programmable
static const char default_fragment_shader []
 Default fragment code.
 
static const char default_geometry_shader []
 Default geometry code.
 
static const char default_vertex_shader []
 Default vertex shader.
 

Detailed Description

A helper class to create a OpenGL geometry shader programs.

Child classes must call CompileGeometryShader() to compile a GL program including a geometry shader.

For more information on geometry shaders see

Member Function Documentation

◆ RenderPrimitive()

GL::render_primitives Wizt::ProgrammableGeometry::RenderPrimitive ( ) const
inline

Provide the render primitive type for the input type of the associated geometry shader here.

This must be compatible, e.g. for DrawArray().