The Vish Visualization Shell 0.3
Vish
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Wizt::GeometryShader Class Reference

An OpenGL geometry shader. More...

#include <ocean/GLvish/Shader.hpp>

Inheritance diagram for Wizt::GeometryShader:
Wizt::Shader MemCore::ReferenceBase< Shader >

Classes

struct  VerticesIn
 Enum member N tells how many vertices are available per call of the GeometryShader. More...
 

Public Types

enum  OutputType
 Output type for geometry shader.
 
- Public Types inherited from MemCore::ReferenceBase< Shader >
using reference_domain_t = Shader
 The type of the base class.
 
using SelfPtr_t = WeakPtr< Shader, Shader >
 Type for a pointer to this object itself.
 

Public Member Functions

GL::render_primitives render_primitive ()
 Provide the render primitive type for this geometry shader's input type, which must be compatible, e.g.
 
- Public Member Functions inherited from Wizt::Shader
bool compile (const std::string &source, const string &srcfilename, unsigned lineNo)
 Compile this program from some GSGL source code.
 
std::string getSource () const
 Get the source code as stored by OpenGL.
 
std::string InfoLog () const
 Get the info log associated with this shader.
 
- Public Member Functions inherited from MemCore::ReferenceBase< Shader >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< Shader, Shader > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (Shader *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Static Public Member Functions

static GL::render_primitives render_primitive (InputType)
 Provide the render primitive type for a geometry shader's input type, which must be compatible, e.g.
 

Additional Inherited Members

- Protected Member Functions inherited from MemCore::ReferenceBase< Shader >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

An OpenGL geometry shader.

http://developer.download.nvidia.com/opengl/specs/GL_EXT_geometry_shader4.txt

// varying inputs:
varying in vec4 gl_FrontColorIn[gl_VerticesIn];
varying in vec4 gl_BackColorIn[gl_VerticesIn];
varying in vec4 gl_FrontSecondaryColorIn[gl_VerticesIn];
varying in vec4 gl_BackSecondaryColorIn[gl_VerticesIn];
varying in vec4 gl_TexCoordIn[gl_VerticesIn][]; // at most will be
// gl_MaxTextureCoords
varying in float gl_FogFragCoordIn[gl_VerticesIn];
varying in vec4 gl_PositionIn[gl_VerticesIn];
varying in float gl_PointSizeIn[gl_VerticesIn];
varying in vec4 gl_ClipVertexIn[gl_VerticesIn];
// varying outputs:
varying out vec4 gl_FrontColor;
varying out vec4 gl_BackColor;
varying out vec4 gl_FrontSecondaryColor;
varying out vec4 gl_BackSecondaryColor;
varying out vec4 gl_TexCoord[]; // at most gl_MaxTextureCoords
varying out float gl_FogFragCoord;

Class Documentation

◆ Wizt::GeometryShader::VerticesIn

struct Wizt::GeometryShader::VerticesIn
template<int InputType>
struct Wizt::GeometryShader::VerticesIn< InputType >

Enum member N tells how many vertices are available per call of the GeometryShader.

Member Function Documentation

◆ render_primitive() [1/2]

GL::render_primitives Wizt::GeometryShader::render_primitive ( )
inline

Provide the render primitive type for this geometry shader's input type, which must be compatible, e.g.

for DrawArray();

◆ render_primitive() [2/2]

GL::render_primitives Wizt::GeometryShader::render_primitive ( InputType  I)
static

Provide the render primitive type for a geometry shader's input type, which must be compatible, e.g.

for DrawArray();