#include "vg/vg_log.h"
#include "vg/vg_opt.h"
#include "vg/vg_build.h"
+#include "vg/vg_build_utils_shader.h"
/*
* c build.c --release --clang
compiled_something = 1;
}
+void build_shaders(void);
void build_game( enum compiler compiler )
{
+ static int shaders_built = 0;
+ if( !shaders_built )
+ {
+ shaders_built = 1;
+ build_shaders();
+ }
+
vg_build_start( "skaterift", compiler );
vg_build_object( "skaterift.c " );
vg_build_add_link_for_graphics();
}
}
}
+
+#define _S( NAME, VS, FS ) \
+ vg_build_shader( "shaders/" VS, "shaders/" FS, NULL, "shaders", NAME )
+
+void build_shaders(void)
+{
+ vg_shader_set_include_dir( "shaders" );
+
+ /* Scene */
+ _S( "scene_standard", "scene.vs", "scene_standard.fs" );
+ _S( "scene_standard_alphatest", "scene.vs", "scene_standard_alphatest.fs" );
+ _S( "scene_vertex_blend", "scene.vs", "scene_vertex_blend.fs" );
+ _S( "scene_terrain", "scene.vs", "scene_terrain.fs" );
+ _S( "scene_route", "scene.vs", "scene_route.fs" );
+ _S( "scene_depth", "scene.vs", "scene_depth.fs" );
+ _S( "scene_water", "scene.vs", "scene_water.fs" );
+ _S( "scene_water_fast", "scene.vs", "scene_water_fast.fs" );
+
+ /* Models */
+ _S( "model_sky", "model.vs", "model_sky.fs" );
+ _S( "model_menu", "model.vs", "model_menu.fs" );
+ _S( "model_character_view", "model_skinned.vs", "model_character_view.fs" );
+ _S( "model_gate", "model_gate.vs", "model_gate_lq.fs" );
+
+ /* 2D */
+ _S( "blit", "blit.vs", "blit.fs" );
+ _S( "blitblur", "blit.vs", "blitblur.fs" );
+ _S( "blitcolour","blit.vs", "colour.fs" );
+ _S( "routeui", "routeui.vs", "routeui.fs" );
+
+#if 0
+ // 3D Standard
+ _S( "scoretext", "shaders/scoretext.vs", "shaders/vblend.fs" );
+#endif
+}