summaryrefslogtreecommitdiff
path: root/tests/OffscreenView.cc
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2011-11-01 17:15:35 (GMT)
committerBrad Pitcher <bradpitcher@gmail.com>2011-11-01 17:15:35 (GMT)
commite2caf3726d68ff1fef63113519049abffc0563af (patch)
tree6558c6f03ccc21e7138d23861f80e8d97b09e60e /tests/OffscreenView.cc
parent7541854212d6c1223e015faf55a6ca0657a1c184 (diff)
parentcb56f700b1b0f4ae589da62a5fd1d4e368deb604 (diff)
merge master
Diffstat (limited to 'tests/OffscreenView.cc')
-rw-r--r--tests/OffscreenView.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/OffscreenView.cc b/tests/OffscreenView.cc
index 447a78c..e34fbce 100644
--- a/tests/OffscreenView.cc
+++ b/tests/OffscreenView.cc
@@ -1,8 +1,11 @@
#include <GL/glew.h>
#include "OffscreenView.h"
#include <opencsg.h>
-#include "Renderer.h"
+#include "renderer.h"
#include <math.h>
+#include <stdio.h>
+#include <string.h>
+#include <cstdlib>
#define FAR_FAR_AWAY 100000.0
@@ -11,7 +14,8 @@ OffscreenView::OffscreenView(size_t width, size_t height)
object_rot(35, 0, 25), camera_eye(0, 0, 0), camera_center(0, 0, 0)
{
for (int i = 0; i < 10; i++) this->shaderinfo[i] = 0;
- this->ctx = create_offscreen_context(width, height);
+ this->ctx = create_offscreen_context(width, height);
+ if ( this->ctx == NULL ) throw -1;
initializeGL();
resizeGL(width, height);
}
@@ -182,7 +186,7 @@ void OffscreenView::paintGL()
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- glClearColor(1.0, 1.0, 0.92, 0.0);
+ glClearColor(1.0f, 1.0f, 0.92f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
contact: Jan Huwald // Impressum