blob: 3d8098237edd90714365383b744e3e8cb2748252 [file] [log] [blame]
John Kessenichc0275792013-08-09 17:14:49 +00001#version 150 core
2
John Kesseniche7c59c12013-10-16 22:28:35 +00003in fromVertex {
4 vec3 color;
5} fromV;
6
7out toFragment {
8 vec3 color;
9} toF;
10
11out fromVertex { // okay to reuse a block name for another block name
12 vec3 color;
13};
14
15out fooB {
16 vec2 color;
17} fromVertex; // ERROR, cannot reuse block name as block instance
18
19int fromVertex; // ERROR, cannot reuse a block name for something else
20
21out fooC {
22 vec2 color;
23} fooC; // ERROR, cannot have same name for block and instance name
24
John Kessenichc0275792013-08-09 17:14:49 +000025void main()
26{
27 EmitVertex();
28 EndPrimitive();
29 EmitStreamVertex(1); // ERROR
30 EndStreamPrimitive(0); // ERROR
John Kesseniche7c59c12013-10-16 22:28:35 +000031
32 color = fromV.color;
33 gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
34 gl_Position = gl_in[0].gl_Position;
35 gl_PointSize = gl_in[3].gl_PointSize;
36 gl_PrimitiveID = gl_PrimitiveIDIn;
37 gl_Layer = 2;
John Kessenichc0275792013-08-09 17:14:49 +000038}