John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 1 | #version 150 core
|
| 2 |
|
John Kessenich | e7c59c1 | 2013-10-16 22:28:35 +0000 | [diff] [blame] | 3 | in fromVertex {
|
| 4 | vec3 color;
|
| 5 | } fromV;
|
| 6 |
|
| 7 | out toFragment {
|
| 8 | vec3 color;
|
| 9 | } toF;
|
| 10 |
|
| 11 | out fromVertex { // okay to reuse a block name for another block name
|
| 12 | vec3 color;
|
| 13 | };
|
| 14 |
|
| 15 | out fooB {
|
| 16 | vec2 color;
|
| 17 | } fromVertex; // ERROR, cannot reuse block name as block instance
|
| 18 |
|
| 19 | int fromVertex; // ERROR, cannot reuse a block name for something else
|
| 20 |
|
| 21 | out fooC {
|
| 22 | vec2 color;
|
| 23 | } fooC; // ERROR, cannot have same name for block and instance name
|
| 24 |
|
John Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 25 | void main()
|
| 26 | {
|
| 27 | EmitVertex();
|
| 28 | EndPrimitive();
|
| 29 | EmitStreamVertex(1); // ERROR
|
| 30 | EndStreamPrimitive(0); // ERROR
|
John Kessenich | e7c59c1 | 2013-10-16 22:28:35 +0000 | [diff] [blame] | 31 |
|
| 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 Kessenich | c027579 | 2013-08-09 17:14:49 +0000 | [diff] [blame] | 38 | }
|