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 | 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 Attributes | |
| static QHash< const QGLContext *, GLC_Shader * > | m_SelectionShaderHash |
| Selection Shader. | |
| static GLC_uint | m_SelectionMaterialId = 0 |
| Selection material id. | |
| static GLC_Material * | m_pMaterial = NULL |
| Material of this selection material. | |
GLC_SelectionMaterial : Material used for selection feedback.
Definition at line 45 of file glc_selectionmaterial.h.
| GLC_SelectionMaterial::GLC_SelectionMaterial | ( | ) | [private] |
Definition at line 34 of file glc_selectionmaterial.cpp.
| void GLC_SelectionMaterial::deleteShader | ( | const QGLContext * | pContext | ) | [static] |
delete shader
Definition at line 139 of file glc_selectionmaterial.cpp.
References m_SelectionShaderHash.
Referenced by setShaders().
| void GLC_SelectionMaterial::glExecute | ( | ) | [static] |
Execute OpenGL Material.
Definition at line 73 of file glc_selectionmaterial.cpp.
References GLC_Material::glExecute(), and m_pMaterial.
Referenced by GLC_Geometry::glPropGeom(), GLC_Mesh::normalRenderLoop(), GLC_Mesh::OverwriteMaterialRenderLoop(), GLC_Mesh::OverwriteTransparencyRenderLoop(), GLC_PointSprite::render(), GLC_Mesh::vboDrawSelectedPrimitivesGroupOf(), and GLC_Mesh::vertexArrayDrawSelectedPrimitivesGroupOf().
| 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] |
Set shader.
Definition at line 108 of file glc_selectionmaterial.cpp.
References deleteShader(), m_SelectionShaderHash, and GLC_Shader::setVertexAndFragmentShader().
| void GLC_SelectionMaterial::unUseShader | ( | ) | [static] |
Unused shader.
Definition at line 129 of file glc_selectionmaterial.cpp.
References m_SelectionShaderHash.
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.
Referenced by GLC_3DViewCollection::glDraw().
GLC_Material * GLC_SelectionMaterial::m_pMaterial = NULL [static, private] |
Material of this selection material.
Definition at line 97 of file glc_selectionmaterial.h.
Referenced by glExecute(), useDefautSelectionColor(), and useMaterial().
GLC_uint GLC_SelectionMaterial::m_SelectionMaterialId = 0 [static, private] |
Selection material id.
Definition at line 94 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 91 of file glc_selectionmaterial.h.
Referenced by deleteShader(), initShader(), setShaders(), unUseShader(), and useShader().