aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/je_drawable.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-21 13:37:27 +0800
committerchai <chaifix@163.com>2018-10-21 13:37:27 +0800
commit066e5987c515dfc34537d73ca9d2a81ddd1f9e1b (patch)
treeec45fe523daa4f9e8a30db0a045a0eb9cee84822 /src/libjin/Graphics/je_drawable.h
parent3292019e55dd02a96420e72bad88711fd36ef249 (diff)
*注释
Diffstat (limited to 'src/libjin/Graphics/je_drawable.h')
-rw-r--r--src/libjin/Graphics/je_drawable.h23
1 files changed, 11 insertions, 12 deletions
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<unsigned int> size;
- JinEngine::Math::Vector2<int> anchor;
- float vertex_coords[DRAWABLE_V_SIZE];
- float texture_coords[DRAWABLE_V_SIZE];
+ GLuint mTexture;
+ GLuint mVBO;
+ JinEngine::Math::Vector2<unsigned int> mSize;
+ JinEngine::Math::Vector2<int> 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