From 1117e9a497a936986e2cb5fbd40111f05063a8b1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 17 Dec 2001 19:24:19 +0000 Subject: [PATCH] support wiregl --- panda/src/wgldisplay/config_wgldisplay.cxx | 4 ++++ panda/src/wgldisplay/config_wgldisplay.h | 1 + panda/src/wgldisplay/wglGraphicsWindow.cxx | 11 +++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/panda/src/wgldisplay/config_wgldisplay.cxx b/panda/src/wgldisplay/config_wgldisplay.cxx index 087aaf5d3a..5a99e79b21 100644 --- a/panda/src/wgldisplay/config_wgldisplay.cxx +++ b/panda/src/wgldisplay/config_wgldisplay.cxx @@ -40,6 +40,10 @@ int gl_forced_pixfmt=config_wgldisplay.GetInt("gl-force-pixfmt", 0); bool bResponsive_minimized_fullscreen_window = config_wgldisplay.GetBool("responsive-minimized-fullscreen-window",false); +// Set this true to not attempt to use any of the function calls that +// will crab out WireGL. +bool support_wiregl = config_wgldisplay.GetBool("support-wiregl", false); + extern void AtExitFn(void); //////////////////////////////////////////////////////////////////// diff --git a/panda/src/wgldisplay/config_wgldisplay.h b/panda/src/wgldisplay/config_wgldisplay.h index f354560594..a27049327c 100644 --- a/panda/src/wgldisplay/config_wgldisplay.h +++ b/panda/src/wgldisplay/config_wgldisplay.h @@ -36,6 +36,7 @@ extern float gl_fps_meter_update_interval; extern bool gl_sync_video; extern int gl_forced_pixfmt; extern bool bResponsive_minimized_fullscreen_window; +extern bool support_wiregl; extern EXPCL_PANDAGL void init_libwgldisplay(); diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index 54adf78415..d49d5e7e1b 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -567,10 +567,13 @@ void wglGraphicsWindow::config(void) { _extensions_str = tmpstr; - PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT; - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; - wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); - wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)wglGetProcAddress("wglGetExtensionsStringEXT"); + PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT = NULL; + PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = NULL; + + if (!support_wiregl) { + wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); + wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)wglGetProcAddress("wglGetExtensionsStringEXT"); + } if(wglGetExtensionsStringARB!=NULL) { _extensions_str += " ";