aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/je_gl.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-08 23:51:24 +0800
committerchai <chaifix@163.com>2019-01-08 23:51:24 +0800
commite7800a488a97f3172029aba82e6912ad50f7ae32 (patch)
tree7cad16c52e1ab2501fa57ed8a0e20226d09b1dd2 /src/libjin/graphics/je_gl.cpp
parente723aeaa9bb30658cd5f5b1e911e6487be70c69b (diff)
*opengl backend
Diffstat (limited to 'src/libjin/graphics/je_gl.cpp')
-rw-r--r--src/libjin/graphics/je_gl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libjin/graphics/je_gl.cpp b/src/libjin/graphics/je_gl.cpp
index bbe82a8..3ce869a 100644
--- a/src/libjin/graphics/je_gl.cpp
+++ b/src/libjin/graphics/je_gl.cpp
@@ -38,7 +38,7 @@ namespace JinEngine
void OpenGL::init()
{
enable(GL_BLEND);
- enable(GL_TEXTURE_2D);
+ //enable(GL_TEXTURE_2D);
setClearColor(0, 0, 0, 0xff);
setColor(0xff, 0xff, 0xff, 0xff);
setBlendMode(OpenGL::BlendMode::ALPHA);
@@ -78,7 +78,7 @@ namespace JinEngine
return t;
}
- void OpenGL::bindTexture(GLuint texture)
+ void OpenGL::bindTexture2D(GLuint texture)
{
glBindTexture(GL_TEXTURE_2D, texture);
}
@@ -103,13 +103,12 @@ namespace JinEngine
glTexSubImage2D(GL_TEXTURE_2D, 0, xoffset, yoffset, width, height, format, type, pixels);
}
- void OpenGL::activeTexUnit(unsigned int unit)
+ void OpenGL::activeTextureUnit(unsigned int unit)
{
// glActiveTexture selects which texture unit subsequent texture state calls will affect.
glActiveTexture(GL_TEXTURE0 + unit);
}
-
void OpenGL::drawArrays(GLenum mode, GLint first, GLsizei count)
{
glDrawArrays(mode, first, count);