mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
support window-type offscreen better
This commit is contained in:
parent
babf0163e5
commit
ba30db6953
@ -4926,7 +4926,7 @@ set_read_buffer(int rbtype) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
GLP(ReadBuffer)(GL_FRONT_AND_BACK);
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +282,8 @@ open_buffer() {
|
|||||||
// So always use a single-buffered gsg.
|
// So always use a single-buffered gsg.
|
||||||
|
|
||||||
_fb_properties.set_back_buffers(0);
|
_fb_properties.set_back_buffers(0);
|
||||||
|
_draw_buffer_type = RenderBuffer::T_front;
|
||||||
|
_screenshot_buffer_type = RenderBuffer::T_front;
|
||||||
|
|
||||||
// GSG creation/initialization.
|
// GSG creation/initialization.
|
||||||
|
|
||||||
|
@ -189,19 +189,27 @@ make_output(const string &name,
|
|||||||
// Third thing to try: a wglGraphicsBuffer
|
// Third thing to try: a wglGraphicsBuffer
|
||||||
|
|
||||||
if (retry == 2) {
|
if (retry == 2) {
|
||||||
if ((!support_rtt)||
|
if (((flags&BF_require_parasite)!=0)||
|
||||||
((flags&BF_require_parasite)!=0)||
|
((flags&BF_require_window)!=0)) {
|
||||||
((flags&BF_require_window)!=0)||
|
|
||||||
((flags&BF_rtt_cumulative)!=0)||
|
|
||||||
((flags&BF_can_bind_every)!=0)) {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!support_rtt) {
|
||||||
|
if (((flags&BF_rtt_cumulative)!=0)||
|
||||||
|
((flags&BF_can_bind_every)!=0)) {
|
||||||
|
// If we require Render-to-Texture, but can't be sure we
|
||||||
|
// support it, bail.
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Early failure - if we are sure that this buffer WONT
|
// Early failure - if we are sure that this buffer WONT
|
||||||
// meet specs, we can bail out early.
|
// meet specs, we can bail out early.
|
||||||
if ((flags & BF_fb_props_optional) == 0) {
|
if ((flags & BF_fb_props_optional) == 0) {
|
||||||
if ((fb_prop.get_aux_rgba() > 0)||
|
if ((fb_prop.get_aux_rgba() > 0)||
|
||||||
(fb_prop.get_aux_rgba() > 0)||
|
(fb_prop.get_aux_rgba() > 0)||
|
||||||
(fb_prop.get_aux_float() > 0)) {
|
(fb_prop.get_aux_float() > 0)) {
|
||||||
|
cerr << "b\n";
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,8 +221,10 @@ make_output(const string &name,
|
|||||||
(wglgsg->pfnum_supports_pbuffer()) &&
|
(wglgsg->pfnum_supports_pbuffer()) &&
|
||||||
(wglgsg->get_fb_properties().subsumes(fb_prop))&&
|
(wglgsg->get_fb_properties().subsumes(fb_prop))&&
|
||||||
(wglgsg->get_fb_properties().is_single_buffered())) {
|
(wglgsg->get_fb_properties().is_single_buffered())) {
|
||||||
|
cerr << "c\n";
|
||||||
precertify = true;
|
precertify = true;
|
||||||
}
|
}
|
||||||
|
cerr << "d\n";
|
||||||
return new wglGraphicsBuffer(engine, this, name, fb_prop, win_prop,
|
return new wglGraphicsBuffer(engine, this, name, fb_prop, win_prop,
|
||||||
flags, gsg, host);
|
flags, gsg, host);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user