29 lines
512 B
C++
29 lines
512 B
C++
#ifndef TEXTURE_H
|
|
#define TEXTURE_H
|
|
|
|
#include <glew/glew.h>
|
|
|
|
class QImage;
|
|
class QString;
|
|
|
|
class Texture
|
|
{
|
|
private:
|
|
GLuint texId;
|
|
GLenum type;
|
|
|
|
void createTexture(QString filename, GLenum type);
|
|
void setWrap(GLint wrap);
|
|
void setFiltering(GLint filter);
|
|
public:
|
|
// creates a standard texture from an image
|
|
Texture(const QString filename);
|
|
// creates a cubeMap from 6 images
|
|
Texture(const QString filename[6]);
|
|
|
|
~Texture();
|
|
void bind(int slot);
|
|
};
|
|
|
|
#endif // TEXTURE_H
|