mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
force-parasite-buffer
This commit is contained in:
parent
e0a7f0fed7
commit
6829badc7e
@ -125,6 +125,17 @@ ConfigVariableBool prefer_parasite_buffer
|
||||
"cause problems if the user subsequently resizes the window "
|
||||
"smaller than the buffer."));
|
||||
|
||||
ConfigVariableBool force_parasite_buffer
|
||||
("force-parasite-buffer", false,
|
||||
PRC_DESC("Set this true to make GraphicsOutput::make_texture_buffer() really "
|
||||
"strongly prefer ParasiteBuffers over conventional offscreen buffers. "
|
||||
"With this set, it will create a ParasiteBuffer every time an offscreen "
|
||||
"buffer is requested, even if this means reducing the buffer size to fit "
|
||||
"within the window. The only exceptions are for buffers that, by their "
|
||||
"nature, really cannot use ParasiteBuffers (like depth textures). You might "
|
||||
"set this true if you don't trust your graphics driver's support for "
|
||||
"offscreen buffers."));
|
||||
|
||||
ConfigVariableBool prefer_single_buffer
|
||||
("prefer-single-buffer", true,
|
||||
PRC_DESC("Set this true to make GraphicsOutput::make_render_texture() first "
|
||||
|
@ -47,6 +47,7 @@ extern EXPCL_PANDA_DISPLAY ConfigVariableString screenshot_extension;
|
||||
|
||||
extern EXPCL_PANDA_DISPLAY ConfigVariableBool prefer_texture_buffer;
|
||||
extern EXPCL_PANDA_DISPLAY ConfigVariableBool prefer_parasite_buffer;
|
||||
extern EXPCL_PANDA_DISPLAY ConfigVariableBool force_parasite_buffer;
|
||||
extern EXPCL_PANDA_DISPLAY ConfigVariableBool prefer_single_buffer;
|
||||
|
||||
extern EXPCL_PANDA_DISPLAY ConfigVariableInt max_texture_stages;
|
||||
|
@ -365,6 +365,17 @@ make_output(GraphicsPipe *pipe,
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// If force-parasite-buffer is set, we create a parasite buffer even
|
||||
// if it's less than ideal. You might set this if you really don't
|
||||
// trust your graphics driver's support for offscreen buffers.
|
||||
if (force_parasite_buffer && can_use_parasite) {
|
||||
ParasiteBuffer *buffer = new ParasiteBuffer(host, name, x_size, y_size, flags);
|
||||
buffer->_sort = sort;
|
||||
do_add_window(buffer, threading_model);
|
||||
do_add_gsg(host->get_gsg(), pipe, threading_model);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Ask the pipe to create a window.
|
||||
|
||||
for (int retry=0; retry<10; retry++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user