if( (at->purpose != k_framebuffer_attachment_type_texture) &&
(at->purpose != k_framebuffer_attachment_type_texture_depth) )
{
- vg_fatal_exit_loop( "illegal operation: bind non-texture framebuffer"
+ vg_fatal_error( "illegal operation: bind non-texture framebuffer"
" attachment to texture slot" );
}
vg_error( " status: Generic Error" );
vg_info( "}\n" );
- vg_fatal_exit_loop( "Incomplete framebuffer (see logs)" );
+ vg_fatal_error( "Incomplete framebuffer (see logs)" );
}
}
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_STATIC void async_render_init( void *payload, u32 size )
{
- vg_info( "[render] Allocate quad\n" );
+ /*
+ * Complete Framebuffers
+ */
+ for( int i=0; i<vg_list_size(framebuffers); i++ ){
+ struct framebuffer *fb = &framebuffers[i];
+ render_fb_allocate( fb );
+ }
float quad[] = {
0.00f,0.00f, 1.00f,1.00f, 0.00f,1.00f,
glEnableVertexAttribArray( 0 );
VG_CHECK_GL_ERR();
+
+ glBindFramebuffer( GL_FRAMEBUFFER, 0 );
+ gpipeline.ready = 1;
}
VG_STATIC void render_init(void)
shader_blitblur_register();
shader_blitcolour_register();
- vg_acquire_thread_sync();
- {
- /*
- * Complete Framebuffers
- */
- for( int i=0; i<vg_list_size(framebuffers); i++ ){
- struct framebuffer *fb = &framebuffers[i];
- render_fb_allocate( fb );
- }
-
- render_init_fs_quad();
-
- glBindFramebuffer( GL_FRAMEBUFFER, 0 );
- gpipeline.ready = 1;
- }
-
- vg_release_thread_sync();
+ vg_async_item *call = vg_async_alloc(0);
+ vg_async_dispatch( call, async_render_init );
}
/*