PixelLightAPI  .
Public Types | Public Member Functions | Protected Member Functions
PLRenderer::GeometryShader Class Reference

Abstract renderer geometry shader resource. More...

#include <GeometryShader.h>

Inheritance diagram for PLRenderer::GeometryShader:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EInputPrimitiveType {
  InputPoints = 0, InputLines = 1, InputLinesAdjacency = 2, InputTriangles = 3,
  InputTrianglesAdjacency = 4
}
 Input primitive type. More...
enum  EOutputPrimitiveType { OutputPoints = 0, OutputLines = 1, OutputTriangles = 2 }
 Output primitive type. More...

Public Member Functions

virtual PLRENDERER_API ~GeometryShader ()
 Destructor.
virtual EInputPrimitiveType GetInputPrimitiveType () const =0
 Returns the input primitive type.
virtual EOutputPrimitiveType GetOutputPrimitiveType () const =0
 Returns the output primitive type.
virtual PLCore::uint32 GetNumOfOutputVertices () const =0
 Returns the number of output vertices.
virtual bool SetSourceCode (const PLCore::String &sSourceCode, EInputPrimitiveType nInputPrimitiveType, EOutputPrimitiveType nOutputPrimitiveType, PLCore::uint32 nNumOfOutputVertices, const PLCore::String &sProfile="", const PLCore::String &sArguments="", const PLCore::String &sEntry="")=0
 Sets the geometry shader source code.

Protected Member Functions

PLRENDERER_API GeometryShader (Renderer &cRenderer)
 Constructor.

Detailed Description

Abstract renderer geometry shader resource.


Member Enumeration Documentation

Input primitive type.

Enumerator:
InputPoints 

List of point primitives

InputLines 

List of line or line strip primitives

InputLinesAdjacency 

List of line with adjacency or line strip with adjacency primitives

InputTriangles 

List of triangle or triangle strip primitives

InputTrianglesAdjacency 

List of triangle with adjacency or triangle strip with adjacency primitives

Output primitive type.

Enumerator:
OutputPoints 

A list of of point primitives

OutputLines 

A list of line primitives

OutputTriangles 

A list of triangle primitives


Constructor & Destructor Documentation

virtual PLRENDERER_API PLRenderer::GeometryShader::~GeometryShader ( ) [virtual]

Destructor.

PLRENDERER_API PLRenderer::GeometryShader::GeometryShader ( Renderer cRenderer) [protected]

Constructor.

Parameters:
[in]cRendererOwner renderer

Member Function Documentation

Returns the input primitive type.

Returns:
The input primitive type

Returns the output primitive type.

Returns:
The output primitive type
virtual PLCore::uint32 PLRenderer::GeometryShader::GetNumOfOutputVertices ( ) const [pure virtual]

Returns the number of output vertices.

Returns:
The number of output vertices, 0 if the maximum possible number of output vertices should be used
virtual bool PLRenderer::GeometryShader::SetSourceCode ( const PLCore::String sSourceCode,
EInputPrimitiveType  nInputPrimitiveType,
EOutputPrimitiveType  nOutputPrimitiveType,
PLCore::uint32  nNumOfOutputVertices,
const PLCore::String sProfile = "",
const PLCore::String sArguments = "",
const PLCore::String sEntry = "" 
) [pure virtual]

Sets the geometry shader source code.

Parameters:
[in]sSourceCodeGeometry shader source code, usually blank ASCII code
[in]nInputPrimitiveTypeInput primitive type, for "Shader::SetSourceCode()" "InputTriangles" is used as default
[in]nOutputPrimitiveTypeOutput primitive type, for "Shader::SetSourceCode()" "OutputTriangles" is used as default
[in]nNumOfOutputVerticesNumber of output vertices, 0 if the maximum possible number of output vertices should be used, for "Shader::SetSourceCode()" "0" is used as default
[in]sProfileGeometry shader profile to use, if empty string, a default profile will be used which usually tries to use the best available profile that runs on most hardware
[in]sArgumentsOptional shader compiler arguments, e.g. "version=150" when using Cg and a "glslg" profile
[in]sEntryEntry point, if empty string, "main" is used as default
Returns:
'true' if all went fine, else 'false'
Remarks:
Extended version of "Shader::SetSourceCode()" for geometry shaders allowing also to specify the input/output primitives and the number of generated vertices. Please note that not each internal implementation may actually need this information, but it's highly recommended to provide this information anyway to be able to switch the internal implementation (e.g. using OpenGL instead of DirectX and/or Cg instead of HLSL/GLSL).
See also:
  • "Shader::SetSourceCode()" for additional information

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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:38
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported