diff --git a/panda/src/osxdisplay/config_osxdisplay.cxx b/panda/src/osxdisplay/config_osxdisplay.cxx index 52259b4c33..ebd5b33152 100644 --- a/panda/src/osxdisplay/config_osxdisplay.cxx +++ b/panda/src/osxdisplay/config_osxdisplay.cxx @@ -37,6 +37,13 @@ ConfigVariableBool show_resize_box "window would completely hide any resize control drawn by the " "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 ("osx-disable-event-loop", false, PRC_DESC("Set this true to disable the window event loop for the Panda " diff --git a/panda/src/osxdisplay/config_osxdisplay.h b/panda/src/osxdisplay/config_osxdisplay.h index b5ddea3543..5f2db7cd11 100644 --- a/panda/src/osxdisplay/config_osxdisplay.h +++ b/panda/src/osxdisplay/config_osxdisplay.h @@ -22,6 +22,7 @@ NotifyCategoryDecl( osxdisplay , EXPCL_PANDAGL, EXPTP_PANDAGL); extern EXPCL_PANDAGL void init_libosxdisplay(); extern ConfigVariableBool show_resize_box; +extern ConfigVariableBool osx_support_gl_buffer; extern ConfigVariableBool osx_disable_event_loop; extern ConfigVariableInt osx_mouse_wheel_scale; diff --git a/panda/src/osxdisplay/osxGraphicsPipe.cxx b/panda/src/osxdisplay/osxGraphicsPipe.cxx index df4183735c..94a8e413de 100644 --- a/panda/src/osxdisplay/osxGraphicsPipe.cxx +++ b/panda/src/osxdisplay/osxGraphicsPipe.cxx @@ -256,6 +256,9 @@ make_output(const string &name, // Second thing to try: a glGraphicsBuffer if (retry == 1) { + if (!osx_support_gl_buffer) { + return NULL; + } if ((host==0)|| ((flags&BF_require_parasite)!=0)|| ((flags&BF_require_window)!=0)) {