From e47baca4f23db43ec91fbf64d5d06d7c0dbee495 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 6 Apr 2019 07:39:49 +0800 Subject: *misc --- .../modules/asura-core/graphics/binding/_image.cpp | 2 +- source/modules/asura-core/graphics/canvas.h | 15 ++-- source/modules/asura-core/graphics/gl.cpp | 30 ++++++- source/modules/asura-core/graphics/gl.h | 22 ++++- source/modules/asura-core/graphics/gpu_buffer.cpp | 94 ++++++++++++++++++++ source/modules/asura-core/graphics/gpu_buffer.h | 69 +++++++++++++++ source/modules/asura-core/graphics/image.cpp | 10 +-- source/modules/asura-core/graphics/image.h | 15 ++-- source/modules/asura-core/graphics/matrix_stack.h | 2 +- source/modules/asura-core/graphics/render_target.h | 2 +- source/modules/asura-core/graphics/shader.cpp | 99 ++++++++++++---------- source/modules/asura-core/graphics/shader.h | 52 +++--------- source/modules/asura-core/graphics/shader_source.h | 39 --------- source/modules/asura-core/graphics/sprite_batch.h | 10 ++- source/modules/asura-core/graphics/texture.h | 7 +- 15 files changed, 313 insertions(+), 155 deletions(-) create mode 100644 source/modules/asura-core/graphics/gpu_buffer.cpp create mode 100644 source/modules/asura-core/graphics/gpu_buffer.h delete mode 100644 source/modules/asura-core/graphics/shader_source.h (limited to 'source/modules/asura-core/graphics') diff --git a/source/modules/asura-core/graphics/binding/_image.cpp b/source/modules/asura-core/graphics/binding/_image.cpp index 6179706..76ac635 100644 --- a/source/modules/asura-core/graphics/binding/_image.cpp +++ b/source/modules/asura-core/graphics/binding/_image.cpp @@ -39,7 +39,7 @@ namespace AsuraEngine { LUAX_PREPARE(L, Image); ImageData* imgData = state.CheckUserdata(2); - state.Push(self->Update(imgData)); + state.Push(self->Load(imgData)); return 1; } diff --git a/source/modules/asura-core/graphics/canvas.h b/source/modules/asura-core/graphics/canvas.h index 6af81d7..555ce5d 100644 --- a/source/modules/asura-core/graphics/canvas.h +++ b/source/modules/asura-core/graphics/canvas.h @@ -20,9 +20,7 @@ namespace AsuraEngine /// Canvas也可以称为render texture,自身也可以作为texture渲染。 /// class Canvas ASURA_FINAL - : public Drawable - , public RenderTarget - , public Scripting::Portable + : public Scripting::Portable { public: @@ -33,12 +31,12 @@ namespace AsuraEngine /// /// 设置render texture的大小 /// - void SetSize(uint w, uint h) asura_throw(Exception); + void SetSize(uint w, uint h) ASURA_THROW(Exception); void Clear(const Color& col = Color::Black) override; - +/* void Clear(const Math::Recti& quad, const Color& col = Color::Black) override; - +*/ void Render(const RenderTarget* rt, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot); void Render(const RenderTarget* rt, const Math::Rectf& quad, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot); @@ -54,6 +52,11 @@ namespace AsuraEngine /// GLuint mFBO; + /// + /// 绑定的tex + /// + GLuint mTex; + /// /// canvas的大小 /// diff --git a/source/modules/asura-core/graphics/gl.cpp b/source/modules/asura-core/graphics/gl.cpp index 47476a7..54fadb7 100644 --- a/source/modules/asura-core/graphics/gl.cpp +++ b/source/modules/asura-core/graphics/gl.cpp @@ -30,13 +30,41 @@ namespace AsuraEngine { } + bool OpenGL::Init(const AEMath::Recti& view) + { + bool loaded = false; +#if ASURA_OPENGL_LOADER & ASURA_OPENGL_GLAD + if (!loaded) + loaded = gladLoadGL(); +#endif + if (!loaded) + return false; + state.viewport = view; + return true; + } + + void OpenGL::WipeError() + { + while (glGetError() != GL_NO_ERROR); + } + + bool OpenGL::HasError() + { + return glGetError() != GL_NO_ERROR; + } + + GLenum OpenGL::GetError() + { + return glGetError(); + } + void OpenGL::SetViewport(const Recti v) { glViewport(v.x, v.y, v.w, v.h); state.viewport = v; } - Recti OpenGL::GetViewport() + const Recti& OpenGL::GetViewport() { return state.viewport; } diff --git a/source/modules/asura-core/graphics/gl.h b/source/modules/asura-core/graphics/gl.h index 6838bc9..e3c2ffc 100644 --- a/source/modules/asura-core/graphics/gl.h +++ b/source/modules/asura-core/graphics/gl.h @@ -18,6 +18,7 @@ namespace AsuraEngine class Profiler; class Shader; + class GPUBuffer; enum MatrixMode { @@ -35,17 +36,23 @@ namespace AsuraEngine { public: - LUAX_DECL_SINGLETON(GL); - OpenGL(); ~OpenGL(); + /// + /// 初始化OpenGL上下文参数,发生在创建OpenGL上下文之后。此函数会注册OpenGL函数的地址。 + /// + bool Init(const AEMath::Recti& viewport); + void SetViewport(const AEMath::Recti viewport); - AEMath::Recti GetViewport(); + const AEMath::Recti& GetViewport(); void UseShader(Shader* shader); void UnuseShader(); + /// + /// Matrix stack相关操作 + /// void SetMatrixMode(MatrixMode mode); MatrixMode GetMatrixMode(); void PushMatrix(); @@ -59,6 +66,13 @@ namespace AsuraEngine uint GetMatrixDepth(); uint GetMatrixIndex(); + /// + /// 清理错误提示 + /// + void WipeError(); + bool HasError(); + GLenum GetError(); + /// /// OpenGL3.0以后由用户管理矩阵变换、视口、shader等参数,这里保存一些OpenGL状态。注意 /// 似乎全进程的,也就是说,Asura不支持多线程渲染。OpenGL上下文的创建使得一个上下 @@ -78,6 +92,8 @@ namespace AsuraEngine friend class Profiler; + LUAX_DECL_SINGLETON(OpenGL); + //----------------------------------------------------------------------------// LUAX_DECL_ENUM(MatrixMode, 0); diff --git a/source/modules/asura-core/graphics/gpu_buffer.cpp b/source/modules/asura-core/graphics/gpu_buffer.cpp new file mode 100644 index 0000000..c796bb0 --- /dev/null +++ b/source/modules/asura-core/graphics/gpu_buffer.cpp @@ -0,0 +1,94 @@ +#include "gpu_buffer.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + GPUBuffer::GPUBuffer(BufferType type, BufferUsage usage, size_t size) + : mTarget(GL_ZERO) + , mBuffer(GL_ZERO) + , mSize(0) +#if ASURA_DEBUG + , mData(nullptr) +#endif + { + switch (type) + { + case BUFFER_TYPE_VERTEX: + mTarget = GL_ARRAY_BUFFER; + break; + case BUFFER_TYPE_INDEX: + mTarget = GL_ELEMENT_ARRAY_BUFFER; + break; + } + switch (usage) + { + case BUFFER_USAGE_STREAM: + mUsage = GL_STREAM_DRAW; + break; + case BUFFER_USAGE_DYNAMIC: + mUsage = GL_DYNAMIC_DRAW; + break; + case BUFFER_USAGE_STATIC: + mUsage = GL_STATIC_DRAW; + break; + } + gl.WipeError(); + glGenBuffers(1, &mBuffer); + if (mBuffer == 0) + throw Exception("OpenGL glGenBuffers failed."); + glBindBuffer(mTarget, mBuffer); + glBufferData(mTarget, size, NULL, mUsage); // 初始化大小为size的缓冲 + if (gl.HasError()) + throw Exception("OpenGL glBufferData failed. Errorcode=%d.", gl.GetError()); + glBindBuffer(mTarget, 0); +#if ASURA_DEBUG + mData = (byte*)malloc(size); + memset(mData, 0, size); +#endif + mSize = size; + } + + GPUBuffer::~GPUBuffer() + { +#if ASURA_DEBUG + if (mData) + free(mData); +#endif + glDeleteBuffers(1, &mBuffer); + } + + bool GPUBuffer::Fill(const void * data, size_t size, uint offset) + { + if (data == nullptr) + return false; + glBindBuffer(mTarget, mBuffer); + glBufferSubData(mTarget, offset, size, data); + if (gl.HasError()) + throw Exception("OpenGL glBufferSubData failed. Errorcode=%d.", gl.GetError()); + glBindBuffer(mTarget, 0); +#if ASURA_DEBUG + // 拷贝一份,调试用 + memcpy(mData + offset, data, size); +#endif + return true; + } + + void GPUBuffer::Bind() + { + glBindBuffer(mTarget, mBuffer); + } + + void GPUBuffer::UnBind() + { + glBindBuffer(mTarget, 0); + } + + uint GPUBuffer::GetBufferSize() + { + return mSize; + } + + } +} \ No newline at end of file diff --git a/source/modules/asura-core/graphics/gpu_buffer.h b/source/modules/asura-core/graphics/gpu_buffer.h new file mode 100644 index 0000000..aba1157 --- /dev/null +++ b/source/modules/asura-core/graphics/gpu_buffer.h @@ -0,0 +1,69 @@ +#ifndef __ASURA_GPU_BUFFER_H__ +#define __ASURA_GPU_BUFFER_H__ + +#include +#include + +#include "gl.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + enum BufferType + { + BUFFER_TYPE_VERTEX, ///< 顶点缓冲 + BUFFER_TYPE_INDEX, ///< 索引缓冲 + }; + + enum BufferUsage + { + BUFFER_USAGE_STREAM, ///< 修改一次,使用次数低 + BUFFER_USAGE_DYNAMIC, ///< 修改一次,经常使用 + BUFFER_USAGE_STATIC, ///< 经常修改和使用 + }; + + /// + /// GPU缓冲,分顶点缓冲和索引缓冲两种,避免每次都从内存向显存上传数据。 + /// + class GPUBuffer + { + public: + + GPUBuffer(BufferType type, BufferUsage usage, size_t size) ASURA_THROW(Exception); + ~GPUBuffer(); + + /// + /// 初始化\更新缓存,如果没有gpu buffer资源,认为是初始化,否则认为是更新。 + /// + bool Fill(const void* data, size_t size, uint offset = 0) ASURA_THROW(Exception); + + /// + /// 绑定到对应的目标上,接下来就可以使用了。 + /// + void Bind(); + void UnBind(); + + uint GetBufferSize(); + + private: + + GLenum mTarget; + GLuint mBuffer; + GLuint mUsage; + uint mSize; + +#if ASURA_DEBUG + /// + /// 本地保存的buffer数据,和显存数据保持一致,用来调试和更新显存。 + /// + byte* mData; +#endif + + }; + + } +} + +#endif \ No newline at end of file diff --git a/source/modules/asura-core/graphics/image.cpp b/source/modules/asura-core/graphics/image.cpp index 4cbe826..d4c4cdd 100644 --- a/source/modules/asura-core/graphics/image.cpp +++ b/source/modules/asura-core/graphics/image.cpp @@ -20,11 +20,9 @@ namespace AsuraEngine { } - bool Image::Update(DecodedData* data) + bool Image::Load(ImageData* imgData) { - if (!data) return false; - ImageData* imgData = static_cast(data); - if (!imgData) return false; + if (!imgData) return false; if (mTex == 0) { @@ -59,10 +57,8 @@ namespace AsuraEngine return true; } - bool Image::Update(AEIO::DecodedData* data, const AEMath::Vector2i& pos) + bool Image::Load(ImageData* imgData, const AEMath::Vector2i& pos) { - if (!data) return false; - ImageData* imgData = static_cast(data); if (!imgData) return false; glBindTexture(GL_TEXTURE_2D, mTex); diff --git a/source/modules/asura-core/graphics/image.h b/source/modules/asura-core/graphics/image.h index e4aecd1..d3cca4b 100644 --- a/source/modules/asura-core/graphics/image.h +++ b/source/modules/asura-core/graphics/image.h @@ -20,21 +20,16 @@ namespace AsuraEngine namespace Graphics { - class ImageFactory; - /// /// Image是图片从内存中载入后,读取进游戏后保存的结果。一个Image在内存、显存中只会保存一 /// 份,不会产生副本。需要特征化的区别image,如锚点位置,缩放和旋转角度,使用sprite。 /// 是一个只读类。主要是考虑到editor和engine使用不同的封装。 /// class Image ASURA_FINAL - : public AEIO::Renewable - , public AEScripting::Portable + : public AEScripting::Portable { public: - LUAX_DECL_FACTORY(Image); - Image(); ~Image(); @@ -43,19 +38,21 @@ namespace AsuraEngine /// 将解析后的图像数据提交到GPU,更新像素信息。用来重新构建image,使用glTexImage2D重 /// 新提交image的像素数据。 /// - bool Update(AEIO::DecodedData* decodeData) override; - bool Update(AEIO::DecodedData* decodeData, const AEMath::Vector2i& pos); + bool Load(ImageData* decodeData); + bool Load(ImageData* decodeData, const AEMath::Vector2i& pos); uint GetWidth(); uint GetHeight(); void Render(const RenderTarget* rt, const RenderState& state) override {}; - void Render(const RenderTarget* rt, const Math::Rectf& quad, const RenderState& state) override {}; + void Render(const RenderTarget* rt, const AEMath::Rectf& quad, const RenderState& state) override {}; private: //----------------------------------------------------------------------------// + LUAX_DECL_FACTORY(Image, Texture); + LUAX_DECL_METHOD(_New); LUAX_DECL_METHOD(_Update); LUAX_DECL_METHOD(_GetWidth); diff --git a/source/modules/asura-core/graphics/matrix_stack.h b/source/modules/asura-core/graphics/matrix_stack.h index e69ee98..db7248b 100644 --- a/source/modules/asura-core/graphics/matrix_stack.h +++ b/source/modules/asura-core/graphics/matrix_stack.h @@ -35,7 +35,7 @@ namespace AsuraEngine bool Pop(); AEMath::Matrix44& GetTop(); - void GetTop(asura_out AEMath::Matrix44& mat44); + void GetTop(ASURA_OUT AEMath::Matrix44& mat44); void LoadMatrix(const AEMath::Matrix44& mat44); void MultMatrix(const AEMath::Matrix44& mat44); diff --git a/source/modules/asura-core/graphics/render_target.h b/source/modules/asura-core/graphics/render_target.h index 0749cab..1992f6c 100644 --- a/source/modules/asura-core/graphics/render_target.h +++ b/source/modules/asura-core/graphics/render_target.h @@ -18,7 +18,7 @@ namespace AsuraEngine /// Canvas(RenderTexture) /// Window(RenderWindow) /// - class RenderTarget + class RenderTarget : public AEScripting::Object { public: diff --git a/source/modules/asura-core/graphics/shader.cpp b/source/modules/asura-core/graphics/shader.cpp index c26ddf1..e6779df 100644 --- a/source/modules/asura-core/graphics/shader.cpp +++ b/source/modules/asura-core/graphics/shader.cpp @@ -1,6 +1,5 @@ #include -#include "shader_source.h" #include "shader.h" using namespace std; @@ -12,47 +11,49 @@ namespace AsuraEngine Shader::Shader() { - //Fix: 等需要的时候再申请 - //mProgram = glCreateProgram(); - //if (mProgram == 0) - // throw Exception("Cannot create OpenGL shader program."); - - //mVertShader = glCreateShader(GL_VERTEX_SHADER); - //if (mVertShader == 0) - //{ - // glDeleteProgram(mProgram); - // throw Exception("Cannot create OpenGL vertex shader."); - //} - - //mFragShader = glCreateShader(GL_FRAGMENT_SHADER); - //if (mFragShader == 0) - //{ - // glDeleteProgram(mProgram); - // glDeleteShader(mVertShader); - // throw Exception("Cannot create OpenGL fragment shader."); - //} } Shader::~Shader() { - glDeleteShader(mVertShader); - glDeleteShader(mFragShader); - glDeleteProgram(mProgram); + if(mVertShader != 0) + glDeleteShader(mVertShader); + if(mFragShader != 0) + glDeleteShader(mFragShader); + if(mProgram != 0) + glDeleteProgram(mProgram); } - bool Shader::Update(AEIO::DecodedData* db) + bool Shader::Load(const string& vert, const string& frag) { - if (!db) return false; - ShaderSouce* shaderSource = static_cast(db); - if (!shaderSource) return false; - GLenum err = GL_NO_ERROR; - const GLchar* source; GLint success; string warnning = ""; + if (mProgram == 0) + { + mProgram = glCreateProgram(); + if (mProgram == 0) + throw Exception("Cannot create OpenGL shader program."); + } + + if (mVertShader == 0) + { + mVertShader = glCreateShader(GL_VERTEX_SHADER); + if (mVertShader == 0) + throw Exception("Cannot create OpenGL vertex shader."); + } + + if (mFragShader == 0) + { + mFragShader = glCreateShader(GL_FRAGMENT_SHADER); + if(mFragShader == 0) + throw Exception("Cannot create OpenGL fragment shader."); + } + + const GLchar* source; + // Compile vertex shader. - source = shaderSource->mVert.c_str(); + source = vert.c_str(); glShaderSource(mVertShader, 1, &source, NULL); glCompileShader(mVertShader); glGetShaderiv(mVertShader, GL_COMPILE_STATUS, &success); @@ -63,7 +64,7 @@ namespace AsuraEngine } // Compile fragment shader. - source = shaderSource->mFrag.c_str(); + source = frag.c_str(); glShaderSource(mFragShader, 1, &source, NULL); glCompileShader(mFragShader); glGetShaderiv(mFragShader, GL_COMPILE_STATUS, &success); @@ -83,29 +84,27 @@ namespace AsuraEngine warnning = GetProgramWarnings(); throw Exception("Link shader program failed:\n%s", warnning.c_str()); } - } - uint Shader::GetUniformLocation(const std::string& uniform) - { - return 0; + return true; } - GLuint Shader::GetGLProgramHandle() + uint Shader::GetUniformLocation(const std::string& uniform) { - return mProgram; + // This function returns -1 if name does not correspond to an active uniform variable + // in program or if name starts with the reserved prefix "gl_". + GLint loc = glGetUniformLocation(mProgram, uniform.c_str()); + return loc; } - void Shader::Use() + bool Shader::HasUniform(const std::string& uniform) { - if (mProgram != 0) - { - gl.UseShader(this); - } + GLint loc = glGetUniformLocation(mProgram, uniform.c_str()); + return loc != -1; } - void Shader::Unuse() + GLuint Shader::GetGLProgramHandle() { - gl.UnuseShader(); + return mProgram; } void Shader::SetUniformFloat(uint loc, float value) @@ -138,6 +137,18 @@ namespace AsuraEngine glUniform4f(loc, vec4.x, vec4.y, vec4.z, vec4.w); } + void Shader::SetUniformMatrix44(uint loc, const Math::Matrix44& mat) + { + if (gl.state.shader == this) + glUniformMatrix4fv(loc, 1, GL_FALSE, mat.GetElements()); + } + + //void Shader::GetUniform() + //{ + // //if(gl.state.shader == this) + // // glGetUniformfv() + //} + uint Shader::GetGLTextureUnitCount() { GLint maxTextureUnits = 0; diff --git a/source/modules/asura-core/graphics/shader.h b/source/modules/asura-core/graphics/shader.h index f4bce25..9cf9653 100644 --- a/source/modules/asura-core/graphics/shader.h +++ b/source/modules/asura-core/graphics/shader.h @@ -14,7 +14,6 @@ #include #include -#include "shader_source.h" #include "color.h" #include "texture.h" #include "gl.h" @@ -35,31 +34,14 @@ namespace AsuraEngine { public: - LUAX_DECL_FACTORY(Shader); - - Shader() asura_throw(Exception); + Shader(); ~Shader(); - /// - /// 从代码编译shader,编译时会先检测是否有上次缓存的uniforms location map。使用 - /// glAttachShader重新编译生成着色器,不会重新申请着色器程序。 - /// - bool Update(AEIO::DecodedData* decodeData) override; - - /// - /// 将当期shader设置为活动 - /// - void Use(); - - /// - /// 将当期shader设置为非活动 - /// - void Unuse(); - - /// - /// 在已经知道uniform location的情况下,设置值。 - /// + bool Load(const std::string& vert, const std::string& frag); + + uint GetAttributeLocation(const std::string& name); + void SetUniformFloat(uint loc, float value); void SetUniformTexture(uint loc, const Texture& texture); void SetUniformVector2(uint loc, const Math::Vector2f& vec2); @@ -68,40 +50,32 @@ namespace AsuraEngine void SetUniformColor(uint loc, const Color& color); void SetUniformMatrix44(uint loc, const Math::Matrix44& mat44); + float GetUniformFloat(uint loc); + AEMath::Vector2f GetUniformVector2(uint loc); + AEMath::Vector3f GetUniformVector3(uint loc); + AEMath::Vector4f GetUniformVector4s(uint loc); + AEMath::Matrix44 GetUniformMatrix44(uint loc); + uint GetUniformLocation(const std::string& uniform); bool HasUniform(const std::string& uniform); GLuint GetGLProgramHandle(); - /// - /// 获得texture unit数量,一般为16个 - /// static uint GetGLTextureUnitCount(); private: - /// - /// 设置内置变量: - /// vec2 Asura_Time x值为进入当前场景开始的时间,y值为上一帧的时间间隔 - /// vec2 Asura_RenderTargetSize RT的大小,以像素为单位 - /// Texture Asura_MainTexture 主纹理 - /// - void SetBuiltInUniforms(); - - /// - /// OpenGL shader program handle. - /// GLuint mProgram; GLuint mVertShader; GLuint mFragShader; - Luax::LuaxMemberRef mCodeRef; - private: //----------------------------------------------------------------------------// + LUAX_DECL_FACTORY(Shader); + LUAX_DECL_METHOD(_New); LUAX_DECL_METHOD(_Use); LUAX_DECL_METHOD(_Unuse); diff --git a/source/modules/asura-core/graphics/shader_source.h b/source/modules/asura-core/graphics/shader_source.h deleted file mode 100644 index eedbe53..0000000 --- a/source/modules/asura-core/graphics/shader_source.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __ASURA_SHADER_SOURCE_H__ -#define __ASURA_SHADER_SOURCE_H__ - -#include - -#include - -namespace AsuraEngine -{ - namespace Graphics - { - - class Shader; - - /// - /// Asura Engine使用的shader源代码,基于GLSL。 - /// - class ShaderSouce : public AEIO::DecodedData - { - public: - - void Decode(AEIO::DataBuffer& vert, AEIO::DataBuffer& frag); - void Load(const std::string& vert, const std::string& frag); - - private: - - friend class Shader; - - void Decode(AEIO::DataBuffer& buffer) override; - - std::string mVert; - std::string mFrag; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/source/modules/asura-core/graphics/sprite_batch.h b/source/modules/asura-core/graphics/sprite_batch.h index eb1c89c..17ecb40 100644 --- a/source/modules/asura-core/graphics/sprite_batch.h +++ b/source/modules/asura-core/graphics/sprite_batch.h @@ -3,6 +3,8 @@ #include +#include "gpu_buffer.h" + namespace AsuraEngine { namespace Graphics @@ -16,12 +18,16 @@ namespace AsuraEngine { public: - LUAX_DECL_FACTORY(SpriteBatch); - SpriteBatch(); ~SpriteBatch(); + private: + + LUAX_DECL_FACTORY(SpriteBatch); + + + }; } diff --git a/source/modules/asura-core/graphics/texture.h b/source/modules/asura-core/graphics/texture.h index 571c617..4a414b4 100644 --- a/source/modules/asura-core/graphics/texture.h +++ b/source/modules/asura-core/graphics/texture.h @@ -1,8 +1,8 @@ #ifndef __ASURA_TEXTURE_H__ #define __ASURA_TEXTURE_H__ -#include #include +#include #include "../core_config.h" @@ -87,7 +87,7 @@ namespace AsuraEngine /// /// 渲染texture的一部分到rt上,原点在左上角,向右,向下延伸。 /// - virtual void Render(const RenderTarget* rt, const Math::Rectf& quad, const RenderState& state) = 0; + virtual void Render(const RenderTarget* rt, const AEMath::Rectf& quad, const RenderState& state) = 0; protected: @@ -112,6 +112,9 @@ namespace AsuraEngine //----------------------------------------------------------------------------// + /// + /// OpenGL纹理名 + /// GLuint mTex; FilterMode mMinFilter; -- cgit v1.1-26-g67d0