DeferredRenderer 1.0

Texture.h

Go to the documentation of this file.
00001 #ifndef TEXTURE_H
00002 #define TEXTURE_H
00003 
00004 #include "ngl/Types.h"
00005 #include "string"
00006 
00014 class Texture
00015 {
00016 public:
00018     GLuint id;
00019 
00021     Texture(){}
00022 
00024     Texture(const std::string &_name);
00025 
00027     ~Texture();
00028 
00030     void generateEmpty(int _width, int _height);
00032     void generateEmptyf(int _width, int _height);
00034     void generateDepth(int _width, int _height);
00035 
00037     void generateFromFile(char* _filePath);
00038 
00040     void bind(){glBindTexture(GL_TEXTURE_2D, id);}
00041 
00043     std::string getName(){return m_name;}
00044 
00045 private:
00047     int m_width, m_height;
00049     std::string m_name;
00050 };
00051 
00052 #endif // FRUSTUM_H
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines