#ifndef SHADER_VARS_H #define SHADER_VARS_H #include "shader.h" namespace shader { extern struct vin { static varying_3f position_3f; static varying_4f position_4f; static varying_3f normal_3f; static varying_3f color_3f; static varying_4f color_4f; static varying_3f color2_3f; static varying_4f color2_4f; static varying_1f psize_1f; static varying_1f texcoord_1f[8]; static varying_2f texcoord_2f[8]; static varying_3f texcoord_3f[8]; static varying_4f texcoord_4f[8]; static glvar position; static glvar normal; } vin; extern struct vout { // glstate builtin static glvar position; static glvar point_size; static glvar clip_vertex; // standard varying static glvar front_color; static glvar back_color; static glvar front_secondary_color; static glvar back_secondary_color; static glvar texcoord[8]; static glvar fog_frag_coord; } vout; extern struct fin { // glstate builtin static glvar frag_coord; // standard varying static glvar color; static glvar secondary_color; static glvar texcoord[8]; static glvar fog_frag_coord; } fin; extern struct fout { // glstate builtin static glvar frag_color; static glvar frag_depth; static glvar frag_data[2]; } fout; // predefined globals extern struct gl { static uniform_matrix_4f model_view_matrix, projection_matrix, model_view_projection_matrix, texture_matrix[8]; static uniform_matrix_4f model_view_matrix_inverse, projection_matrix_inverse, model_view_projection_matrix_inverse, texture_matrix_inverse[8]; static uniform_matrix_4f model_view_matrix_transpose, projection_matrix_transpose, model_view_projection_matrix_transpose, texture_matrix_transpose[8]; static uniform_matrix_4f model_view_matrix_inverse_transpose, projection_matrix_inverse_transpose, model_view_projection_matrix_inverse_transpose, texture_matrix_inverse_transpose[8]; static uniform_matrix_3f normal_matrix; static uniform_1f normal_scale; static uniform_1f depth_range_near, depth_range_far, depth_range_diff; static uniform_4f clip_plane[2];//TODO // point parameters TODO static uniform_4f front_material_emission, front_material_ambient, front_material_diffuse, front_material_specular, front_material_shininess; static uniform_4f back_material_emission, back_material_ambient, back_material_diffuse, back_material_specular, back_material_shininess; // light source parameters TODO static uniform_4f light_model_ambient; static uniform_4f front_light_model_product_scene_color; static uniform_4f 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