OLD | NEW |
(Empty) | |
| 1 |
| 2 /* |
| 3 ** Copyright (c) 2012 The Khronos Group Inc. |
| 4 ** |
| 5 ** Permission is hereby granted, free of charge, to any person obtaining a |
| 6 ** copy of this software and/or associated documentation files (the |
| 7 ** "Materials"), to deal in the Materials without restriction, including |
| 8 ** without limitation the rights to use, copy, modify, merge, publish, |
| 9 ** distribute, sublicense, and/or sell copies of the Materials, and to |
| 10 ** permit persons to whom the Materials are furnished to do so, subject to |
| 11 ** the following conditions: |
| 12 ** |
| 13 ** The above copyright notice and this permission notice shall be included |
| 14 ** in all copies or substantial portions of the Materials. |
| 15 ** |
| 16 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 19 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 20 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 21 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 22 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 23 */ |
| 24 |
| 25 |
| 26 struct s { |
| 27 float f; |
| 28 } s1 = s(1.0); |
| 29 |
| 30 struct s3 { |
| 31 int i; |
| 32 } s3Inst; |
| 33 |
| 34 struct s2 { |
| 35 float f; |
| 36 s3 s3Inst; |
| 37 } s2Inst = s2(1.0, s3(1)); |
| 38 |
| 39 void main() |
| 40 { |
| 41 vec3 i = vec3(5.0, 4.0, ivec2(2.0, 1.0)); |
| 42 ivec4 v2 = ivec4(1.0); |
| 43 vec4 v4 = vec4(v2); |
| 44 bvec4 v5 = bvec4(v2); |
| 45 vec3 v6 = vec3(v5); |
| 46 vec3 v = vec3(2, 2.0, 1); |
| 47 vec3 v1 = vec3(1.2, v); |
| 48 |
| 49 mat3 m1 = mat3(v,v,v); |
| 50 mat2 m2 = mat2(v, v6.x); |
| 51 |
| 52 gl_Position = vec4(1.0); |
| 53 } |
| 54 |
OLD | NEW |