diff --git a/panda/src/display/config_display.cxx b/panda/src/display/config_display.cxx index f894f59b1a..ad96b0dc82 100644 --- a/panda/src/display/config_display.cxx +++ b/panda/src/display/config_display.cxx @@ -291,6 +291,9 @@ ConfigVariableInt stencil_bits ConfigVariableInt multisamples ("multisamples", 0, PRC_DESC("The minimum number of samples requested.")); +ConfigVariableInt back_buffers +("back-buffers", 1, + PRC_DESC("The default number of back buffers requested.")); ConfigVariableDouble background_color ("background-color", "0.41 0.41 0.41", diff --git a/panda/src/display/config_display.h b/panda/src/display/config_display.h index 777749a083..53dd702401 100644 --- a/panda/src/display/config_display.h +++ b/panda/src/display/config_display.h @@ -86,6 +86,7 @@ extern EXPCL_PANDA_DISPLAY ConfigVariableInt color_bits; extern EXPCL_PANDA_DISPLAY ConfigVariableInt alpha_bits; extern EXPCL_PANDA_DISPLAY ConfigVariableInt stencil_bits; extern EXPCL_PANDA_DISPLAY ConfigVariableInt multisamples; +extern EXPCL_PANDA_DISPLAY ConfigVariableInt back_buffers; extern EXPCL_PANDA_DISPLAY ConfigVariableDouble background_color; extern EXPCL_PANDA_DISPLAY ConfigVariableBool sync_video; diff --git a/panda/src/display/frameBufferProperties.cxx b/panda/src/display/frameBufferProperties.cxx index 1228d133e3..b29ff95723 100644 --- a/panda/src/display/frameBufferProperties.cxx +++ b/panda/src/display/frameBufferProperties.cxx @@ -70,7 +70,7 @@ subsumes(const FrameBufferProperties &other) const { //////////////////////////////////////////////////////////////////// const FrameBufferProperties &FrameBufferProperties:: get_default() { - static bool default_ready = false; + static bool default_ready = false; static FrameBufferProperties default_props; if (default_ready) { @@ -78,7 +78,7 @@ get_default() { } default_props.set_rgb_color(1); - default_props.set_back_buffers(1); + default_props.set_back_buffers(back_buffers); int num_words = framebuffer_mode.get_num_words(); if (num_words > 0) {