Ignore:
Timestamp:
08/21/14 04:02:01 (11 years ago)
Author:
epyon
Message:
  • created core module and moved all free source files there
  • took the opportunity to update all copyright lines and minor cleanup
  • minor fixes
  • not all examples are up to date
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/md3_test/md3_test.cc

    r304 r319  
    1 #include <nv/common.hh>
     1#include <nv/core/common.hh>
    22#include <iomanip>
    33#include <nv/gfx/keyframed_mesh.hh>
    4 #include <nv/interface/vertex_buffer.hh>
    54#include <nv/gl/gl_device.hh>
    65#include <nv/gfx/image.hh>
     
    109#include <nv/io/c_file_system.hh>
    1110#include <nv/formats/md3_loader.hh>
    12 #include <nv/profiler.hh>
    13 #include <nv/logging.hh>
    14 #include <nv/logger.hh>
    15 #include <nv/math.hh>
    16 #include <nv/time.hh>
    17 #include <nv/string.hh>
     11#include <nv/core/profiler.hh>
     12#include <nv/core/logging.hh>
     13#include <nv/core/logger.hh>
     14#include <nv/core/math.hh>
     15#include <nv/core/time.hh>
     16#include <nv/core/string.hh>
    1817#include <glm/gtx/rotate_vector.hpp>
    1918#include <glm/gtc/matrix_access.hpp>
     
    6867        void update( nv::uint32 ms, nv::program program )
    6968        {
    70                 m_mesh->update( ms );
    7169                m_mesh->update_animation( m_entry, ms );
    7270                m_mesh->update( program );
     
    206204
    207205                        m_scene_state.set_model( model );
    208                         m_window->get_context()->draw( m_render_state, m_scene_state, m_program, m_legs->get_mesh() );
     206                        m_window->get_context()->draw( nv::TRIANGLES, m_render_state, m_scene_state, m_program, m_legs->get_mesh()->get_vertex_array(), m_legs->get_mesh()->get_index_count() );
    209207
    210208                        //model = m_legs->get_transform( "tag_torso", last_legs_frame, legs_frame, legs_interpolate );
    211209                        model = m_legs->get_transform( 0 );
    212210                        m_scene_state.set_model( model );
    213                         m_window->get_context()->draw( m_render_state, m_scene_state, m_program, m_torso->get_mesh() );
     211                        m_window->get_context()->draw( nv::TRIANGLES, m_render_state, m_scene_state, m_program, m_torso->get_mesh()->get_vertex_array(), m_torso->get_mesh()->get_index_count() );
    214212
    215213                        glm::mat4 head = model * m_torso->get_transform( 0 ); //, last_torso_frame, torso_frame, torso_interpolate );
    216214                        m_scene_state.set_model( head );
    217                         m_window->get_context()->draw( m_render_state, m_scene_state, m_program, m_head->get_mesh() );
     215                        m_window->get_context()->draw( nv::TRIANGLES, m_render_state, m_scene_state, m_program, m_head->get_mesh()->get_vertex_array(), m_head->get_mesh()->get_index_count() );
    218216
    219217                        glm::mat4 weapon = model * m_torso->get_transform( 2 ); //, last_torso_frame, torso_frame, torso_interpolate );
    220218                        m_scene_state.set_model( weapon );
    221219                        m_context->bind( m_diffuse_weapon, nv::TEX_DIFFUSE );
    222                         m_context->draw( m_render_state, m_scene_state, m_program, m_weapon->get_mesh() );
     220                        m_context->draw( nv::TRIANGLES, m_render_state, m_scene_state, m_program, m_weapon->get_mesh()->get_vertex_array(), m_weapon->get_mesh()->get_index_count() );
    223221
    224222                }
Note: See TracChangeset for help on using the changeset viewer.