From 6474496071581035a2d21b5b527082f63b9c67e6 Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Tue, 21 Mar 2006 20:47:57 +0000 Subject: [PATCH] restrict setting render to texture --- panda/src/display/graphicsOutput.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/display/graphicsOutput.cxx b/panda/src/display/graphicsOutput.cxx index 421fa85d71..ab4d618aec 100644 --- a/panda/src/display/graphicsOutput.cxx +++ b/panda/src/display/graphicsOutput.cxx @@ -242,7 +242,6 @@ add_render_texture(Texture *tex, RenderTextureMode mode) { tex->clear_ram_image(); } tex->set_match_framebuffer_format(true); - tex->set_render_to_texture (true); // Go ahead and tell the texture our anticipated size, even if it // might be inaccurate (particularly if this is a GraphicsWindow, @@ -253,6 +252,11 @@ add_render_texture(Texture *tex, RenderTextureMode mode) { if ((mode == RTM_bind_or_copy)&&(support_render_texture==0)) { mode = RTM_copy_texture; } + else { + if (_gsg -> get_supports_render_texture ( )) { + tex->set_render_to_texture (true); + } + } RenderTexture result; result._texture = tex;