layout(shared)1layout(shared) 2 uniform GLUPStateBlock { 3 4 bool vertex_colors_enabled; 5 6 vec4 front_color; 7 vec4 back_color; 8 9 bool draw_mesh_enabled; 10 vec4 mesh_color; 11 float mesh_width; 12 13 bool lighting_enabled; 14 bool vertex_normals_enabled; 15 bool normal_mapping_enabled; 16 vec3 light_vector; 17 vec3 light_half_vector; 18 float specular; 19 20 bool texturing_enabled; 21 bool indirect_texturing_enabled; 22 int texture_mode; 23 int texture_type; 24 25 float cells_shrink; 26 27 bool picking_enabled; 28 int picking_mode; 29 int picking_id; 30 int base_picking_id; 31 32 bool clipping_enabled; 33 int clipping_mode; 34 vec4 clip_plane; 35 vec4 world_clip_plane; 36 vec4 clip_clip_plane; 37 38 bool alpha_discard_enabled; 39 float alpha_threshold; 40 41 mat4 modelviewprojection_matrix; 42 mat4 modelview_matrix; 43 mat4 projection_matrix; 44 mat3 normal_matrix; 45 mat4 texture_matrix; 46 mat4 inverse_modelviewprojection_matrix; 47 mat4 inverse_modelview_matrix; 48 mat4 inverse_projection_matrix; 49 vec4 viewport; 50 51 float point_size; 52 } GLUP; 53 54 // Note: the 1D colormap is stored in a 2D texture, because 55 // 1D textures are not supported by all OpenGL implementations 56 uniform sampler2D texture1Dsampler; 57 uniform sampler2D texture2Dsampler; 58 uniform sampler3D texture3Dsampler; 59