projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ran astyle, added delete scene
[demo]
/
src
/
opengl
/
opengl.cc
diff --git
a/src/opengl/opengl.cc
b/src/opengl/opengl.cc
index
f05ea61
..
46363f4
100644
(file)
--- a/
src/opengl/opengl.cc
+++ b/
src/opengl/opengl.cc
@@
-2,9
+2,11
@@
#include <stdio.h>
#include "opengl/opengl.h"
#include <stdio.h>
#include "opengl/opengl.h"
-#include "common-ui.h"
extern GLFWwindow *win;
extern GLFWwindow *win;
+extern int win_h;
+extern int win_w;
+
bool init_opengl()
{
if(!glfwInit()) {
bool init_opengl()
{
if(!glfwInit()) {
@@
-22,6
+24,10
@@
bool init_opengl()
glfwMakeContextCurrent(win);
glewInit();
glfwMakeContextCurrent(win);
glewInit();
+
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+
return true;
}
return true;
}
@@
-31,10
+37,4
@@
void cleanup_opengl()
glfwDestroyWindow(win);
}
glfwTerminate();
glfwDestroyWindow(win);
}
glfwTerminate();
-}
-
-void display_opengl()
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glClearColor(0.5, 0.5, 0.5, 1.0);
}
\ No newline at end of file
}
\ No newline at end of file