#ifndef SHADER_VARS_H #define SHADER_VARS_H #include "shader.h" namespace shader { extern struct vin { // for setting static varying_3f vertex_3f; static varying_4f vertex_4f; static varying_3f normal_3f; static varying_3f color_3f; static varying_4f color_4f; static varying_3f secondary_color_3f; static varying_4f secondary_color_4f; static varying_1f tex_coord_1f[8]; static varying_2f tex_coord_2f[8]; static varying_3f tex_coord_3f[8]; static varying_4f tex_coord_4f[8]; // for the vertex shader 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 struct gl { static gluvar model_view_matrix, projection_matrix, model_view_projection_matrix, texture_matrix[8]; static gluvar model_view_matrix_inverse, projection_matrix_inverse, model_view_projection_matrix_inverse, texture_matrix_inverse[8]; static gluvar model_view_matrix_transpose, projection_matrix_transpose, model_view_projection_matrix_transpose, texture_matrix_transpose[8]; static gluvar model_view_matrix_inverse_transpose, projection_matrix_inverse_transpose, model_view_projection_matrix_inverse_transpose, texture_matrix_inverse_transpose[8]; static gluvar normal_matrix; static gluvar normal_scale; static gluvar depth_range_near, depth_range_far, depth_range_diff; static gluvar clip_plane[2];//TODO // point parameters TODO static gluvar front_material_emission, front_material_ambient, front_material_diffuse, front_material_specular, front_material_shininess; static gluvar back_material_emission, back_material_ambient, back_material_diffuse, back_material_specular, back_material_shininess; // light source parameters TODO static gluvar light_model_ambient; static gluvar front_light_model_product_scene_color; static gluvar back_light_model_product_scene_color; // light products TODO // texture env and gen TODO // fogparameters TODO // shader output are in vout and fout } gl; } #endif