Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Hardware/Video/OpenGL/Textures/Headers/glTexture.h

Diff revisions: vs.
  @@ -24,6 +24,7 @@
24 24 #define _GL_TEXTURE_H_
25 25
26 26 #include "core.h"
27 + #include "glSamplerObject.h"
27 28 #include "Hardware/Video/Textures/Headers/Texture.h"
28 29
29 30 class glTexture : public Texture {
  @@ -35,24 +36,29 @@
35 36
36 37 void Bind(GLushort unit);
37 38 void Unbind(GLushort unit);
38 -
39 - void LoadData(GLuint target, GLubyte* ptr, GLushort& w, GLushort& h, GLubyte d);
39 + void setMipMapRange(U32 base = 0, U32 max = 1000);
40 + void loadData(GLuint target, const GLubyte* const ptr, const vec2<U16>& dimensions, GLubyte bpp, GFXImageFormat format);
40 41
41 42 protected:
42 43 bool generateHWResource(const std::string& name);
43 44 void threadedLoad(const std::string& name);
44 - private:
45 45
46 + private:
46 47 void Bind() const;
47 48 void Unbind() const;
48 49 void Destroy();
49 50 void reserveStorage(GLint w, GLint h);
51 + void createSampler();
52 +
50 53 private:
51 54 GLenum _format;
52 55 GLenum _internalFormat;
53 56 GLenum _type;
54 57 bool _reservedStorage; ///<Used glTexStorage2D for this texture
55 58 GLboolean _canReserveStorage; ///<Can use glTexStorage2D
59 +
60 + ///We currently only use one sampler per texture. When the texture is destroyed, the sampler is destroyed!!!!
61 + glSamplerObject _sampler;
56 62 };
57 63
58 64 #endif