mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
glx-support-pbuffer, glx-support-pixmap
This commit is contained in:
parent
e1ea2aa3de
commit
b0470a17be
@ -78,6 +78,21 @@ ConfigVariableInt x_wheel_right_button
|
||||
"mouse button number does the system report when one scrolls "
|
||||
"to the right?"));
|
||||
|
||||
ConfigVariableBool glx_support_pbuffer
|
||||
("glx-support-pbuffer", false,
|
||||
PRC_DESC("Set this true to enable the use of X pbuffer-based offscreen "
|
||||
"buffers, if available. This is usually preferred over "
|
||||
"pixmap-based buffers, but not all drivers support them."));
|
||||
|
||||
ConfigVariableBool glx_support_pixmap
|
||||
("glx-support-pixmap", false,
|
||||
PRC_DESC("Set this true to enable the use of X pixmap-based offscreen "
|
||||
"buffers. This is false by default because pixmap-based buffers "
|
||||
"are usually slower than pbuffer-based buffers, and because at "
|
||||
"least one driver is known to crash (crash!) when it attempts "
|
||||
"to create a pixmap-based buffer."));
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libglxdisplay
|
||||
// Description: Initializes the library. This must be called at
|
||||
|
@ -35,4 +35,7 @@ extern ConfigVariableInt x_wheel_down_button;
|
||||
extern ConfigVariableInt x_wheel_left_button;
|
||||
extern ConfigVariableInt x_wheel_right_button;
|
||||
|
||||
extern ConfigVariableBool glx_support_pbuffer;
|
||||
extern ConfigVariableBool glx_support_pixmap;
|
||||
|
||||
#endif /* __CONFIG_GLXDISPLAY_H__ */
|
||||
|
@ -278,6 +278,10 @@ make_output(const string &name,
|
||||
// Third thing to try: a glxGraphicsBuffer
|
||||
|
||||
if (retry == 2) {
|
||||
if (!glx_support_pbuffer) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_require_window)!=0)||
|
||||
((flags&BF_resizeable)!=0)||
|
||||
@ -301,6 +305,10 @@ make_output(const string &name,
|
||||
|
||||
// Third thing to try: a glxGraphicsPixmap.
|
||||
if (retry == 3) {
|
||||
if (!glx_support_pixmap) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_require_window)!=0)||
|
||||
((flags&BF_resizeable)!=0)||
|
||||
|
Loading…
x
Reference in New Issue
Block a user