diff options
author | chai <chaifix@163.com> | 2018-11-03 21:11:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-03 21:11:41 +0800 |
commit | 281f8feabffd69928a0a0f08aa31f70b36f5e6bd (patch) | |
tree | a22413447a5480a5dffe625c677ad7c4140350c5 /src/3rdparty/ogl/OpenGL.h | |
parent | f6ef5d6c0188e7dc6b39803ca37fe736f0eb3962 (diff) |
*增加游戏目录选择
Diffstat (limited to 'src/3rdparty/ogl/OpenGL.h')
-rw-r--r-- | src/3rdparty/ogl/OpenGL.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/3rdparty/ogl/OpenGL.h b/src/3rdparty/ogl/OpenGL.h index 04043fe..3e416c7 100644 --- a/src/3rdparty/ogl/OpenGL.h +++ b/src/3rdparty/ogl/OpenGL.h @@ -36,6 +36,7 @@ namespace ogl2d void popColor(); void flushError(); GLuint genTexture(); + void deleteTexture(GLuint texture); void bindTexture(GLuint texture = 0); inline GLuint curTexture() { @@ -151,6 +152,11 @@ namespace ogl2d glBindTexture(GL_TEXTURE_2D, texture); } + void OpenGL::deleteTexture(GLuint texture) + { + glDeleteTextures(1, &texture); + } + void OpenGL::setTexParameter(GLenum pname, GLint param) { glTexParameteri(GL_TEXTURE_2D, pname, param); |