如何在 OpenGL 中使用多个视口? [英] How to use multiple viewports in OpenGL?

查看:37
本文介绍了如何在 OpenGL 中使用多个视口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在 OpenGL 中在两个不同的视口中显示相同的对象,例如,一个使用正交投影,另一个使用透视.为了做到这一点,我是否需要在每次调用 glViewport() 后再次绘制对象?

I need to show the same object in OpenGL in two different viewports, for instance, one using ortographic projection and the other using perspective. In order to do this, do I need to draw again the object after each call to glViewport()?

推荐答案

Nehe 有 一个很好的教程如何做到这一点,他的网站通常是一个很好的 OpenGL 问题资源.

Nehe has a good tutorial on how to do this, and his site is generally a good resource for OpenGL questions.

这篇关于如何在 OpenGL 中使用多个视口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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