Gem Illuminator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
cubemap.h
Go to the documentation of this file.
1 #ifndef CUBEMAP_H
2 #define CUBEMAP_H
3 
4 #include <QObject>
5 
6 class QOpenGLFunctions;
7 
11 class CubeMap : public QObject
12 {
13  Q_OBJECT
14 public:
21  CubeMap(QOpenGLFunctions &gl, QString cubeMapPrefix, QObject *parent = 0);
22  virtual ~CubeMap();
23 
28  void update(QString newCubeMapPrefix);
29 
34  uint cubeMapTexture();
35 
36 protected:
37  void initialize();
38 
39 protected:
40  uint m_cubeMap;
41  QOpenGLFunctions &m_gl;
42  QString m_cubeMapPrefix;
43 };
44 
45 #endif // CUBEMAP_H
uint cubeMapTexture()
OpenGL texture reference.
Definition: cubemap.cpp:55
CubeMap(QOpenGLFunctions &gl, QString cubeMapPrefix, QObject *parent=0)
Creates a new CubeMap and loads required textures.
Definition: cubemap.cpp:8
void initialize()
Definition: cubemap.cpp:60
The CubeMap class loads cubemap textures and provides them as OpenGL-texture.
Definition: cubemap.h:11
QString m_cubeMapPrefix
Definition: cubemap.h:42
uint m_cubeMap
Definition: cubemap.h:40
QOpenGLFunctions & m_gl
Definition: cubemap.h:41
virtual ~CubeMap()
Definition: cubemap.cpp:16
void update(QString newCubeMapPrefix)
Replaces current texture with new specified texture.
Definition: cubemap.cpp:21