Browse Source

osx-support-gl-buffer

David Rose 15 years ago
parent
commit
674099f5c1

+ 7 - 0
panda/src/osxdisplay/config_osxdisplay.cxx

@@ -37,6 +37,13 @@ ConfigVariableBool show_resize_box
           "window would completely hide any resize control drawn by the "
           "window would completely hide any resize control drawn by the "
           "OS.  Set this variable false to allow this control to be hidden."));
           "OS.  Set this variable false to allow this control to be hidden."));
 
 
+ConfigVariableBool osx_support_gl_buffer
+("osx-support-gl-buffer", false,
+ PRC_DESC("Set this true to support use of GLBuffers on OSX.  This is false by "
+          "default because there appear to be some prevalent driver issues with GLBuffers "
+          "that cause program crashes.  Offscreen buffers can still be created as "
+          "AGLPbuffers, if supported by the driver."));
+
 ConfigVariableBool osx_disable_event_loop
 ConfigVariableBool osx_disable_event_loop
 ("osx-disable-event-loop", false,
 ("osx-disable-event-loop", false,
  PRC_DESC("Set this true to disable the window event loop for the Panda "
  PRC_DESC("Set this true to disable the window event loop for the Panda "

+ 1 - 0
panda/src/osxdisplay/config_osxdisplay.h

@@ -22,6 +22,7 @@ NotifyCategoryDecl( osxdisplay , EXPCL_PANDAGL, EXPTP_PANDAGL);
 extern EXPCL_PANDAGL void init_libosxdisplay();
 extern EXPCL_PANDAGL void init_libosxdisplay();
 
 
 extern ConfigVariableBool show_resize_box;
 extern ConfigVariableBool show_resize_box;
+extern ConfigVariableBool osx_support_gl_buffer;
 extern ConfigVariableBool osx_disable_event_loop;
 extern ConfigVariableBool osx_disable_event_loop;
 extern ConfigVariableInt osx_mouse_wheel_scale;
 extern ConfigVariableInt osx_mouse_wheel_scale;
 
 

+ 3 - 0
panda/src/osxdisplay/osxGraphicsPipe.cxx

@@ -256,6 +256,9 @@ make_output(const string &name,
   // Second thing to try: a glGraphicsBuffer
   // Second thing to try: a glGraphicsBuffer
   
   
   if (retry == 1) {
   if (retry == 1) {
+    if (!osx_support_gl_buffer) {
+      return NULL;
+    }
     if ((host==0)||
     if ((host==0)||
         ((flags&BF_require_parasite)!=0)||
         ((flags&BF_require_parasite)!=0)||
         ((flags&BF_require_window)!=0)) {
         ((flags&BF_require_window)!=0)) {