GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_selectionmaterial.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21 *****************************************************************************/
23 
24 #ifndef GLC_SELECTIONMATERIAL_H_
25 #define GLC_SELECTIONMATERIAL_H_
26 
27 #include <QColor>
28 #include <QtOpenGL>
29 #include <QHash>
30 
31 #include "../glc_ext.h"
32 #include "glc_shader.h"
33 
34 #include "../glc_config.h"
35 
36 class QGLContext;
37 class GLC_Material;
38 
41 
43 
44 
46 {
47 private:
49 
50 
52 
54 
55 public:
57  static void useMaterial(GLC_Material* pMaterial);
58 
60  static void setUseSelectionMaterial(bool useSelectionMaterial);
61 
63 
64  static void useDefautSelectionColor();
65 
67 
69 
71 
72 public:
74  static void glExecute();
76  static void initShader(const QGLContext* pContext);
78  static void deleteShader(const QGLContext* pContext);
80  static void setShaders(QFile& vertex, QFile& fragment, const QGLContext* pContext);
82  static void useShader();
84  static void unUseShader();
85 
87 
89 // Private services fonction
91 private:
93  static QGLContext* sharingContext(const QGLContext* pContext);
94 
96 // Private members
98 
99 private:
101  static QHash<const QGLContext*, GLC_Shader*> m_SelectionShaderHash;
102 
105 
108 
111 
112 };
113 
114 #endif /*GLC_SELECTIONMATERIAL_H_*/

©2005-2013 Laurent Ribon