opengl - 使用 glsl 'attribute' 和 'in' 有什么区别?

标签 opengl glsl

写法有什么区别

in vec3 position;

attribute vec3 position;

在 glsl 着色器中?

最佳答案

attributevariing 自 glsl 1.3 起已弃用,并在 glsl 1.4 中删除:

这里是 glsl 1.4 specs 的摘录(1.2.6 与版本 1.2 的功能差异摘要):

The following is a summary of features deprecated in version 1.3:

  • Use of the keywords attribute and varying (use in and out).

关于opengl - 使用 glsl 'attribute' 和 'in' 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15683694/

相关文章:

c++ - 像素在自行初始化时移动,但不在循环中移动?

c++ - 由于非 Ascii 字符,顶点着色器无法编译?

opengl - OpenGL 中的动画

java - 如何绘制一组水平线?

java - OpenGL VAO 多个 VBO 绑定(bind)问题

opengl - 创建阴影体积时如何在 GLSL 中转换背面顶点

opengl - 如何在shader中制作波浪扭曲效果?

c++ - 点 Sprite Alpha 混合问题

c++ - 在 GLSL 中使相机正常

c - 模拟绘画应用的笔触