mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
gl-force-invalid
This commit is contained in:
parent
866b1e19c0
commit
95a59a664c
@ -55,3 +55,6 @@ init_libwgldisplay() {
|
||||
|
||||
int gl_force_pixfmt = config_wgldisplay.GetInt("gl-force-pixfmt", 0);
|
||||
|
||||
// Set this true to force all GL windows to fail to open correctly.
|
||||
bool gl_force_invalid = config_wgldisplay.GetBool("gl-force-invalid", false);
|
||||
|
||||
|
@ -27,5 +27,6 @@ NotifyCategoryDecl(wgldisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
|
||||
extern EXPCL_PANDAGL void init_libwgldisplay();
|
||||
|
||||
extern int gl_force_pixfmt;
|
||||
extern bool gl_force_invalid;
|
||||
|
||||
#endif
|
||||
|
@ -180,12 +180,14 @@ open_window() {
|
||||
// Initializes _colormap
|
||||
setup_colormap();
|
||||
|
||||
/*
|
||||
wgldisplay_cat.error()
|
||||
<< "Artificially failing window.\n";
|
||||
close_window();
|
||||
return false;
|
||||
*/
|
||||
#ifndef NDEBUG
|
||||
if (gl_force_invalid) {
|
||||
wgldisplay_cat.error()
|
||||
<< "Artificially failing window.\n";
|
||||
close_window();
|
||||
return false;
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user