Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1195 - trunk/Engine/Display


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1195 - trunk/Engine/Display
  • Date: Thu, 28 Sep 2006 17:19:30 -0600 (MDT)

Author: abe
Date: Thu Sep 28 17:19:30 2006
New Revision: 1195

Modified:
   trunk/Engine/Display/PureOpenGLDisplay.cc
   trunk/Engine/Display/PureOpenGLDisplay.h
Log:

Updated OpenGL defines so that they compile on systems without
pixel/vertex buffer objects (like the SGI Prism). 

Note the Intel 9.0 (20050430) compiler core dumps building much of the sse 
code
in Manta. The build without SSE works fine.

M    Engine/Display/PureOpenGLDisplay.cc
M    Engine/Display/PureOpenGLDisplay.h


Modified: trunk/Engine/Display/PureOpenGLDisplay.cc
==============================================================================
--- trunk/Engine/Display/PureOpenGLDisplay.cc   (original)
+++ trunk/Engine/Display/PureOpenGLDisplay.cc   Thu Sep 28 17:19:30 2006
@@ -165,6 +165,22 @@
 #    define GL_TEXTURE_RECTANGLE_EXT 0
 #  endif
 #endif
+
+// Pixel/Vertex Buffers are unavailable on some platforms, notably Prism.
+#ifndef GL_ARB_pixel_buffer_object
+#  define glGenBuffersARB( a, b )
+#  define glBindBufferARB( a, b )
+#  define glBufferDataARB( a, b, c, d )
+#  define glUnmapBufferARB( a ) 0
+#  define glBufferSubDataARB( a, b, c, d )
+#  define glMapBufferARB( a, b ) 0
+#  define GL_PIXEL_UNPACK_BUFFER_ARB 0
+#  define GL_STREAM_DRAW_ARB 0
+#  define GL_WRITE_ONLY_ARB 0
+// This define is used in conditionals.
+#  define GL_ARB_pixel_buffer_object 0
+#endif
+
 #ifndef GL_APPLE_client_storage
 #  define GL_APPLE_client_storage 0
 #endif

Modified: trunk/Engine/Display/PureOpenGLDisplay.h
==============================================================================
--- trunk/Engine/Display/PureOpenGLDisplay.h    (original)
+++ trunk/Engine/Display/PureOpenGLDisplay.h    Thu Sep 28 17:19:30 2006
@@ -34,12 +34,12 @@
 #include <GL/gl.h>
 //#include <GL/glext.h>
 
-#ifdef __APPLE__
-#ifndef GL_ARB_vertex_buffer_object
+// #ifdef __APPLE__
+#  ifndef GL_ARB_vertex_buffer_object
 typedef long GLintptrARB;
 typedef long GLsizeiptrARB;
-#endif
-#endif
+#  endif
+// #endif
 
 #include <sgi_stl_warnings_off.h>
 #include <string>





Archive powered by MHonArc 2.6.16.

Top of page