Browse Source

back-buffers

David Rose 18 years ago
parent
commit
d4c6ef6ea9

+ 3 - 0
panda/src/display/config_display.cxx

@@ -291,6 +291,9 @@ ConfigVariableInt stencil_bits
 ConfigVariableInt multisamples
 ConfigVariableInt multisamples
 ("multisamples", 0,
 ("multisamples", 0,
  PRC_DESC("The minimum number of samples requested."));
  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
 ConfigVariableDouble background_color
 ("background-color", "0.41 0.41 0.41",
 ("background-color", "0.41 0.41 0.41",

+ 1 - 0
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 alpha_bits;
 extern EXPCL_PANDA_DISPLAY ConfigVariableInt stencil_bits;
 extern EXPCL_PANDA_DISPLAY ConfigVariableInt stencil_bits;
 extern EXPCL_PANDA_DISPLAY ConfigVariableInt multisamples;
 extern EXPCL_PANDA_DISPLAY ConfigVariableInt multisamples;
+extern EXPCL_PANDA_DISPLAY ConfigVariableInt back_buffers;
 
 
 extern EXPCL_PANDA_DISPLAY ConfigVariableDouble background_color;
 extern EXPCL_PANDA_DISPLAY ConfigVariableDouble background_color;
 extern EXPCL_PANDA_DISPLAY ConfigVariableBool sync_video;
 extern EXPCL_PANDA_DISPLAY ConfigVariableBool sync_video;

+ 2 - 2
panda/src/display/frameBufferProperties.cxx

@@ -70,7 +70,7 @@ subsumes(const FrameBufferProperties &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 const FrameBufferProperties &FrameBufferProperties::
 const FrameBufferProperties &FrameBufferProperties::
 get_default() {
 get_default() {
-  static bool                  default_ready = false;
+  static bool default_ready = false;
   static FrameBufferProperties default_props;
   static FrameBufferProperties default_props;
 
 
   if (default_ready) {
   if (default_ready) {
@@ -78,7 +78,7 @@ get_default() {
   }
   }
 
 
   default_props.set_rgb_color(1);
   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();
   int num_words = framebuffer_mode.get_num_words();
   if (num_words > 0) {
   if (num_words > 0) {