aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/render')
-rw-r--r--src/libjin/render/color.h14
-rw-r--r--src/libjin/render/font.cpp2
-rw-r--r--src/libjin/render/image.cpp8
-rw-r--r--src/libjin/render/jsl.h16
4 files changed, 20 insertions, 20 deletions
diff --git a/src/libjin/render/color.h b/src/libjin/render/color.h
index 6f34b4a..856cd48 100644
--- a/src/libjin/render/color.h
+++ b/src/libjin/render/color.h
@@ -10,16 +10,16 @@ namespace jin
namespace render
{
- union color {
- struct {
+ union color {
+ struct {
#if JIN_BYTEORDER == JIN_BIG_ENDIAN
- unsigned char r, g, b, a;
+ unsigned char r, g, b, a;
#else
- unsigned char a, b, g, r;
+ unsigned char a, b, g, r;
#endif
- }rgba;
- int word;
- };
+ }rgba;
+ int word;
+ };
}
}
diff --git a/src/libjin/render/font.cpp b/src/libjin/render/font.cpp
index 287e0c0..8a96f25 100644
--- a/src/libjin/render/font.cpp
+++ b/src/libjin/render/font.cpp
@@ -165,7 +165,7 @@ namespace render
int maxX = 0;
float factor = fheight / (float)PIXEL_HEIGHT;
-
+
for (int i = 0; i < len; ++i)
{
char c = str[i];
diff --git a/src/libjin/render/image.cpp b/src/libjin/render/image.cpp
index 5de997a..583bd8d 100644
--- a/src/libjin/render/image.cpp
+++ b/src/libjin/render/image.cpp
@@ -26,10 +26,10 @@ namespace render
color Image::getPixel(int x, int y)
{
- if (without(x, 0, width) || without(y, 0, height))
- {
- return { 0 };
- }
+ if (without(x, 0, width) || without(y, 0, height))
+ {
+ return { 0 };
+ }
return pixels[x + y * width];
}
diff --git a/src/libjin/render/jsl.h b/src/libjin/render/jsl.h
index aff7fea..35479d3 100644
--- a/src/libjin/render/jsl.h
+++ b/src/libjin/render/jsl.h
@@ -36,11 +36,11 @@ namespace render
void sendFloat(const char* name, float number);
void sendImage(const char* name, const Image* image);
- void sendVec2(const char* name, float x, float y);
- void sendVec3(const char* name, float x, float y, float z);
- void sendVec4(const char* name, float x, float y, float z, float w);
- void sendCanvas(const char* name, const Canvas* canvas);
- void sendColor(const char* name, const color* col);
+ void sendVec2(const char* name, float x, float y);
+ void sendVec3(const char* name, float x, float y, float z);
+ void sendVec4(const char* name, float x, float y, float z, float w);
+ void sendCanvas(const char* name, const Canvas* canvas);
+ void sendColor(const char* name, const color* col);
static inline JSLProgram* getCurrentJSL()
{
@@ -53,11 +53,11 @@ namespace render
std::map<std::string, GLint> texturePool;
- static JSLProgram* currentJSLProgram;
+ static JSLProgram* currentJSLProgram;
static GLint currentTextureUnit;
- static GLint maxTextureUnits;
+ static GLint maxTextureUnits;
- GLint getTextureUnit(const std::string& name);
+ GLint getTextureUnit(const std::string& name);
inline void initialize(const char* program);
inline void destroy();