.bbx = {{ -0.5f, -0.25f, -0.25f }, { 0.5f, 0.25f, 0.25f }}
};
-teleport_gate gate_a = {
- .co = { 0.0f, -3.0f, -15.0f },
- .q = { 0.0f, 0.0f, 0.0f, 1.0f }
-},
-gate_b = {
- .co = { -8.0f, -3.0f, -17.0f },
- .q = { 0.0f, 0.0f, 0.0f, 1.0f }
-};
#endif
static int playermodel( int argc, char const *argv[] )
.persistent = 1
});
+ vg_convar_push( (struct vg_convar){
+ .name = "grid",
+ .data = &walk_grid_iterations,
+ .data_type = k_convar_dtype_i32,
+ .opt_i32 = { .min=0, .max=1, .clamp=0 },
+ .persistent = 1
+ });
+
+ vg_convar_push( (struct vg_convar){
+ .name = "walk_speed",
+ .data = &k_walkspeed,
+ .data_type = k_convar_dtype_f32,
+ .opt_f32 = { .clamp = 0 },
+ .persistent = 1
+ });
+
vg_convar_push( (struct vg_convar){
.name = "debugcam",
.data = &sv_debugcam,
glDisable( GL_DEPTH_TEST );
glClearColor( 0.11f, 0.35f, 0.37f, 1.0f );
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+ glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
float speed = freecam? 0.0f: v3_length( player.v );
v3f shake = { vg_randf()-0.5f, vg_randf()-0.5f, vg_randf()-0.5f };
m4x4f world_4x4;
m4x3_expand( player.camera_inverse, world_4x4 );
- gpipeline.fov = freecam? 60.0f: 120.0f;
+ gpipeline.fov = freecam? 60.0f: 120.0f; /* 120 */
m4x4_projection( vg_pv, gpipeline.fov,
(float)vg_window_x / (float)vg_window_y,
0.025f, 1000.0f );
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
render_water_surface( vg_pv );
-#if 0
vg_tex2d_bind( &tex_water, 1 );
- render_gate( &gate_a, cam_transform );
-#endif
+
+ for( int i=0; i<world.gate_count; i++ )
+ {
+ render_gate( &world.gates[i], player.camera );
+ }
/* Copy the RGB of what we have into the background buffer */