GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
GLC_SelectionMaterial Class Reference

GLC_SelectionMaterial : Material used for selection feedback. More...

#include <glc_selectionmaterial.h>

Static Public Member Functions

Set Functions
static void useMaterial (GLC_Material *pMaterial)
 Use the given material as selection material.
 
static void setUseSelectionMaterial (bool useSelectionMaterial)
 Use selection material?
 
static void useDefautSelectionColor ()
 Use the default selection color.
 
OpenGL Functions
static void glExecute ()
 Execute OpenGL Material.
 
static void initShader (const QGLContext *pContext)
 Init shader.
 
static void deleteShader (const QGLContext *pContext)
 delete shader
 
static void setShaders (QFile &vertex, QFile &fragment, const QGLContext *pContext)
 Set shader.
 
static void useShader ()
 Use shader.
 
static void unUseShader ()
 Unused shader.
 

Private Member Functions

 GLC_SelectionMaterial ()
 

Static Private Member Functions

static QGLContext * sharingContext (const QGLContext *pContext)
 Return the sharing context of the given context.
 

Static Private Attributes

static QHash< const QGLContext
*, GLC_Shader * > 
m_SelectionShaderHash
 Selection Shader.
 
static GLC_uint m_SelectionMaterialId = 0
 Selection material id.
 
static GLC_Materialm_pMaterial = NULL
 Material of this selection material.
 
static bool m_NoSelectionMaterial = false
 Don't use selection material.
 

Detailed Description

GLC_SelectionMaterial : Material used for selection feedback.

Definition at line 45 of file glc_selectionmaterial.h.

Constructor & Destructor Documentation

GLC_SelectionMaterial::GLC_SelectionMaterial ( )
private

Definition at line 35 of file glc_selectionmaterial.cpp.

Member Function Documentation

void GLC_SelectionMaterial::deleteShader ( const QGLContext *  pContext)
static

delete shader

Definition at line 181 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash.

Referenced by setShaders().

void GLC_SelectionMaterial::glExecute ( )
static
void GLC_SelectionMaterial::initShader ( const QGLContext *  pContext)
static

Init shader.

Definition at line 110 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash.

void GLC_SelectionMaterial::setShaders ( QFile &  vertex,
QFile &  fragment,
const QGLContext *  pContext 
)
static
void GLC_SelectionMaterial::setUseSelectionMaterial ( bool  useSelectionMaterial)
static

Use selection material?

Definition at line 73 of file glc_selectionmaterial.cpp.

References m_NoSelectionMaterial.

QGLContext * GLC_SelectionMaterial::sharingContext ( const QGLContext *  pContext)
staticprivate

Return the sharing context of the given context.

Definition at line 162 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash.

Referenced by unUseShader(), and useShader().

void GLC_SelectionMaterial::unUseShader ( )
static

Unused shader.

Definition at line 144 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash, and sharingContext().

Referenced by GLC_3DViewCollection::glDraw().

void GLC_SelectionMaterial::useDefautSelectionColor ( )
static

Use the default selection color.

if a selection material is used, unused it

Definition at line 59 of file glc_selectionmaterial.cpp.

References GLC_Material::delUsage(), GLC_Material::isUnused(), m_pMaterial, and m_SelectionMaterialId.

void GLC_SelectionMaterial::useMaterial ( GLC_Material pMaterial)
static

Use the given material as selection material.

Definition at line 40 of file glc_selectionmaterial.cpp.

References GLC_Material::addUsage(), GLC_Material::delUsage(), glc::GLC_GenUserID(), GLC_Material::isUnused(), m_pMaterial, and m_SelectionMaterialId.

void GLC_SelectionMaterial::useShader ( )
static

Use shader.

Definition at line 129 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash, and sharingContext().

Referenced by GLC_3DViewCollection::glDraw().

Member Data Documentation

bool GLC_SelectionMaterial::m_NoSelectionMaterial = false
staticprivate

Don't use selection material.

Definition at line 110 of file glc_selectionmaterial.h.

Referenced by glExecute(), and setUseSelectionMaterial().

GLC_Material * GLC_SelectionMaterial::m_pMaterial = NULL
staticprivate

Material of this selection material.

Definition at line 107 of file glc_selectionmaterial.h.

Referenced by glExecute(), useDefautSelectionColor(), and useMaterial().

GLC_uint GLC_SelectionMaterial::m_SelectionMaterialId = 0
staticprivate

Selection material id.

Definition at line 104 of file glc_selectionmaterial.h.

Referenced by useDefautSelectionColor(), and useMaterial().

QHash< const QGLContext *, GLC_Shader * > GLC_SelectionMaterial::m_SelectionShaderHash
staticprivate

Selection Shader.

Definition at line 101 of file glc_selectionmaterial.h.

Referenced by deleteShader(), initShader(), setShaders(), sharingContext(), unUseShader(), and useShader().


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

©2005-2013 Laurent Ribon