From 51a715ffe0b138960846e9f407a1290037931b33 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 30 Jul 2019 22:08:14 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=88=90=E5=91=98=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/modules/asura-core/graphics/image.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/modules/asura-core/graphics/image.cpp') 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 -- cgit v1.1-26-g67d0