GLC_SelectionMaterial Class Reference

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

#include <glc_selectionmaterial.h>

List of all members.

Static Public Member Functions

Set Functions

static void useMaterial (GLC_Material *pMaterial)
 Use the given material as 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.

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 34 of file glc_selectionmaterial.cpp.


Member Function Documentation

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

delete shader

Definition at line 173 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 102 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash.

void GLC_SelectionMaterial::setShaders ( QFile &  vertex,
QFile &  fragment,
const QGLContext *  pContext 
) [static]
QGLContext * GLC_SelectionMaterial::sharingContext ( const QGLContext *  pContext  )  [static, private]

Return the sharing context of the given context.

Definition at line 154 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash.

Referenced by unUseShader(), and useShader().

void GLC_SelectionMaterial::unUseShader (  )  [static]

Unused shader.

Definition at line 136 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 58 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 39 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 121 of file glc_selectionmaterial.cpp.

References m_SelectionShaderHash, and sharingContext().

Referenced by GLC_3DViewCollection::glDraw().


Member Data Documentation

Material of this selection material.

Definition at line 104 of file glc_selectionmaterial.h.

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

Selection material id.

Definition at line 101 of file glc_selectionmaterial.h.

Referenced by useDefautSelectionColor(), and useMaterial().

QHash< const QGLContext *, GLC_Shader * > GLC_SelectionMaterial::m_SelectionShaderHash [static, private]

Selection Shader.

Definition at line 98 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:

SourceForge.net Logo

©2005-2011 Laurent Ribon