kick
/Users/morten/Programmering/cpp/kick/src/kick/texture/texture_cube.h
00001 //
00002 // Created by morten on 31/05/14.
00003 //
00004 
00005 
00006 #pragma once
00007 
00008 #include "kick/core/project_asset.h"
00009 #include "kick/core/kickgl.h"
00010 #include "kick/texture/texture_sampler.h"
00011 #include "kick/texture/image_format.h"
00012 #include <bitset>
00013 
00014 namespace kick {
00015     class Project;
00016 
00017     class TextureCube : public ProjectAsset {
00018     public:
00019         TextureCube(TextureSampler textureSampler = {});
00020         TextureCube(const TextureCube&) = delete;
00021         TextureCube(TextureCube&& m);
00022         ~TextureCube();
00023 
00024         void setData(int width, int height, char* data, int cubemapIndex, const ImageFormat& imageFormat = {});
00025 
00026         void bind(int textureSlot);
00027         int width(){ return mWidth; }
00028         int height(){ return mHeight; }
00029         void setTextureSampler(const TextureSampler & textureSampler);
00030         TextureSampler textureSampler() const;
00031         ImageFormat imageFormat() const;
00032     private:
00033         GLuint mTextureid;
00034         int mWidth = -1;
00035         int mHeight = -1;
00036         std::bitset<6> mFacesSet;
00037         TextureSampler mTextureSampler;
00038         ImageFormat mImageFormat;
00039     };
00040 };
00041 
 All Classes Functions Variables