summaryrefslogtreecommitdiff
path: root/tests/OffscreenView.cc
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2011-11-01 18:29:29 (GMT)
committerBrad Pitcher <bradpitcher@gmail.com>2011-11-01 18:29:29 (GMT)
commit0eacddfd8148f14ee0ddfe2eb66b82774c88afbe (patch)
tree6982ea59564090ea858d12d86d3699e83887f1f9 /tests/OffscreenView.cc
parentea7e4988d44249946b620d5973b230cf1a0606ca (diff)
parente2caf3726d68ff1fef63113519049abffc0563af (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