Added NzTexture

Added levelCount parameter to NzImageParams
Added NzPixelFormat::HasAlpha
Reformatted OpenGL debug messages
This commit is contained in:
Lynix
2012-06-05 10:54:06 +02:00
parent 49353cb636
commit a176648265
19 changed files with 1807 additions and 64 deletions

View File

@@ -34,7 +34,7 @@ class NzGLSLShader : public NzShaderImpl
bool IsLoaded(nzShaderType type) const;
bool Load(nzShaderType type, const NzString& source);
bool Lock() const;
bool Lock();
bool SendBoolean(const NzString& name, bool value);
bool SendDouble(const NzString& name, double value);
@@ -42,16 +42,23 @@ class NzGLSLShader : public NzShaderImpl
bool SendInteger(const NzString& name, int value);
bool SendMatrix(const NzString& name, const NzMatrix4d& matrix);
bool SendMatrix(const NzString& name, const NzMatrix4f& matrix);
bool SendTexture(const NzString& name, NzTexture* texture);
void Unbind();
void Unlock() const;
void Unlock();
private:
struct TextureSlot
{
nzUInt8 unit;
NzTexture* texture;
};
mutable std::map<NzString, GLint> m_idCache;
mutable GLuint m_lockedPrevious;
std::map<GLint, TextureSlot> m_textures;
GLuint m_program;
GLuint m_shaders[nzShaderType_Count];
mutable nzUInt8 m_lockedLevel;
nzUInt8 m_textureFreeID;
NzShader* m_parent;
NzString m_log;
};