summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-07-30 22:08:14 +0800
committerchai <chaifix@163.com>2019-07-30 22:08:14 +0800
commit51a715ffe0b138960846e9f407a1290037931b33 (patch)
tree55c21cef5ffa5005a8c4c2a9602773ab479e8d0b /source/modules/asura-core/graphics
parentecd7883521cbde02f4f1a6b23a7b3b601c32dbef (diff)
*修改成员变量前缀
Diffstat (limited to 'source/modules/asura-core/graphics')
-rw-r--r--source/modules/asura-core/graphics/binding/_gpu_buffer.cpp6
-rw-r--r--source/modules/asura-core/graphics/binding/_texture.cpp6
-rw-r--r--source/modules/asura-core/graphics/canvas.cpp30
-rw-r--r--source/modules/asura-core/graphics/canvas.h6
-rw-r--r--source/modules/asura-core/graphics/gpu_buffer.cpp58
-rw-r--r--source/modules/asura-core/graphics/gpu_buffer.h12
-rw-r--r--source/modules/asura-core/graphics/image.cpp22
-rw-r--r--source/modules/asura-core/graphics/image.h2
-rw-r--r--source/modules/asura-core/graphics/matrix_stack.cpp16
-rw-r--r--source/modules/asura-core/graphics/matrix_stack.h2
-rw-r--r--source/modules/asura-core/graphics/mesh2d.h4
-rw-r--r--source/modules/asura-core/graphics/shader.cpp60
-rw-r--r--source/modules/asura-core/graphics/shader.h6
-rw-r--r--source/modules/asura-core/graphics/texture.cpp8
-rw-r--r--source/modules/asura-core/graphics/texture.h10
15 files changed, 124 insertions, 124 deletions
diff --git a/source/modules/asura-core/graphics/binding/_gpu_buffer.cpp b/source/modules/asura-core/graphics/binding/_gpu_buffer.cpp
index f55ba64..785496e 100644
--- a/source/modules/asura-core/graphics/binding/_gpu_buffer.cpp
+++ b/source/modules/asura-core/graphics/binding/_gpu_buffer.cpp
@@ -68,7 +68,7 @@ namespace AsuraEngine
lua_rawgeti(L, 2, i);
while (!lua_isnil(L, -1))
{
- switch (self->mDataType)
+ switch (self->m_DataType)
{
case GL_INT:
{
@@ -104,14 +104,14 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(GPUBuffer, _GetSize)
{
LUAX_PREPARE(L, GPUBuffer);
- state.Push(self->mSize);
+ state.Push(self->m_Size);
return 0;
}
LUAX_IMPL_METHOD(GPUBuffer, _GetCount)
{
LUAX_PREPARE(L, GPUBuffer);
- state.Push(self->mSize / self->GetDataTypeSize());
+ state.Push(self->m_Size / self->GetDataTypeSize());
return 0;
}
diff --git a/source/modules/asura-core/graphics/binding/_texture.cpp b/source/modules/asura-core/graphics/binding/_texture.cpp
index 489d362..305ac22 100644
--- a/source/modules/asura-core/graphics/binding/_texture.cpp
+++ b/source/modules/asura-core/graphics/binding/_texture.cpp
@@ -61,8 +61,8 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Texture, _GetFilterMode)
{
LUAX_PREPARE(L, Texture);
- state.Push((int)self->mMinFilter);
- state.Push((int)self->mMagFilter);
+ state.Push((int)self->m_MinFilter);
+ state.Push((int)self->m_MagFilter);
return 2;
}
@@ -70,7 +70,7 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Texture, _GetWrapMode)
{
LUAX_PREPARE(L, Texture);
- state.Push((int)self->mWrapMode);
+ state.Push((int)self->m_WrapMode);
return 1;
}
diff --git a/source/modules/asura-core/graphics/canvas.cpp b/source/modules/asura-core/graphics/canvas.cpp
index 0a17085..e922a51 100644
--- a/source/modules/asura-core/graphics/canvas.cpp
+++ b/source/modules/asura-core/graphics/canvas.cpp
@@ -6,42 +6,42 @@ namespace AsuraEngine
{
Canvas::Canvas()
- : mWidth(0)
- , mHeight(0)
- , mFBO(0)
+ : m_Width(0)
+ , m_Height(0)
+ , m_FBO(0)
{
// Fix: ôСʼʱframebufferԴ
- //glGenFramebuffers(1, &mFBO);
+ //glGenFramebuffers(1, &m_FBO);
//GLint current_fbo;
//glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &current_fbo);
- //glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- //glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTexID, 0);
+ //glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);
+ //glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_TexID, 0);
//glBindFramebuffer(GL_FRAMEBUFFER, current_fbo);
}
void Canvas::SetSize(uint w, uint h)
{
- if (mFBO == 0)
+ if (m_FBO == 0)
{
- glGenFramebuffers(1, &mFBO);
- if (mFBO == 0)
+ glGenFramebuffers(1, &m_FBO);
+ if (m_FBO == 0)
throw Exception("OpenGL glGenFramebuffers cannot generate frame buffer object.");
//
- if (mTexID == 0)
+ if (m_TexID == 0)
{
- glGenTextures(1, &mTexID);
- if (mTexID == 0)
+ glGenTextures(1, &m_TexID);
+ if (m_TexID == 0)
throw Exception("OpenGL glGenTextures cannot generate texture.");
}
GLint current_fbo;
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &current_fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTexID, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_TexID, 0);
glBindFramebuffer(GL_FRAMEBUFFER, current_fbo);
}
GLint current_tex;
glGetIntegerv(GL_TEXTURE_BINDING_2D, &current_tex);
- glBindTexture(GL_TEXTURE_2D, mTexID);
+ glBindTexture(GL_TEXTURE_2D, m_TexID);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glBindTexture(GL_TEXTURE_2D, current_tex);
}
diff --git a/source/modules/asura-core/graphics/canvas.h b/source/modules/asura-core/graphics/canvas.h
index e2e713c..332e973 100644
--- a/source/modules/asura-core/graphics/canvas.h
+++ b/source/modules/asura-core/graphics/canvas.h
@@ -47,11 +47,11 @@ namespace AsuraEngine
private:
- GLuint mFBO;
+ GLuint m_FBO;
- GLuint mTexID;
+ GLuint m_TexID;
- uint mWidth, mHeight;
+ uint m_Width, m_Height;
luaxport:
diff --git a/source/modules/asura-core/graphics/gpu_buffer.cpp b/source/modules/asura-core/graphics/gpu_buffer.cpp
index 8d6f491..4d59009 100644
--- a/source/modules/asura-core/graphics/gpu_buffer.cpp
+++ b/source/modules/asura-core/graphics/gpu_buffer.cpp
@@ -6,26 +6,26 @@ namespace AsuraEngine
{
GPUBuffer::GPUBuffer(BufferType type, BufferUsage usage, BufferDataType dataType, size_t size)
- : mTarget(GL_ZERO)
- , mBuffer(GL_ZERO)
- , mSize(0)
+ : m_Target(GL_ZERO)
+ , m_Buffer(GL_ZERO)
+ , m_Size(0)
#if ASURA_DEBUG
- , mData(nullptr)
+ , m_Data(nullptr)
#endif
{
- mTarget = ConvertBufferType(type);
- mUsage = ConvertBufferUsage(usage);
- mDataType = ConvertBufferDataType(dataType);
- mSize = size;
+ m_Target = ConvertBufferType(type);
+ m_Usage = ConvertBufferUsage(usage);
+ m_DataType = ConvertBufferDataType(dataType);
+ m_Size = size;
}
GPUBuffer::~GPUBuffer()
{
#if ASURA_DEBUG
- if (mData)
- free(mData);
+ if (m_Data)
+ free(m_Data);
#endif
- glDeleteBuffers(1, &mBuffer);
+ glDeleteBuffers(1, &m_Buffer);
}
GLenum GPUBuffer::ConvertBufferType(BufferType type)
@@ -69,63 +69,63 @@ namespace AsuraEngine
{
if (data == nullptr)
return false;
- if (mBuffer == 0)
+ if (m_Buffer == 0)
{
gfx.WipeError();
- glGenBuffers(1, &mBuffer);
- if (mBuffer == 0)
+ glGenBuffers(1, &m_Buffer);
+ if (m_Buffer == 0)
throw Exception("OpenGL glGenBuffers failed.");
- glBindBuffer(mTarget, mBuffer);
- glBufferData(mTarget, mSize, NULL, mUsage);
+ glBindBuffer(m_Target, m_Buffer);
+ glBufferData(m_Target, m_Size, NULL, m_Usage);
if (gfx.HasError())
{
- glBindBuffer(mTarget, 0);
+ glBindBuffer(m_Target, 0);
throw Exception("OpenGL glBufferData failed. Errorcode=%d.", gfx.GetError());
}
#if ASURA_DEBUG
- mData = (byte*)malloc(size);
- memset(mData, 0, size);
+ m_Data = (byte*)malloc(size);
+ memset(m_Data, 0, size);
#endif
}
else
- glBindBuffer(mTarget, mBuffer);
- glBufferSubData(mTarget, offset, size, data);
+ glBindBuffer(m_Target, m_Buffer);
+ glBufferSubData(m_Target, offset, size, data);
if (gfx.HasError())
{
- glBindBuffer(mTarget, 0);
+ glBindBuffer(m_Target, 0);
throw Exception("OpenGL glBufferSubData failed. Errorcode=%d.", gfx.GetError());
}
- glBindBuffer(mTarget, 0);
+ glBindBuffer(m_Target, 0);
#if ASURA_DEBUG
- memcpy(mData + offset, data, size);
+ memcpy(m_Data + offset, data, size);
#endif
return true;
}
void GPUBuffer::Bind()
{
- glBindBuffer(mTarget, mBuffer);
+ glBindBuffer(m_Target, m_Buffer);
}
void GPUBuffer::UnBind()
{
- glBindBuffer(mTarget, 0);
+ glBindBuffer(m_Target, 0);
}
uint GPUBuffer::GetBufferSize()
{
- return mSize;
+ return m_Size;
}
GLenum GPUBuffer::GetDataType()
{
- return mDataType;
+ return m_DataType;
}
size_t GPUBuffer::GetDataTypeSize()
{
//https://blog.csdn.net/nklinux/article/details/16919017
- switch (mDataType)
+ switch (m_DataType)
{
case GL_UNSIGNED_BYTE:
return sizeof(GLbyte);
diff --git a/source/modules/asura-core/graphics/gpu_buffer.h b/source/modules/asura-core/graphics/gpu_buffer.h
index f759c16..09c5476 100644
--- a/source/modules/asura-core/graphics/gpu_buffer.h
+++ b/source/modules/asura-core/graphics/gpu_buffer.h
@@ -61,20 +61,20 @@ namespace AsuraEngine
GLenum ConvertBufferUsage(BufferUsage type);
GLenum ConvertBufferDataType(BufferDataType type);
- GLenum mTarget;
- GLuint mBuffer;
+ GLenum m_Target;
+ GLuint m_Buffer;
///
/// openglԴ滺岢ûж͵ҪֻglVertexAttribPointerʱָ
/// drawcall ʱݸʼַʹbufferȡඥݣԲͬ
/// ԱһbufferСΪ˱ֽӿڵļ࣬ڳʼbufferʱָ
/// ͣڱ͵һ£Բͬͷͬbuffer
///
- GLenum mDataType;
- GLuint mUsage;
- uint mSize;
+ GLenum m_DataType;
+ GLuint m_Usage;
+ uint m_Size;
#if ASURA_DEBUG
- byte* mData;
+ byte* m_Data;
#endif
luaxport:
diff --git a/source/modules/asura-core/graphics/image.cpp b/source/modules/asura-core/graphics/image.cpp
index 1d74d27..a0dff8d 100644
--- a/source/modules/asura-core/graphics/image.cpp
+++ b/source/modules/asura-core/graphics/image.cpp
@@ -15,8 +15,8 @@ namespace AsuraEngine
{
Image::Image()
- : mWidth(0)
- , mHeight(0)
+ : m_Width(0)
+ , m_Height(0)
{
}
@@ -28,14 +28,14 @@ namespace AsuraEngine
{
if (!imgData) return false;
- if (mTexID == 0)
+ if (m_TexID == 0)
{
- glGenTextures(1, &mTexID);
- if (mTexID == 0)
+ glGenTextures(1, &m_TexID);
+ if (m_TexID == 0)
throw Exception("OpenGL glGenTextures failed.");
}
- glBindTexture(GL_TEXTURE_2D, mTexID);
+ glBindTexture(GL_TEXTURE_2D, m_TexID);
imgData->Lock();
int width = imgData->width;
int height = imgData->height;
@@ -51,8 +51,8 @@ namespace AsuraEngine
, imgData->pixels
);
- mWidth = imgData->width;
- mHeight = imgData->height;
+ m_Width = imgData->width;
+ m_Height = imgData->height;
imgData->Unlock();
GLenum err = glGetError();
if (err != GL_NO_ERROR)
@@ -66,7 +66,7 @@ namespace AsuraEngine
{
if (!imgData) return false;
- glBindTexture(GL_TEXTURE_2D, mTexID);
+ glBindTexture(GL_TEXTURE_2D, m_TexID);
imgData->Lock();
int width = imgData->width;
int height = imgData->height;
@@ -93,12 +93,12 @@ namespace AsuraEngine
uint32 Image::GetWidth()
{
- return mWidth;
+ return m_Width;
}
uint32 Image::GetHeight()
{
- return mHeight;
+ return m_Height;
}
} // Graphics
diff --git a/source/modules/asura-core/graphics/image.h b/source/modules/asura-core/graphics/image.h
index d7cd37f..229a849 100644
--- a/source/modules/asura-core/graphics/image.h
+++ b/source/modules/asura-core/graphics/image.h
@@ -41,7 +41,7 @@ namespace AsuraEngine
private:
- uint32 mWidth, mHeight;
+ uint32 m_Width, m_Height;
luaxport:
diff --git a/source/modules/asura-core/graphics/matrix_stack.cpp b/source/modules/asura-core/graphics/matrix_stack.cpp
index d48a1e0..2211158 100644
--- a/source/modules/asura-core/graphics/matrix_stack.cpp
+++ b/source/modules/asura-core/graphics/matrix_stack.cpp
@@ -9,7 +9,7 @@ namespace AsuraEngine
: top(0)
{
// ջʼջô˱֤ջԶǿգȡֵ
- mStack[top].SetIdentity();
+ m_Stack[top].SetIdentity();
}
MatrixStack::~MatrixStack()
@@ -18,7 +18,7 @@ namespace AsuraEngine
void MatrixStack::LoadIdentity()
{
- mStack[top].SetIdentity();
+ m_Stack[top].SetIdentity();
}
bool MatrixStack::Push()
@@ -26,7 +26,7 @@ namespace AsuraEngine
if (top == ASURA_MAX_MATRIX_STACK_DEPTH - 1)
return false;
++top;
- mStack[top] = mStack[top - 1];
+ m_Stack[top] = m_Stack[top - 1];
return true;
}
@@ -40,7 +40,7 @@ namespace AsuraEngine
AEMath::Matrix44& MatrixStack::GetTop()
{
- return mStack[top];
+ return m_Stack[top];
}
uint MatrixStack::GetTopIndex()
@@ -55,22 +55,22 @@ namespace AsuraEngine
void MatrixStack::Ortho(float left, float right, float bottom, float top, float near, float far)
{
- mStack[this->top].Ortho(left, right, bottom, top, near, far);
+ m_Stack[this->top].Ortho(left, right, bottom, top, near, far);
}
void MatrixStack::Rotate(float angle)
{
- mStack[top].Rotate(angle);
+ m_Stack[top].Rotate(angle);
}
void MatrixStack::Translate(float x, float y)
{
- mStack[top].Translate(x, y);
+ m_Stack[top].Translate(x, y);
}
void MatrixStack::Scale(float x, float y)
{
- mStack[top].Scale(x, y);
+ m_Stack[top].Scale(x, y);
}
}
diff --git a/source/modules/asura-core/graphics/matrix_stack.h b/source/modules/asura-core/graphics/matrix_stack.h
index ae983e7..67401d0 100644
--- a/source/modules/asura-core/graphics/matrix_stack.h
+++ b/source/modules/asura-core/graphics/matrix_stack.h
@@ -48,7 +48,7 @@ namespace AsuraEngine
private:
- AEMath::Matrix44 mStack[ASURA_MAX_MATRIX_STACK_DEPTH];
+ AEMath::Matrix44 m_Stack[ASURA_MAX_MATRIX_STACK_DEPTH];
uint8 top;
};
diff --git a/source/modules/asura-core/graphics/mesh2d.h b/source/modules/asura-core/graphics/mesh2d.h
index 5330967..8c26564 100644
--- a/source/modules/asura-core/graphics/mesh2d.h
+++ b/source/modules/asura-core/graphics/mesh2d.h
@@ -37,8 +37,8 @@ namespace AsuraEngine
private:
- VertexBuffer* mVBO; ///< vertex buffer
- IndexBuffer* mIBO; ///< index buffer
+ VertexBuffer* m_VBO; ///< vertex buffer
+ IndexBuffer* m_IBO; ///< index buffer
luaxport:
diff --git a/source/modules/asura-core/graphics/shader.cpp b/source/modules/asura-core/graphics/shader.cpp
index 22b9ee3..8606e79 100644
--- a/source/modules/asura-core/graphics/shader.cpp
+++ b/source/modules/asura-core/graphics/shader.cpp
@@ -19,9 +19,9 @@ namespace AsuraEngine
Shader::~Shader()
{
- if(mVertShader) glDeleteShader(mVertShader);
- if(mFragShader) glDeleteShader(mFragShader);
- if(mProgram) glDeleteProgram(mProgram);
+ if(m_VertShader) glDeleteShader(m_VertShader);
+ if(m_FragShader) glDeleteShader(m_FragShader);
+ if(m_Program) glDeleteProgram(m_Program);
}
void Shader::SetActive(Shader* shader)
@@ -38,10 +38,10 @@ namespace AsuraEngine
{
string warnning = "";
- if (!mProgram)
+ if (!m_Program)
{
- mProgram = glCreateProgram();
- if (!mProgram)
+ m_Program = glCreateProgram();
+ if (!m_Program)
throw Exception("Cannot create OpenGL shader program.");
}
@@ -55,12 +55,12 @@ namespace AsuraEngine
throw Exception("Compile fragment shader failed:%s", warnning);
}
- glAttachShader(mProgram, mVertShader);
- glAttachShader(mProgram, mFragShader);
+ glAttachShader(m_Program, m_VertShader);
+ glAttachShader(m_Program, m_FragShader);
- glLinkProgram(mProgram);
+ glLinkProgram(m_Program);
GLint success;
- glGetProgramiv(mProgram, GL_LINK_STATUS, &success);
+ glGetProgramiv(m_Program, GL_LINK_STATUS, &success);
if (success == GL_FALSE)
{
warnning = GetProgramWarnings();
@@ -72,10 +72,10 @@ namespace AsuraEngine
bool Shader::CompileVertexShader(const string& vert, string& outError)
{
- if (!mVertShader)
+ if (!m_VertShader)
{
- mVertShader = glCreateShader(GL_VERTEX_SHADER);
- if (!mVertShader)
+ m_VertShader = glCreateShader(GL_VERTEX_SHADER);
+ if (!m_VertShader)
{
outError = "Cannot create OpenGL Vertex shader.";
return false;
@@ -85,12 +85,12 @@ namespace AsuraEngine
const GLchar* source = vert.c_str();
GLint success;
- glShaderSource(mVertShader, 1, &source, NULL);
- glCompileShader(mVertShader);
- glGetShaderiv(mVertShader, GL_COMPILE_STATUS, &success);
+ glShaderSource(m_VertShader, 1, &source, NULL);
+ glCompileShader(m_VertShader);
+ glGetShaderiv(m_VertShader, GL_COMPILE_STATUS, &success);
if (success == GL_FALSE)
{
- outError = GetShaderWarnings(mVertShader);
+ outError = GetShaderWarnings(m_VertShader);
return false;
}
@@ -99,10 +99,10 @@ namespace AsuraEngine
bool Shader::CompileFragementShader(const string& frag, string& outError)
{
- if (!mFragShader)
+ if (!m_FragShader)
{
- mFragShader = glCreateShader(GL_FRAGMENT_SHADER);
- if (!mFragShader)
+ m_FragShader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!m_FragShader)
{
outError = "Cannot create OpenGL fragment shader.";
return false;
@@ -113,12 +113,12 @@ namespace AsuraEngine
GLint success;
source = frag.c_str();
- glShaderSource(mFragShader, 1, &source, NULL);
- glCompileShader(mFragShader);
- glGetShaderiv(mFragShader, GL_COMPILE_STATUS, &success);
+ glShaderSource(m_FragShader, 1, &source, NULL);
+ glCompileShader(m_FragShader);
+ glGetShaderiv(m_FragShader, GL_COMPILE_STATUS, &success);
if (success == GL_FALSE)
{
- outError = GetShaderWarnings(mFragShader);
+ outError = GetShaderWarnings(m_FragShader);
return false;
}
@@ -142,19 +142,19 @@ namespace AsuraEngine
uint Shader::GetUniformLocation(const std::string& uniform)
{
- GLint loc = glGetUniformLocation(mProgram, uniform.c_str());
+ GLint loc = glGetUniformLocation(m_Program, uniform.c_str());
return loc;
}
bool Shader::HasUniform(const std::string& uniform)
{
- GLint loc = glGetUniformLocation(mProgram, uniform.c_str());
+ GLint loc = glGetUniformLocation(m_Program, uniform.c_str());
return loc != -1;
}
GLuint Shader::GetGLProgram()
{
- return mProgram;
+ return m_Program;
}
void Shader::SetUniformFloat(uint loc, float value)
@@ -222,7 +222,7 @@ namespace AsuraEngine
std::string Shader::GetProgramWarnings()
{
GLint strsize, nullpos;
- glGetProgramiv(mProgram, GL_INFO_LOG_LENGTH, &strsize);
+ glGetProgramiv(m_Program, GL_INFO_LOG_LENGTH, &strsize);
if (strsize == 0)
return "";
@@ -230,7 +230,7 @@ namespace AsuraEngine
char *tempstr = new char[strsize];
memset(tempstr, '\0', strsize);
- glGetProgramInfoLog(mProgram, strsize, &nullpos, tempstr);
+ glGetProgramInfoLog(m_Program, strsize, &nullpos, tempstr);
tempstr[nullpos] = '\0';
std::string warnings(tempstr);
@@ -271,7 +271,7 @@ namespace AsuraEngine
int Shader::GetAttributeLocation(const std::string& attribute)
{
- int loc = glGetAttribLocation(mProgram, attribute.c_str());
+ int loc = glGetAttribLocation(m_Program, attribute.c_str());
return loc;
}
diff --git a/source/modules/asura-core/graphics/shader.h b/source/modules/asura-core/graphics/shader.h
index 30a386e..dc8dbe0 100644
--- a/source/modules/asura-core/graphics/shader.h
+++ b/source/modules/asura-core/graphics/shader.h
@@ -83,9 +83,9 @@ namespace AsuraEngine
std::string GetProgramWarnings();
std::string GetShaderWarnings(GLuint shader);
- GLuint mProgram;
- GLuint mVertShader;
- GLuint mFragShader;
+ GLuint m_Program;
+ GLuint m_VertShader;
+ GLuint m_FragShader;
luaxport:
diff --git a/source/modules/asura-core/graphics/texture.cpp b/source/modules/asura-core/graphics/texture.cpp
index 240a5f8..ef85ceb 100644
--- a/source/modules/asura-core/graphics/texture.cpp
+++ b/source/modules/asura-core/graphics/texture.cpp
@@ -8,20 +8,20 @@ namespace AsuraEngine
{
Texture::Texture()
- : mTexID(0)
+ : m_TexID(0)
{
}
Texture::~Texture()
{
// ͷԴ
- if(mTexID != 0)
- glDeleteTextures(1, &mTexID);
+ if(m_TexID != 0)
+ glDeleteTextures(1, &m_TexID);
}
GLuint Texture::GetGLTexture() const
{
- return mTexID;
+ return m_TexID;
}
TextureFormat Texture::ConvertColorFormat(const ColorFormat& colorformat)
diff --git a/source/modules/asura-core/graphics/texture.h b/source/modules/asura-core/graphics/texture.h
index e16990c..5d754eb 100644
--- a/source/modules/asura-core/graphics/texture.h
+++ b/source/modules/asura-core/graphics/texture.h
@@ -77,11 +77,11 @@ namespace AsuraEngine
/// תcolor formatΪtexture format
TextureFormat ConvertColorFormat(const ColorFormat& colorformat);
- GLuint mTexID;
- FilterMode mMinFilter;
- FilterMode mMagFilter;
- WrapMode mWrapMode;
- bool mIsGenMipmap;
+ GLuint m_TexID;
+ FilterMode m_MinFilter;
+ FilterMode m_MagFilter;
+ WrapMode m_WrapMode;
+ bool m_IsGenMipmap;
LUAX_DECL_ENUM(ColorFormat, 1);
LUAX_DECL_ENUM(FilterMode, 1);