aboutsummaryrefslogtreecommitdiff
path: root/src/libjin
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin')
-rw-r--r--src/libjin/render/jsl.cpp9
-rw-r--r--src/libjin/render/jsl.h12
2 files changed, 11 insertions, 10 deletions
diff --git a/src/libjin/render/jsl.cpp b/src/libjin/render/jsl.cpp
index 49bb18f..58b9a15 100644
--- a/src/libjin/render/jsl.cpp
+++ b/src/libjin/render/jsl.cpp
@@ -9,10 +9,11 @@ namespace render
"#version 120 \n"
"#define number float \n"
"#define Image sampler2D \n"
- "#define Texel texture2D \n"
+ "#define Canvas sampler2D \n"
"#define Color vec4 \n"
+ "#define Texel texture2D \n"
"#define extern uniform \n"
- "uniform Image _tex0_; \n"
+ "uniform Image _tex0_; \n"
"%s \n"
"void main(){ \n"
"gl_FragColor = effect(gl_Color, _tex0_, gl_TexCoord[0].xy, gl_FragCoord.xy);\n"
@@ -33,13 +34,13 @@ namespace render
destroy();
}
- void JSLProgram::destroy()
+ inline void JSLProgram::destroy()
{
if (currentJSLProgram == this)
unuse();
}
- void JSLProgram::initialize(const char* program)
+ inline void JSLProgram::initialize(const char* program)
{
if (maxTextureUnits == -1)
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
diff --git a/src/libjin/render/jsl.h b/src/libjin/render/jsl.h
index 7183325..aff7fea 100644
--- a/src/libjin/render/jsl.h
+++ b/src/libjin/render/jsl.h
@@ -23,15 +23,15 @@ namespace render
inline void JSLProgram::use()
{
glUseProgram(pid);
- JSLProgram::currentJSLProgram = this;
- JSLProgram::currentTextureUnit = 0;
+ currentJSLProgram = this;
+ currentTextureUnit = 0;
}
static inline void JSLProgram::unuse()
{
glUseProgram(0);
- JSLProgram::currentJSLProgram = nullptr;
- JSLProgram::currentTextureUnit = 0;
+ currentJSLProgram = nullptr;
+ currentTextureUnit = 0;
}
void sendFloat(const char* name, float number);
@@ -59,8 +59,8 @@ namespace render
GLint getTextureUnit(const std::string& name);
- void initialize(const char* program);
- void destroy();
+ inline void initialize(const char* program);
+ inline void destroy();
};