Ignore:
Timestamp:
08/08/14 13:18:41 (11 years ago)
Author:
epyon
Message:
  • program is now handle-based
  • all device constructs are now handle-based and do not dynamically allocate
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/keyframed_mesh.cc

    r302 r303  
    9898
    9999
    100 void nv::keyframed_mesh::update( program* a_program )
    101 {
    102         a_program->set_opt_uniform( "nv_interpolate", m_interpolation );
     100void nv::keyframed_mesh::update( program a_program )
     101{
     102        m_context->get_device()->set_opt_uniform( a_program, "nv_interpolate", m_interpolation );
    103103}
    104104
     
    165165}
    166166
    167 void nv::keyframed_mesh_gpu::update( program* a_program )
     167void nv::keyframed_mesh_gpu::update( program a_program )
    168168{
    169169        if ( m_loc_next_position == -1 )
    170170        {
    171                 m_loc_next_position = a_program->get_attribute( "nv_next_position" )->get_location();
    172                 m_loc_next_normal   = a_program->get_attribute( "nv_next_normal" )->get_location();
     171                device* dev = m_context->get_device();
     172                m_loc_next_position = dev->get_attribute_location( a_program, "nv_next_position" );
     173                m_loc_next_normal   = dev->get_attribute_location( a_program, "nv_next_normal" );
    173174                if ( m_has_tangent )
    174                         m_loc_next_tangent  = a_program->get_attribute( "nv_next_tangent" )->get_location();
    175 
    176                 device* dev = m_context->get_device();
     175                        m_loc_next_tangent  = dev->get_attribute_location( a_program, "nv_next_tangent" );
     176
    177177                dev->add_vertex_buffer( m_va, (slot)m_loc_next_position, m_pbuffer, FLOAT, 3, 0, m_vsize, false );
    178178                dev->add_vertex_buffer( m_va, (slot)m_loc_next_normal,   m_pbuffer, FLOAT, 3, sizeof( vec3 ), m_vsize, false );
Note: See TracChangeset for help on using the changeset viewer.