From deb83209cbf02ebbaf6fa9cd5ee177386d5c7471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Sat, 9 Jan 2016 15:32:43 +0100 Subject: [PATCH] =?UTF-8?q?OpenGL=20Haiku=20and=20Linux=C3=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/gl/gl1.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/gl/gl1.cpp b/ui/gl/gl1.cpp index d0bb95b..f2babfc 100644 --- a/ui/gl/gl1.cpp +++ b/ui/gl/gl1.cpp @@ -82,6 +82,10 @@ void GlPreviewer::DrawCube(unsigned short x, unsigned short y, unsigned short z, void GlPreviewer::Render(int width, int height, Geometry* geo, Material3D mat, float zoom, float rotation) { // USE OLD OPENGL 1 code + #ifndef __HAIKU__ + glClearColor(0.0,0.0,0.0,1.0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + #endif glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); @@ -100,7 +104,9 @@ void GlPreviewer::Render(int width, int height, Geometry* geo, Material3D mat, f glRotatef(rotation,0.0f,1.0f,0.0f); // Draw AXIS + #ifdef __HAIKU__ glClearColor(0.0,0.0,0.0,1.0); + #endif // glColor3f(1.0,0.0,0.0);