diff options
author | chai <chaifix@163.com> | 2018-10-10 13:22:48 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-10 13:22:48 +0800 |
commit | f435df9cdfcb6d1b2a4c916ae61d5af0762e171b (patch) | |
tree | d720a9e642abc82d90fa3969fe6e6c52a4e33abf | |
parent | 498664ceba42e3b609e4464c246de164c61775c7 (diff) |
*update
-rw-r--r-- | libjin/Graphics/Drawable.cpp | 4 | ||||
-rw-r--r-- | libjin/Graphics/Font.h | 4 | ||||
-rw-r--r-- | libjin/Graphics/Shaders/base.shader.h | 4 | ||||
-rw-r--r-- | libjin/Graphics/TTF.cpp | 3 | ||||
-rw-r--r-- | libjin/Graphics/TexFont.cpp | 1 | ||||
-rw-r--r-- | libjin/Graphics/TexFont.h | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/libjin/Graphics/Drawable.cpp b/libjin/Graphics/Drawable.cpp index ee3e5f2..ea4561d 100644 --- a/libjin/Graphics/Drawable.cpp +++ b/libjin/Graphics/Drawable.cpp @@ -104,8 +104,8 @@ namespace graphics gl.ModelMatrix.setTransformation(x, y, r, sx, sy, ax, ay); Shader* shader = Shader::getCurrentShader(); - shader->sendMatrix4(Shader::SHADER_MODEL_MATRIX, &gl.ModelMatrix); - shader->sendMatrix4(Shader::SHADER_PROJECTION_MATRIX, &gl.ProjectionMatrix); + shader->sendMatrix4(SHADER_MODEL_MATRIX, &gl.ModelMatrix); + shader->sendMatrix4(SHADER_PROJECTION_MATRIX, &gl.ProjectionMatrix); shader->bindVertexPointer(2, GL_FLOAT, 0, vertCoords); shader->bindUVPointer(2, GL_FLOAT, 0, texCoords); diff --git a/libjin/Graphics/Font.h b/libjin/Graphics/Font.h index adb8c38..cdf2d54 100644 --- a/libjin/Graphics/Font.h +++ b/libjin/Graphics/Font.h @@ -22,7 +22,7 @@ namespace graphics }; -} -} +} // graphics +} // jin #endif
\ No newline at end of file diff --git a/libjin/Graphics/Shaders/base.shader.h b/libjin/Graphics/Shaders/base.shader.h index bf41c4f..53f8e5d 100644 --- a/libjin/Graphics/Shaders/base.shader.h +++ b/libjin/Graphics/Shaders/base.shader.h @@ -1,5 +1,5 @@ -#ifndef LIBJIN_BASE_SHADER_H -#define LIBJIN_BASE_SHADER_H +#ifndef __LIBJIN_BASE_SHADER_H +#define __LIBJIN_BASE_SHADER_H /* * https://stackoverflow.com/questions/10868958/what-does-sampler2d-store * The sampler2D is bound to a texture unit. The glUniform call binds it to texture diff --git a/libjin/Graphics/TTF.cpp b/libjin/Graphics/TTF.cpp index e5a3f3a..5988296 100644 --- a/libjin/Graphics/TTF.cpp +++ b/libjin/Graphics/TTF.cpp @@ -59,10 +59,9 @@ namespace graphics * | | bitmap | | * +--|--------|--+ baseline * | +--------+ | - * +--|-----------+ decent + * +--------------+ decent * | | * leftSideBearing | - * | * advanceWidth */ void TTFData::getVMetrics(int* baseline, int* descent) diff --git a/libjin/Graphics/TexFont.cpp b/libjin/Graphics/TexFont.cpp index ffd8c72..4c6c66b 100644 --- a/libjin/Graphics/TexFont.cpp +++ b/libjin/Graphics/TexFont.cpp @@ -19,6 +19,7 @@ namespace graphics /* create texture font from tilemap */ TexFont * TexFont::createTexFont(const Bitmap* bitmap, const std::vector<Codepoint>& codepoints, int cellw, int cellh, int l, int r, int t, int b) { + } /* create texture font from seperated glyphs */ diff --git a/libjin/Graphics/TexFont.h b/libjin/Graphics/TexFont.h index 334ff5c..fcc00b1 100644 --- a/libjin/Graphics/TexFont.h +++ b/libjin/Graphics/TexFont.h @@ -19,9 +19,9 @@ namespace graphics { public: /* create texture font from tilemap */ - TexFont * createTexFont(const Bitmap* bitmap, const std::vector<Codepoint>& codepoints, int cellw, int cellh, int l = 0, int r = 0, int t = 0, int b = 0); + static TexFont * createTexFont(const Bitmap* bitmap, const std::vector<Codepoint>& codepoints, int cellw, int cellh, int l = 0, int r = 0, int t = 0, int b = 0); /* create texture font from seperated glyphs */ - TexFont* createTexFont(const Bitmap* bitmap, const std::vector<Codepoint>& codepoints, Color mask, int cellh, int l = 0, int r = 0, int t = 0, int b = 0); + static TexFont* createTexFont(const Bitmap* bitmap, const std::vector<Codepoint>& codepoints, Color mask, int cellh, int l = 0, int r = 0, int t = 0, int b = 0); ~TexFont(); |