Changeset 251 for trunk


Ignore:
Timestamp:
06/12/14 11:07:08 (11 years ago)
Author:
epyon
Message:
  • const correctness (in-progress)
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/gfx/keyframed_mesh.hh

    r239 r251  
    4545                virtual void set_frame( uint32 frame );
    4646                virtual void update( uint32 ms );
    47                 virtual void update( program* a_program );
     47                virtual void update( program* a_program ) const;
    4848                virtual ~keyframed_mesh();
    4949        protected:
  • trunk/nv/interface/context.hh

    r232 r251  
    3939                explicit mesh_interface( vertex_array* array ) : m_va( array ) {}
    4040                virtual void update( uint32 ) {}
    41                 virtual void update( program* ) {}
     41                virtual void update( program* ) const {}
    4242                virtual nv::vertex_array* get_vertex_array() const { return m_va; }
    4343                virtual size_t get_index_count() const { return 0; }
    44                 virtual nv::primitive get_primitive_type() { return nv::TRIANGLES; }
     44                virtual nv::primitive get_primitive_type() const { return nv::TRIANGLES; }
    4545                virtual ~mesh_interface() {}
    4646        protected:
     
    6262                virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, size_t count ) = 0;
    6363
    64                 virtual void draw( const render_state& rs, program* p, mesh_interface* mesh )
     64                virtual void draw( const render_state& rs, program* p, const mesh_interface* mesh )
    6565                {
    6666                        draw( mesh->get_primitive_type(), rs, p, mesh->get_vertex_array(), mesh->get_index_count() );
    6767                }
    68                 virtual void draw( const render_state& rs, const scene_state& s, program* p, mesh_interface* mesh )
     68                virtual void draw( const render_state& rs, const scene_state& s, program* p, const mesh_interface* mesh )
    6969                {
    7070                        p->apply_engine_uniforms( this, &s );
  • trunk/src/gfx/keyframed_mesh.cc

    r241 r251  
    106106}
    107107
    108 void nv::keyframed_mesh::update( program* a_program )
     108void nv::keyframed_mesh::update( program* a_program ) const
    109109{
    110110        a_program->set_opt_uniform( "nv_interpolate", m_interpolation );
Note: See TracChangeset for help on using the changeset viewer.