From d8d7963b9b658799b806d516bbd6b44c4baa28f8 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 24 Oct 2018 22:08:46 +0800 Subject: =?UTF-8?q?+=E7=B2=92=E5=AD=90=E7=B3=BB=E7=BB=9F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/je_graphic.h | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'src/libjin/Graphics/je_graphic.h') diff --git a/src/libjin/Graphics/je_graphic.h b/src/libjin/Graphics/je_graphic.h index 3410d61..2ed028d 100644 --- a/src/libjin/Graphics/je_graphic.h +++ b/src/libjin/Graphics/je_graphic.h @@ -16,9 +16,8 @@ namespace JinEngine // // Graphic - // |-Texture - // |-Canvas - // |-TextureFont + // |- GraphicSingle + // |- GraphicBatch // /// @@ -28,7 +27,7 @@ namespace JinEngine { public: /// - /// + /// /// Graphic(int w = 0, int h = 0); @@ -42,16 +41,6 @@ namespace JinEngine /// virtual ~Graphic(); - /// - /// - /// - void render(int x, int y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0); - - /// - /// - /// - void render(const Math::Quad& slice, int x, int y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0); - /// /// /// @@ -63,9 +52,11 @@ namespace JinEngine inline int getHeight() const { return mSize.h; } /// - /// + /// Get opengl texture token. + /// + /// @return OpenGL texture token. /// - inline GLuint getTexture() const { return mTexture; } + inline GLuint getGLTexture() const { return mTexture; } /// /// @@ -73,14 +64,11 @@ namespace JinEngine void setFilter(GLint min, GLint max); protected: - GLuint mTexture; + JinEngine::Math::Vector2 mSize; private: - JinEngine::Math::Vector2 mSize; - // Screen coordinates and uv coordinates. - float mVertexCoords[8]; - float mTextureCoords[8]; - + GLuint mTexture; + }; } // namespace Graphics -- cgit v1.1-26-g67d0