X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=render.h;h=7b5b473739f7ec6c6b01083bd3448f6e73d43697;hb=aa4c26eae2208872824e0eb5b71bc05c16d43242;hp=374cc06a0343590958e271bb0dea9c6d3bd92ff2;hpb=191bf91146eb7e3ac15fb18de6e7267d1cd686af;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/render.h b/render.h index 374cc06..7b5b473 100644 --- a/render.h +++ b/render.h @@ -8,8 +8,12 @@ #include "shaders/blit.h" #include "shaders/blitblur.h" +#include "shaders/blitcolour.h" + +#if 0 #include "shaders/standard.h" #include "shaders/vblend.h" +#endif VG_STATIC void render_water_texture( camera *cam ); VG_STATIC void render_water_surface( camera *cam ); @@ -50,6 +54,9 @@ VG_STATIC struct pipeline int g_light_count; int g_light_preview; int g_shadow_samples; + + v4f g_point_light_positions[32]; + v4f g_point_light_colours[32]; } ub_world_lighting; @@ -592,6 +599,7 @@ VG_STATIC void render_fb_resize(void) } VG_STATIC int render_framebuffer_control( int argc, char const *argv[] ); +VG_STATIC void render_framebuffer_poll( int argc, char const *argv[] ); VG_STATIC void render_init_fs_quad(void) { vg_info( "[render] Allocate quad\n" ); @@ -631,7 +639,8 @@ VG_STATIC void render_init_fs_quad(void) vg_function_push( (struct vg_cmd) { .name = "fb", - .function = render_framebuffer_control + .function = render_framebuffer_control, + .poll_suggest = render_framebuffer_poll }); glGenVertexArrays( 1, &gpipeline.fsquad.vao ); @@ -666,8 +675,7 @@ VG_STATIC void render_init(void) { shader_blit_register(); shader_blitblur_register(); - shader_standard_register(); - shader_vblend_register(); + shader_blitcolour_register(); vg_acquire_thread_sync(); { @@ -832,4 +840,54 @@ VG_STATIC int render_framebuffer_control( int argc, char const *argv[] ) return 0; } +VG_STATIC void render_framebuffer_poll( int argc, char const *argv[] ) +{ + const char *term = argv[argc-1]; + + if( argc == 1 ) + { + console_suggest_score_text( "show", term, 0 ); + console_suggest_score_text( "hide", term, 0 ); + } + else if( argc == 2 ) + { + console_suggest_score_text( "all", term, 0 ); + + for( int i=0; idisplay_name, term, 0 ); + } + } + else if( argc == 3 ) + { + int modify_all = 0; + + if( !strcmp( argv[1], "all" ) ) + modify_all = 1; + + for( int i=0; iattachments); j++ ) + { + struct framebuffer_attachment *at = &fb->attachments[j]; + + if( at->purpose == k_framebuffer_attachment_type_none ) + continue; + + if( modify_all ) + { + console_suggest_score_text( at->display_name, term, 0 ); + } + else if( !strcmp( fb->display_name, argv[1] ) ) + { + console_suggest_score_text( at->display_name, term, 0 ); + } + } + } + } +} + #endif /* RENDER_H */