Add all built-in variables for all versions/profiles/stages of GLSL. Also, made more readable; declarations are cut and paste from the specs, with quotes around them. This does not include built-in constants yet (other than MaxClipDistances), just the non-constants.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23551 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
457145ded5
commit
e7c59c187c
25 changed files with 1564 additions and 1024 deletions
|
|
@ -1,9 +1,38 @@
|
|||
#version 150 core
|
||||
|
||||
in fromVertex {
|
||||
vec3 color;
|
||||
} fromV;
|
||||
|
||||
out toFragment {
|
||||
vec3 color;
|
||||
} toF;
|
||||
|
||||
out fromVertex { // okay to reuse a block name for another block name
|
||||
vec3 color;
|
||||
};
|
||||
|
||||
out fooB {
|
||||
vec2 color;
|
||||
} fromVertex; // ERROR, cannot reuse block name as block instance
|
||||
|
||||
int fromVertex; // ERROR, cannot reuse a block name for something else
|
||||
|
||||
out fooC {
|
||||
vec2 color;
|
||||
} fooC; // ERROR, cannot have same name for block and instance name
|
||||
|
||||
void main()
|
||||
{
|
||||
EmitVertex();
|
||||
EndPrimitive();
|
||||
EmitStreamVertex(1); // ERROR
|
||||
EndStreamPrimitive(0); // ERROR
|
||||
|
||||
color = fromV.color;
|
||||
gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
|
||||
gl_Position = gl_in[0].gl_Position;
|
||||
gl_PointSize = gl_in[3].gl_PointSize;
|
||||
gl_PrimitiveID = gl_PrimitiveIDIn;
|
||||
gl_Layer = 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue