mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
display: Prevent attempt to copy depth from non-depth framebuffer
Fixes case 1 of #1142
This commit is contained in:
parent
99a3188af2
commit
715d786813
@ -359,6 +359,12 @@ add_render_texture(Texture *tex, RenderTextureMode mode,
|
|||||||
// If we're still planning on binding, indicate it in texture properly.
|
// If we're still planning on binding, indicate it in texture properly.
|
||||||
tex->set_render_to_texture(true);
|
tex->set_render_to_texture(true);
|
||||||
}
|
}
|
||||||
|
else if ((plane == RTP_depth || plane == RTP_depth_stencil) && _fb_properties.get_depth_bits() == 0) {
|
||||||
|
// If we're not providing the depth buffer, we need something to copy from.
|
||||||
|
display_cat.error()
|
||||||
|
<< "add_render_texture: can't copy depth from framebuffer without depth bits!\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CDWriter cdata(_cycler, true);
|
CDWriter cdata(_cycler, true);
|
||||||
RenderTexture result;
|
RenderTexture result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user