glGenTextures( 1, &vg_dsp.view_texture );
glBindTexture( GL_TEXTURE_2D, vg_dsp.view_texture );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0,
GL_RGBA, GL_UNSIGNED_BYTE, vg_dsp.view_texture_buffer );
glGenTextures( 1, &vg_dsp.view_texture );
glBindTexture( GL_TEXTURE_2D, vg_dsp.view_texture );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0,
GL_RGBA, GL_UNSIGNED_BYTE, vg_dsp.view_texture_buffer );
- vg_tex2d_nearest();
- vg_release_thread_sync();
-
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+}
- /* temporary global design */
+static void vg_dsp_init( void )
+{
+ vg_dsp.buffer = vg_linear_alloc( vg_mem.rtmemory, 1024*1024*1 );
+ vg_dsp.view_texture_buffer = vg_linear_alloc( vg_mem.rtmemory, 512*512 );
total = reflection_time * var;
dsp_init_delay( &__echos[i], total / 1000.0f );
total = reflection_time * var;
dsp_init_delay( &__echos[i], total / 1000.0f );