32 lines
667 B
C++
32 lines
667 B
C++
#ifndef TEXTURE_H
|
|
#define TEXTURE_H
|
|
|
|
#include <glew/glew.h>
|
|
#include <string>
|
|
|
|
class Image;
|
|
|
|
class Texture
|
|
{
|
|
private:
|
|
GLuint texId;
|
|
GLenum type;
|
|
|
|
void createNoiseTexture(GLenum textureSlot, int width, int height, float frequency, float myScale);
|
|
void createTexture(Image* myImage, 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(Image* myImage);
|
|
// creates a cubeMap from 6 images
|
|
Texture(Image* myCubemapImages[6]);
|
|
|
|
~Texture();
|
|
void bind(int slot);
|
|
};
|
|
|
|
#endif // TEXTURE_H
|