GLSL Error #132 Syntax error: “gl_position” parse error

只愿长相守 提交于 2019-12-05 08:25:26

There are some reasons why the gl_PerVertex structure must be redeclared in your shader sources. For example, when using separable shader programs GL_ARB_separate_shader_objects, you must redeclare the gl_PerVertex blocks (and they must match for all shaders attached in a pipeline). I am unsure why in this case you would be required to redeclare (seems to work on my driver), it may be that the Java layer is utilizing some extension that requires its usage. Redeclaring the structure will likely solve your issue. At the top of your vertex shader put:

out gl_PerVertex { vec4 gl_Position; };
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!