projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quick backup of the renderer - things missing
[demo]
/
src
/
opengl
/
texture-gl.cc
diff --git
a/src/opengl/texture-gl.cc
b/src/opengl/texture-gl.cc
index
0143a6e
..
a2072e3
100644
(file)
--- a/
src/opengl/texture-gl.cc
+++ b/
src/opengl/texture-gl.cc
@@
-31,4
+31,10
@@
void TextureGL::update()
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels);
glGenerateMipmap(GL_TEXTURE_2D);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels);
glGenerateMipmap(GL_TEXTURE_2D);
+}
+
+
+void TextureGL::bind()
+{
+ glBindTexture(GL_TEXTURE_2D, tex);
}
\ No newline at end of file
}
\ No newline at end of file