tgTexture.h
Go to the documentation of this file.
00001 
00009 #ifndef TG_TEXTURE
00010 #define TG_TEXTURE
00011 
00012 #include <blort/TomGine/headers.h>
00013 
00014 namespace TomGine{
00015 
00019 class tgTexture
00020 {
00021 private:
00022         GLuint m_texture_id;
00023         int m_width;
00024         int m_height;
00025 
00026 public:
00027         tgTexture();
00028         ~tgTexture();
00029         
00030         bool Load(void* image_data, int width, int height, GLenum format=GL_RGB, GLenum internal=GL_UNSIGNED_BYTE);
00031         bool Load(const char* filename);
00032         bool Save(const char* filename, bool overwrite=true);
00033         bool GetImageData(unsigned char* image_data);
00034         
00035         void Bind(int stage=0) const;
00036 
00037         void CopyTexImage2D(int width, int height);
00038         void CopyTexImage2D(int x, int y, int width, int height);
00039         
00040         inline GLuint GetTextureID(){ return m_texture_id; }
00041         inline int GetWidth() const{ return m_width; }
00042         inline int GetHeight() const{ return m_height; }
00043         
00044 };
00045 
00046 } // namespace TomGine
00047 
00048 #endif


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12