为什么OpenGL中没有圆形或椭圆形图元? [英] Why is there no circle or ellipse primitive in OpenGL?

查看:67
本文介绍了为什么OpenGL中没有圆形或椭圆形图元?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

圆形是基本的几何实体之一.但是,在 OpenGL 中没有为此定义的图元,例如直线或多边形.为什么这样?一直为此包含自定义标头有点烦人!

Circles are one of the basics geometric entities. Yet there is no primitives defined in OpenGL for this, like lines or polygons. Why so? It's a little annoying to include custom headers for this all the time!

有什么具体理由忽略它吗?

Any specific reason to omit it?

推荐答案

虽然圆形可能是基本形状,但在栅格化方面却不如点,线或三角形那么基本.第一批具有3D加速度的图形卡被设计为可以很好地完成一件事情,即对三角形(以及线和点进行栅格化,因为添加起来很简单).添加任何更复杂的形状会使该卡变得更加昂贵,而仅添加很少的功能.

While circles may be basic shapes they aren't as basic as points, lines or triangles when it comes to rasterisation. The first graphic cards with 3D acceleration were designed to do one thing very well, rasterise triangles (and lines and points because they were trivial to add). Adding any more complex shapes would have made the card a lot more expensive while adding only little functionality.

但是还有另一个原因不包括圆形/椭圆形.他们没有连接.您不能用它们构建3D模型,也不能在不添加间隙或重叠零件的情况下将三角形连接到它们.因此,要使圆有用,还需要其他形状(例如曲线)和其他更高级的曲面(例如NURBS).单独的圆形仅可用作大点",也可以使用四边形和圆形纹理或三角形来完成.

But there's another reason for not including circles/ellipses. They don't connect. You can't build a 3D model out of them and you can't connect triangles to them without adding gaps or overlapping parts. So for circles to be useful you also need other shapes like curves and other more advanced surfaces (e.g. NURBS). Circles alone are only useful as "big points" which can also be done with a quad and a circle shaped texture, or triangles.

如果您对圆使用自定义页眉",则应注意,它们可能会创建形成圆"的三角形模型.

If you are using "custom headers" for circles you should be aware that those probably create a triangle model that form your "circles".

这篇关于为什么OpenGL中没有圆形或椭圆形图元?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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