OpenGL:弃用处理什么? [英] OpenGL: What's the deal with deprecation?

查看:103
本文介绍了OpenGL:弃用处理什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenGL 3.0和3.1已弃用了许多我认为必不可少的功能.特别是在着色器中使用固定功能.

OpenGL 3.0 and 3.1 have deprecated quite a few features I find essential. In particular, the use of fixed function in shaders.

有人能解释一下这到底是怎么回事吗?

Can anyone explain what's really the deal with that?

为什么他们认为有必要弃用这种显而易见的有用功能,而每个人显然都在使用它,而没有任何理智的硬件公司会删除对它的支持?

Why do they find the need to deprecate such useful feature that its obvious everybody uses and that no sane hardware company is going to remove support for?

推荐答案

正如您所说,没有硬件公司会删除对固定功能着色器的支持,因为已有许多使用它们的应用程序.但是,他们不想做的事情是弄清楚如何指定FF着色器与它们添加的每个将来扩展之间的交互.这些交互非常复杂(部分是因为FF着色器太复杂了),从而导致供应商之间的错误和不一致的实现-两者都对开发人员和最终用户不利.

As you said, no hardware company will remove support for fixed-function shaders, because there are so many existing applications that use them. What they don't want to do, though, is figure out how to specify the interactions between FF shaders and every future extension they add. Those interactions are very complicated (partly because FF shaders are so complicated), which leads to bugs and inconsistent implementations between vendors -- both of which are bad for developers and end users.

因此,他们正在画一条线:如果要使用FF着色器,则不会获得任何新功能.如果需要新功能,则不能使用FF着色器.这与Microsoft在D3D10中所做的非常相似:它添加了一大堆新功能,但同时完全删除了固定功能着色器.人们认为,需要新的非着色器功能但又不需要可编程着色器的开发人员非常少.

So they're drawing a line: if you want to use FF shaders, you don't get any of the new functionality. If you want new functionality, you can't use FF shaders. This is very similar to what Microsoft did in D3D10: it added a whole bunch of new functionality, but at the same time completely removed fixed-function shaders. The belief is that the set of developers who need the new non-shader functionality but who don't also need programmable shaders is very small.

这篇关于OpenGL:弃用处理什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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