#ifndef SHADER_VARS_H #define SHADER_VARS_H #include "shader.h" namespace shader { namespace compile { extern struct vin { static const gluvar vertex; static const gluvar normal; static const gluvar color; static const gluvar secondary_color; static const gluvar tex_coord[8]; static const gluvar fog_coord; } vin; extern struct vout { // glstate builtin static const gluvar position; static const gluvar point_size; static const gluvar clip_vertex; // standard varying static const gluvar front_color; static const gluvar back_color; static const gluvar front_secondary_color; static const gluvar back_secondary_color; static const gluvar tex_coord[8]; static const gluvar fog_frag_coord; } vout; extern struct fin { // glstate builtin static const gluvar frag_coord; static const gluvar front_facing; // standard varying static const gluvar color; static const gluvar secondary_color; static const gluvar tex_coord[8]; static const gluvar fog_frag_coord; } fin; extern struct fout { // glstate builtin static const gluvar frag_color; static const gluvar frag_depth; static const gluvar frag_data[2]; } fout; // predefined globals extern gluvar model_view_matrix, projection_matrix, model_view_projection_matrix, texture_matrix[8]; extern gluvar model_view_matrix_inverse, projection_matrix_inverse, model_view_projection_matrix_inverse, texture_matrix_inverse[8]; extern gluvar model_view_matrix_transpose, projection_matrix_transpose, model_view_projection_matrix_transpose, texture_matrix_transpose[8]; extern gluvar model_view_matrix_inverse_transpose, projection_matrix_inverse_transpose, model_view_projection_matrix_inverse_transpose, texture_matrix_inverse_transpose[8]; extern gluvar normal_matrix; extern gluvar normal_scale; extern gluvar depth_range_near, depth_range_far, depth_range_diff; extern gluvar clip_plane[2];//TODO // point parameters TODO extern gluvar front_material_emission, front_material_ambient, front_material_diffuse, front_material_specular, front_material_shininess; extern gluvar back_material_emission, back_material_ambient, back_material_diffuse, back_material_specular, back_material_shininess; // light source parameters TODO extern gluvar light_model_ambient; extern gluvar front_light_model_product_scene_color; extern gluvar back_light_model_product_scene_color; // light products TODO // texture env and gen TODO // fogparameters TODO // shader output are in vout and fout } } #endif