Dirty fix for the bad context bug.
Instead of fixing it, we're trapping the error and disabling 3D.
This commit is contained in:
parent
5d48cdbca9
commit
01b2c8076f
|
@ -22,6 +22,7 @@
|
||||||
#ifdef GTKGLEXT_AVAILABLE
|
#ifdef GTKGLEXT_AVAILABLE
|
||||||
|
|
||||||
#include <gdk/gdkgl.h>
|
#include <gdk/gdkgl.h>
|
||||||
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
// Localization
|
// Localization
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
|
@ -127,13 +128,16 @@ examine_gl_config_attrib (GdkGLConfig *glconfig)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
begin_opengl_region_gdk_3d( void) {
|
begin_opengl_region_gdk_3d( void) {
|
||||||
|
bool failed = false;
|
||||||
|
|
||||||
if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
|
gdk_error_trap_push();
|
||||||
return false;
|
failed = !gdk_gl_drawable_gl_begin(gldrawable, glcontext);
|
||||||
}
|
gdk_flush();
|
||||||
|
failed = failed | gdk_error_trap_pop();
|
||||||
|
|
||||||
|
if (failed) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#ifdef GTKGLEXT_AVAILABLE
|
#ifdef GTKGLEXT_AVAILABLE
|
||||||
|
|
||||||
#include <gdk/gdkgl.h>
|
#include <gdk/gdkgl.h>
|
||||||
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../render3D.h"
|
#include "../render3D.h"
|
||||||
|
@ -126,10 +127,14 @@ examine_gl_config_attrib (GdkGLConfig *glconfig)
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_oglrender_beginOpenGL( void) {
|
_oglrender_beginOpenGL( void) {
|
||||||
|
int failed = 0;
|
||||||
|
|
||||||
if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
|
gdk_error_trap_push();
|
||||||
return 0;
|
failed = !gdk_gl_drawable_gl_begin(gldrawable, glcontext);
|
||||||
}
|
gdk_flush();
|
||||||
|
failed = failed | gdk_error_trap_pop();
|
||||||
|
|
||||||
|
if (failed) return 0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue