9 arb_enhanced_layouts(false),
10 arb_explicit_attrib_location(false),
11 arb_explicit_uniform_location(false),
12 arb_gpu_shader5(false),
13 arb_separate_shader_objects(false),
14 arb_uniform_buffer_object(false),
15 ext_gpu_shader4(false),
16 ext_texture_array(false),
17 constant_id_range(0x80000000U),
18 uniform_binding_range(84),
19 texture_binding_range(96)
22 Features Features::from_version(const Version &ver)
25 features.target_api = OPENGL;
26 features.glsl_version = ver;
27 features.arb_enhanced_layouts = (ver>=Version(4, 40));
28 features.arb_explicit_attrib_location = (ver>=Version(1, 30));
29 features.arb_explicit_uniform_location = (ver>=Version(4, 30));
30 features.arb_gpu_shader5 = (ver>=Version(4, 0));
31 features.arb_separate_shader_objects = (ver>=Version(4, 10));
32 features.arb_uniform_buffer_object = (ver>=Version(1, 50));
33 features.ext_gpu_shader4 = (ver>=Version(1, 20));
34 features.ext_texture_array = (ver>=Version(1, 30));
35 features.uniform_binding_range = (ver>=Version(4, 30) ? 84 : ver>=Version(4, 0) ? 60 :
36 ver>=Version(3, 30) ? 36 : 24);
37 features.texture_binding_range = (ver>=Version(4, 30) ? 96 : ver>=Version(4, 0) ? 80 :
38 ver>=Version(1, 50) ? 48 : ver>=Version(1, 40) ? 32 : 16);
42 Features Features::latest()
44 return from_version(Version(4, 60));