medfall

A super great game engine
Log | Files | Refs

commit 31a0be67772c682574bf832e4fa0e31ad9b97bda
parent eaf150fc52bf9b2e9ce15f59ca979a10f5c4cf86
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed, 29 May 2019 21:21:11 +0300

Comments

Diffstat:
Mgltf.cc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gltf.cc b/gltf.cc @@ -450,7 +450,7 @@ GAME_FRAME( game_frame ) { UniformBinding view_uniforms = renderer_uniforms( V, P, game->pos ); UniformBinding joints_uniforms = renderer_upload_uniforms( skinning_matrices, model.animation.num_joints * sizeof( Mat4 ), 16 ); - // render bones without the mesh attached to make sure transforms are correct + // draw skinned model { RenderState render_state; render_state.shader = get_shader( SHADER_SKINNED_FLAT_VERTEX_COLOURS ); @@ -477,6 +477,7 @@ GAME_FRAME( game_frame ) { immediate_render( render_state ); } + // draw skeleton // { // for( u32 i = 0; i < model.animation.num_joints; i++ ) { // v3 pos = ( sample_matrices[ i ] * v4( 0, 0, 0, 1 ) ).xyz();