GLES3.0中文API-glGetFragDataLocation

名称

glGetFragDataLocation —查询颜色数字与用户定义的可变变量的绑定

C Specification
GLint glGetFragDataLocation( GLuint program,
const char * name);

参数

program
包含变量的程序名称,变量绑定到查询

name
用户定义的变型变量的名称,该变量绑定到查询

描述

glGetFragDataLocation retrieves the assigned color number binding for the user-defined varying out variable name for program program. program must have previously been linked. name must be a null-terminated string. If name is not the name of an active user-defined varying out fragment shader variable within program, -1 will be returned.

注意

In OpenGL ES Shading Language version 3.00, output variables must be explicitly bound to fragment colors within the shader text. This query simply returns that binding information.

错误

GL_INVALID_OPERATION is generated if program is not the name of a program object.

API 支持版本

函数名 2.0 3.0 3.1 3.2
glGetFragDataLocation -

另见

glCreateProgram,

版权

https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetFragDataLocation.xhtml
Copyright © 2010-2015 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

发布了215 篇原创文章 · 获赞 0 · 访问量 903

猜你喜欢

转载自blog.csdn.net/MSK1111/article/details/103334500
今日推荐