Changeset 303 for trunk/src/gfx
- Timestamp:
- 08/08/14 13:18:41 (11 years ago)
- Location:
- trunk/src/gfx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gfx/debug_draw.cc
r302 r303 29 29 30 30 nv::debug_data::debug_data( device* a_device ) 31 : m_device( a_device ), m_program( nullptr), m_va()31 : m_device( a_device ), m_program(), m_va() 32 32 { 33 33 m_program = m_device->create_program( nv_debug_draw_vertex_shader, nv_debug_draw_fragment_shader ); … … 76 76 { 77 77 m_device->release( m_va ); 78 delete m_program;78 m_device->release( m_program ); 79 79 } -
trunk/src/gfx/keyframed_mesh.cc
r302 r303 98 98 99 99 100 void nv::keyframed_mesh::update( program *a_program )101 { 102 a_program->set_opt_uniform("nv_interpolate", m_interpolation );100 void nv::keyframed_mesh::update( program a_program ) 101 { 102 m_context->get_device()->set_opt_uniform( a_program, "nv_interpolate", m_interpolation ); 103 103 } 104 104 … … 165 165 } 166 166 167 void nv::keyframed_mesh_gpu::update( program *a_program )167 void nv::keyframed_mesh_gpu::update( program a_program ) 168 168 { 169 169 if ( m_loc_next_position == -1 ) 170 170 { 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" ); 173 174 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 177 177 dev->add_vertex_buffer( m_va, (slot)m_loc_next_position, m_pbuffer, FLOAT, 3, 0, m_vsize, false ); 178 178 dev->add_vertex_buffer( m_va, (slot)m_loc_next_normal, m_pbuffer, FLOAT, 3, sizeof( vec3 ), m_vsize, false ); -
trunk/src/gfx/skeletal_mesh.cc
r302 r303 213 213 } 214 214 215 void nv::skeletal_mesh_gpu::update( program *a_program )215 void nv::skeletal_mesh_gpu::update( program a_program ) 216 216 { 217 217 if ( m_bone_data ) 218 a_program->set_opt_uniform_array("nv_m_bones", m_transform, m_bone_data->get_count() );218 m_context->get_device()->set_opt_uniform_array( a_program, "nv_m_bones", m_transform, m_bone_data->get_count() ); 219 219 } 220 220
Note: See TracChangeset
for help on using the changeset viewer.