mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
restrict setting render to texture
This commit is contained in:
parent
beee323924
commit
6474496071
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user