10 Features Features::from_api_version(GraphicsApi api, const Version &ver)
13 features.target_api = api;
14 features.glsl_version = ver;
18 features.arb_enhanced_layouts = (ver>=Version(4, 40));
19 features.arb_explicit_attrib_location = (ver>=Version(1, 30));
20 features.arb_explicit_uniform_location = (ver>=Version(4, 30));
21 features.arb_gpu_shader5 = (ver>=Version(4, 0));
22 features.arb_separate_shader_objects = (ver>=Version(4, 10));
23 features.arb_uniform_buffer_object = (ver>=Version(1, 50));
24 features.ext_gpu_shader4 = (ver>=Version(1, 20));
25 features.ext_texture_array = (ver>=Version(1, 30));
26 features.uniform_binding_range = (ver>=Version(4, 30) ? 84 : ver>=Version(4, 0) ? 60 :
27 ver>=Version(3, 30) ? 36 : 24);
28 features.texture_binding_range = (ver>=Version(4, 30) ? 96 : ver>=Version(4, 0) ? 80 :
29 ver>=Version(1, 50) ? 48 : ver>=Version(1, 40) ? 32 : 16);
32 features.arb_enhanced_layouts = (ver>=Version(3, 20));
33 features.arb_explicit_attrib_location = (ver>=Version(3, 0));
34 features.arb_explicit_uniform_location = (ver>=Version(3, 10));
35 features.arb_gpu_shader5 = (ver>=Version(3, 20));
36 features.arb_separate_shader_objects = (ver>=Version(3, 10));
37 features.arb_uniform_buffer_object = (ver>=Version(3, 0));
38 features.ext_gpu_shader4 = (ver>=Version(3, 0));
39 features.ext_texture_array = (ver>=Version(3, 0));
40 features.uniform_binding_range = (ver>=Version(3, 20) ? 72 : ver>=Version(3, 10) ? 36 : 24);
41 features.texture_binding_range = (ver>=Version(3, 20) ? 96 : ver>=Version(3, 10) ? 48 :
42 ver>=Version(3, 0) ? 32 : 8);
45 features.uniform_binding_range = 72;
46 features.texture_binding_range = 96;
49 throw invalid_argument("Features::from_api_version");
54 Features Features::latest(GraphicsApi api)
59 return from_api_version(api, Version(4, 60));
61 return from_api_version(api, Version(3, 20));
63 return from_api_version(api, Version(1, 2));
65 throw invalid_argument("Features::latest");