John Kessenich | ab41fe5 | 2013-10-24 01:25:40 +0000 | [diff] [blame] | 1 | #version 330 compatibility |
John Kessenich | ef8ae2e | 2013-02-27 19:02:52 +0000 | [diff] [blame] | 2 | |
| 3 | in vec4 inVar; |
| 4 | out vec4 outVar; |
| 5 | |
| 6 | varying vec4 varyingVar; |
| 7 | |
| 8 | void main() |
| 9 | { |
John Kessenich | 5134b9c | 2013-11-20 21:12:43 +0000 | [diff] [blame] | 10 | gl_FragColor = varyingVar; // link ERROR: user output was used |
| 11 | gl_FragData[1] = inVar; // link ERROR: user output was used |
John Kessenich | c2ff770 | 2013-04-25 16:44:03 +0000 | [diff] [blame] | 12 | int buffer = 4; |
John Kessenich | ef8ae2e | 2013-02-27 19:02:52 +0000 | [diff] [blame] | 13 | } |
John Kessenich | ab41fe5 | 2013-10-24 01:25:40 +0000 | [diff] [blame] | 14 | |
| 15 | #extension GL_ARB_separate_shader_objects : enable |
| 16 | |
| 17 | in gl_PerFragment { |
| 18 | vec4 gl_Color; |
| 19 | }; |
| 20 | |
| 21 | void foo() |
| 22 | { |
| 23 | vec4 c = gl_Color; |
John Kessenich | 5134b9c | 2013-11-20 21:12:43 +0000 | [diff] [blame] | 24 | outVar = inVar; |
John Kessenich | ab41fe5 | 2013-10-24 01:25:40 +0000 | [diff] [blame] | 25 | } |