glc_selectionmaterial.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00023
00024 #ifndef GLC_SELECTIONMATERIAL_H_
00025 #define GLC_SELECTIONMATERIAL_H_
00026
00027 #include <QColor>
00028 #include <QtOpenGL>
00029 #include <QHash>
00030
00031 #include "../glc_ext.h"
00032 #include "glc_shader.h"
00033
00034 #include "../glc_config.h"
00035
00036 class QGLContext;
00037 class GLC_Material;
00038
00041
00043
00044
00045 class GLC_LIB_EXPORT GLC_SelectionMaterial
00046 {
00047 private:
00048 GLC_SelectionMaterial();
00049
00050
00052
00054
00055 public:
00057 static void useMaterial(GLC_Material* pMaterial);
00058
00060
00061 static void useDefautSelectionColor();
00062
00064
00066
00068
00069 public:
00071 static void glExecute();
00073 static void initShader(const QGLContext* pContext);
00075 static void deleteShader(const QGLContext* pContext);
00077 static void setShaders(QFile& vertex, QFile& fragment, const QGLContext* pContext);
00079 static void useShader();
00081 static void unUseShader();
00082
00084
00086
00088
00089 private:
00091 static QHash<const QGLContext*, GLC_Shader*> m_SelectionShaderHash;
00092
00094 static GLC_uint m_SelectionMaterialId;
00095
00097 static GLC_Material* m_pMaterial;
00098
00099 };
00100
00101 #endif