Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1884 - in trunk: . Engine Engine/Display UserInterface


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1884 - in trunk: . Engine Engine/Display UserInterface
  • Date: Wed, 28 Nov 2007 16:34:58 -0700 (MST)

Author: boulos
Date: Wed Nov 28 16:34:56 2007
New Revision: 1884

Modified:
   trunk/CMakeLists.txt
   trunk/Engine/CMakeLists.txt
   trunk/Engine/Display/PureOpenGLDisplay.cc
   trunk/UserInterface/CMakeLists.txt
Log:
CMakeLists.txt
Engine/CMakeLists.txt
UserInterface/CMakeLists.txt

 Avoiding explicit linking aginst Core_XUtils unless MANTA_ENABLE_X11
 is true

Engine/Display/PureOpenGLDisplay.cc
 
 If we use the framework version of Apple's OpenGL the includes are
 different. Accounting for that here.


Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt        (original)
+++ trunk/CMakeLists.txt        Wed Nov 28 16:34:56 2007
@@ -102,10 +102,15 @@
   Manta_Model
   Manta_Image
   Manta_Interface
-  Manta_Core_XUtils
   Manta_Core
   About
   )
+
+IF(MANTA_ENABLE_X11)
+ SET(MANTA_TARGET_LINK_LIBRARIES 
+     ${MANTA_TARGET_LINK_LIBRARIES} 
+     Manta_Core_XUtils)
+ENDIF(MANTA_ENABLE_X11)
 
 SUBDIRS(
   Core

Modified: trunk/Engine/CMakeLists.txt
==============================================================================
--- trunk/Engine/CMakeLists.txt (original)
+++ trunk/Engine/CMakeLists.txt Wed Nov 28 16:34:56 2007
@@ -27,9 +27,12 @@
 TARGET_LINK_LIBRARIES(Manta_Engine Manta_Model
                                    Manta_Image
                                    Manta_Interface
-                                   Manta_Core_XUtils
                                    Manta_Core
                                    )
+
+IF(MANTA_ENABLE_X11)
+ TARGET_LINK_LIBRARIES(Manta_Engine Manta_Core_XUtils)
+ENDIF(MANTA_ENABLE_X11)
 
 TARGET_LINK_LIBRARIES(Manta_Engine ${OPENGL_LIBRARIES}
                                    ${X11_LIBRARIES}

Modified: trunk/Engine/Display/PureOpenGLDisplay.cc
==============================================================================
--- trunk/Engine/Display/PureOpenGLDisplay.cc   (original)
+++ trunk/Engine/Display/PureOpenGLDisplay.cc   Wed Nov 28 16:34:56 2007
@@ -37,9 +37,15 @@
 #include <Core/Exceptions/InternalError.h>
 #include <Core/Exceptions/IllegalArgument.h>
 
+#if  !defined(__APPLE__) || MANTA_ENABLE_X11
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <GL/glext.h>
+#else
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#include <OpenGL/glext.h>
+#endif
 
 #include <iostream>
 #include <typeinfo>
@@ -299,7 +305,7 @@
       have_pbo = true;
       if (verbose) cout << "Have GL pixel buffer object\n";
     }
-      
+
 
   // We don't want depth to be taken into consideration
   glDisable(GL_DEPTH_TEST);
@@ -553,7 +559,7 @@
   } else {
     if (resize_buffer) {
       // Allocate more space for the buffer.
-    
+
       // Reset the contents of the texSize-sized buffer object
       glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo->texSize, NULL,
                       GL_STREAM_DRAW_ARB);
@@ -575,7 +581,7 @@
     // Unmap the texture image buffer
     glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB);
   }
-  
+
   // Now use the other pbo, but only if it has been initialized
   int prev_pbo = 1 - current_pbo;
   // Cycle to the next pbo
@@ -588,9 +594,9 @@
     }
   }
 
-  
+
   glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo->bufId);
-  
+
   // Bind the texture and supply the parameters
   glBindTexture(GL_TEXTURE_RECTANGLE_EXT, pbo->texId);
 
@@ -599,7 +605,7 @@
   glTexParameteri (GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, 
GL_NEAREST);
   glTexParameteri (GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, 
GL_NEAREST);
   glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-  
+
   glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
   glPixelStorei(GL_UNPACK_ROW_LENGTH, pbo->rowLength);
 
@@ -715,4 +721,4 @@
   }
 
   return true;
-}  
+}

Modified: trunk/UserInterface/CMakeLists.txt
==============================================================================
--- trunk/UserInterface/CMakeLists.txt  (original)
+++ trunk/UserInterface/CMakeLists.txt  Wed Nov 28 16:34:56 2007
@@ -23,5 +23,9 @@
 TARGET_LINK_LIBRARIES(Manta_UserInterface 
                       Manta_Engine 
                       Manta_Interface
-                      Manta_Core_XUtils 
                       Manta_Core)
+
+IF(MANTA_ENABLE_X11)
+  TARGET_LINK_LIBRARIES(Manta_UserInterface
+                        Manta_Core_XUtils)
+ENDIF(MANTA_ENABLE_X11)




  • [Manta] r1884 - in trunk: . Engine Engine/Display UserInterface, boulos, 11/28/2007

Archive powered by MHonArc 2.6.16.

Top of page