mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fix FBO's
This commit is contained in:
parent
0fe9e0587a
commit
d6f18b2915
@ -237,21 +237,36 @@ make_output(const string &name,
|
||||
flags, gsg, host);
|
||||
}
|
||||
|
||||
// // Second thing to try: a glGraphicsBuffer
|
||||
//
|
||||
// if (retry == 1) {
|
||||
// if ((!support_render_texture)||
|
||||
// ((flags&BF_require_parasite)!=0)||
|
||||
// ((flags&BF_require_window)!=0)) {
|
||||
// return NULL;
|
||||
// }
|
||||
// if (precertify) {
|
||||
// if (!osxgsg->_supports_framebuffer_object) {
|
||||
// return NULL;
|
||||
// }
|
||||
// }
|
||||
// return new glGraphicsBuffer(this, name, fb_prop, win_prop, flags, gsg, host);
|
||||
// }
|
||||
// Second thing to try: a glGraphicsBuffer
|
||||
|
||||
if (retry == 1) {
|
||||
if ((host==0)||
|
||||
((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_require_window)!=0)) {
|
||||
return NULL;
|
||||
}
|
||||
// Early failure - if we are sure that this buffer WONT
|
||||
// meet specs, we can bail out early.
|
||||
if ((flags & BF_fb_props_optional)==0) {
|
||||
if ((fb_prop.get_indexed_color() > 0)||
|
||||
(fb_prop.get_back_buffers() > 0)||
|
||||
(fb_prop.get_accum_bits() > 0)||
|
||||
(fb_prop.get_multisamples() > 0)) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
// Early success - if we are sure that this buffer WILL
|
||||
// meet specs, we can precertify it.
|
||||
if ((osxgsg != 0) &&
|
||||
(osxgsg->is_valid()) &&
|
||||
(!osxgsg->needs_reset()) &&
|
||||
(osxgsg->_supports_framebuffer_object) &&
|
||||
(osxgsg->_glDrawBuffers != 0)&&
|
||||
(fb_prop.is_basic())) {
|
||||
precertify = true;
|
||||
}
|
||||
return new GLGraphicsBuffer(engine, this, name, fb_prop, win_prop, flags, gsg, host);
|
||||
}
|
||||
|
||||
// Third thing to try: an osxGraphicsBuffer
|
||||
/*
|
||||
@ -264,7 +279,7 @@ make_output(const string &name,
|
||||
((flags&BF_can_bind_every)!=0)) {
|
||||
return NULL;
|
||||
}
|
||||
return new osxGraphicsBuffer(this, name, fb_prop, win_prop,
|
||||
return new osxGraphicsBuffer(engine, this, name, fb_prop, win_prop,
|
||||
flags, gsg, host);
|
||||
}
|
||||
*/
|
||||
|
@ -156,8 +156,7 @@ make_output(const string &name,
|
||||
// Second thing to try: a GLGraphicsBuffer
|
||||
|
||||
if (retry == 1) {
|
||||
if ((!support_rtt)||
|
||||
(!gl_support_fbo)||
|
||||
if ((!gl_support_fbo)||
|
||||
(host==0)||
|
||||
((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_require_window)!=0)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user