From 066e5987c515dfc34537d73ca9d2a81ddd1f9e1b Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 21 Oct 2018 13:37:27 +0800 Subject: =?UTF-8?q?*=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/je_drawable.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/libjin/Graphics/je_drawable.h') diff --git a/src/libjin/Graphics/je_drawable.h b/src/libjin/Graphics/je_drawable.h index 2547373..1b739cb 100644 --- a/src/libjin/Graphics/je_drawable.h +++ b/src/libjin/Graphics/je_drawable.h @@ -37,7 +37,7 @@ namespace JinEngine /// /// /// - void setAnchor(int x, int y); + void setOrigin(int x, int y); /// /// @@ -52,17 +52,17 @@ namespace JinEngine /// /// /// - inline int getWidth() const { return size.w; } + inline int getWidth() const { return mSize.w; } /// /// /// - inline int getHeight() const { return size.h; } + inline int getHeight() const { return mSize.h; } /// /// /// - inline GLuint getTexture() const { return texture; } + inline GLuint getTexture() const { return mTexture; } /// /// @@ -72,14 +72,12 @@ namespace JinEngine protected: static const int DRAWABLE_V_SIZE = 8; - GLuint texture; - GLuint vbo; - /* TODO: vertex buffer object */ - /* GLuint vbo; */ - JinEngine::Math::Vector2 size; - JinEngine::Math::Vector2 anchor; - float vertex_coords[DRAWABLE_V_SIZE]; - float texture_coords[DRAWABLE_V_SIZE]; + GLuint mTexture; + GLuint mVBO; + JinEngine::Math::Vector2 mSize; + JinEngine::Math::Vector2 mOrigin; + float mVertexCoords[DRAWABLE_V_SIZE]; + float mTextureCoords[DRAWABLE_V_SIZE]; }; @@ -87,4 +85,5 @@ namespace JinEngine } // namespace JinEngine #endif // LIBJIN_MODULES_RENDER + #endif // __JE_DRAWABLE \ No newline at end of file -- cgit v1.1-26-g67d0