SparrowRenderer/texture.h
2015-07-02 19:29:05 +02:00

32 lines
699 B
C++

#ifndef TEXTURE_H
#define TEXTURE_H
#include <glew/glew.h>
#include <string>
class QImage;
class Texture
{
private:
GLuint texId;
GLenum type;
void createNoiseTexture(GLenum textureSlot, int width, int height, float frequency, float myScale);
void createTexture(std::string filename, GLenum textureSlot);
void setWrap(GLint wrap);
void setFiltering(GLint filter);
public:
// creates a 2D texture from perlin noise
Texture();
// creates a standard texture from an image
Texture(const std::string filename);
// creates a cubeMap from 6 images
Texture(const std::string filename[6]);
~Texture();
void bind(int slot);
};
#endif // TEXTURE_H