我可以仅在OpenGL中重绘场景的一部分吗? [英] Can I redraw only part of a scene in OpenGL?

查看:237
本文介绍了我可以仅在OpenGL中重绘场景的一部分吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由许多物体组成的场景.大多数对象是静态的,但有些对象是移动的.发生移动时,似乎必须重新绘制整个场景.我可以表达某种场景的合成,而只重绘场景的某些部分吗?

I have a scene composed of many objects. Most of the objects are static, but some objects move. When a move happens it seems like I have to redraw the whole scene. It is possible for me to express some kind of compositing of the scene and redraw only some of the components of the scene?

推荐答案

将静态零件渲染到FBO,根据需要将其渲染到帧缓冲区中,并在顶部渲染动态对象.

Render the static parts to a FBO, blit that as needed to the framebuffer, and render dynamic objects on top.

这篇关于我可以仅在OpenGL中重绘场景的一部分吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆