可以在任何时候attach一个shader到program对象

Posted 人最大的荣耀不在于从未失败,而在于每次失败以后都能东山再起

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了可以在任何时候attach一个shader到program对象相关的知识,希望对你有一定的参考价值。

?

可以在任何时候attach一个shader到program对象,不一定非要在指定source和编译以后,具体的描述如下:

Once you have a program object created, the next step is to attach shaders to it. In OpenGL ES 3.0, each program object needs to have one vertex shader and one fragment shader object attached to it. To attach shaders to a program, you use glAttachShader.

void glAttachShader(GLuint program, GLuint shader)

program handle to the program object

shader handle to the shader object to attach to the program

?

This function attaches the shader to the given program. Note that a shader can be attached at any point—it does not necessarily need to be compiled or even have source code before being attached to a program. The only requirement is that every program object must have one and only one vertex shader and fragment shader object attached to it. In addition to attaching shaders, you can detach shaders using glDetachShader.

以上是关于可以在任何时候attach一个shader到program对象的主要内容,如果未能解决你的问题,请参考以下文章

一个类,在任何时候都可以向它查询“你已经创建了多少个对象!

在任何时候,都不要忽略备份数据的重要性?

开启所有PHP错误!无论在任何时候

《Pro SQL Server Internals》部分翻译(P155-165)

课下作业03-1请写一个类,在任何时候都可以向它查询“你已经创建了多少个对象?

请写一个java类,在任何时候都可以向它查询“你已经创建了多少个对象?”