00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00027
#ifndef SH_GLTEXTURESTORAGE_HPP
00028
#define SH_GLTEXTURESTORAGE_HPP
00029
00030
#include "GlBackend.hpp"
00031
#include "ShMemory.hpp"
00032
#include "GlTextureName.hpp"
00033
00034
namespace shgl {
00035
00036
class GlTextureStorage :
public SH::ShStorage {
00037
public:
00038 GlTextureStorage(
SH::ShMemory* memory, GLenum target,
00039 GLenum format, GLint internalFormat,
00040
int width,
int height,
int depth,
00041 GlTextureNamePtr name);
00042
00043 ~GlTextureStorage();
00044
00045 std::string id()
const {
return "opengl:texture"; }
00046
00047 GLuint name()
const {
return m_name->value(); }
00048
const GlTextureNamePtr& texName()
const {
return m_name; }
00049 GLenum target()
const {
return m_target; }
00050 GLenum format()
const {
return m_format; }
00051 GLint internalFormat()
const {
return m_internalFormat; }
00052
int width()
const {
return m_width; }
00053
int height()
const {
return m_height; }
00054
int depth()
const {
return m_depth; }
00055
00056
private:
00057 GlTextureNamePtr m_name;
00058 GLenum m_target;
00059 GLenum m_format;
00060 GLint m_internalFormat;
00061
int m_width, m_height, m_depth;
00062
00063
unsigned int m_params;
00064
00065 GlTextureStorage(
const GlTextureStorage&);
00066 GlTextureStorage& operator=(
const GlTextureStorage&);
00067
00068
00069 };
00070
00071
typedef SH::ShPointer<GlTextureStorage> GlTextureStoragePtr;
00072
00073 }
00074
00075
#endif