projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backup - needs fixing
[demo]
/
src
/
opengl
/
opengl.cc
diff --git
a/src/opengl/opengl.cc
b/src/opengl/opengl.cc
index
66dd002
..
00b42f5
100644
(file)
--- a/
src/opengl/opengl.cc
+++ b/
src/opengl/opengl.cc
@@
-15,6
+15,9
@@
static void zbuffer(bool enable);
static void cull_face(Gfx_cull_face cf);
static void reshape(int width, int height) {}
static void wireframe(bool enable);
static void cull_face(Gfx_cull_face cf);
static void reshape(int width, int height) {}
static void wireframe(bool enable);
+static void swapbuffers();
+static void begin_drawing();
+static void end_drawing();
bool init_opengl()
{
bool init_opengl()
{
@@
-45,6
+48,9
@@
bool init_opengl()
gfx_cull_face = cull_face;
gfx_reshape = reshape;
gfx_wireframe = wireframe;
gfx_cull_face = cull_face;
gfx_reshape = reshape;
gfx_wireframe = wireframe;
+ gfx_swapbuffers = swapbuffers;
+ gfx_begin_drawing = begin_drawing;
+ gfx_end_drawing = end_drawing;
// glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
return true;
// glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
return true;
@@
-101,3
+107,16
@@
static void wireframe(bool enabled)
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
+
+static void swapbuffers()
+{
+ glfwSwapBuffers(win);
+}
+
+static void begin_drawing()
+{
+}
+
+static void end_drawing()
+{
+}