SDL_AtomicUnlock( &vg.sl_status );
}
+#ifdef VG_CUSTOM_SHADERS
+void vg_auto_shader_register(void); /* created from codegen */
+#endif
+
static void _vg_load_full( void *data )
{
vg_preload();
vg_tex2d_replace_with_error_async( &vg.tex_missing );
+ vg_async_stall();
vg_ui.tex_bg = vg.tex_missing;
/* internal */
vg_loader_step( vg_profiler_init, NULL );
/* client */
+#ifdef VG_CUSTOM_SHADERS
+ vg_auto_shader_register();
+#endif
vg_load();
vg_async_call( async_internal_complete, NULL, 0 );
v2_zero( vg.mouse_wheel );
v2_zero( vg.mouse_delta );
- /* Update input */
- vg_process_inputs();
-
/* SDL event loop */
SDL_Event event;
while( SDL_PollEvent( &event ) ){
}
SDL_GetMouseState( &vg.mouse_pos[0], &vg.mouse_pos[1] );
+ vg_process_inputs();
}
static void _vg_gameloop_update(void)
bool vg_settings_apply_button( ui_rect inout_panel, bool validated )
{
ui_rect last_row;
- ui_px height = (vg_ui.font->glyph_height + 18) * k_ui_scale;
+ ui_px height = (vg_ui.font->sy + 18) * k_ui_scale;
ui_split( inout_panel, k_ui_axis_h, -height, k_ui_padding,
inout_panel, last_row );
ui_rect quit_button;
ui_split( title, k_ui_axis_v, title[2]-title[3], 2, title, quit_button );
- if( ui_button_text( quit_button, "X", 1 ) == 1 ){
+ if( ui_button_text( quit_button, "X", 1 ) == k_ui_button_click )
+ {
vg_settings_close();
return;
}
#include "vg_rigidbody.c"
#include "vg_rigidbody_view.c"
#include "vg_shader.c"
+
+#ifdef VG_CUSTOM_SHADERS
+ #include "shaders/impl.c"
+#endif