Ignore:
Timestamp:
05/17/14 02:35:19 (11 years ago)
Author:
epyon
Message:
  • massive update of mesh handling
  • universal mesh handling routines
  • removed a lot of legacy code
  • significantly streamlined MD5 loading
  • all tests updated to new features
File:
1 edited

Legend:

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

    r236 r239  
    3737        {
    3838        public:
    39                 keyframed_mesh( context* a_context, mesh_data_old* a_data );
    40                 virtual size_t get_index_count() const { return m_data->get_index_count(); }
     39                keyframed_mesh( context* a_context, mesh_data* a_data, tag_map* a_tag_map );
     40                virtual size_t get_index_count() const { return m_index_count; }
    4141                virtual void run_animation( animation_entry* a_anim );
    4242                size_t get_max_frames() const;
     
    4848                virtual ~keyframed_mesh();
    4949        protected:
    50                 mesh_data_old* m_data;
     50                struct vertex_pn
     51                {
     52                        vec3 position;
     53                        vec3 normal;
     54                };
     55
     56                mesh_data* m_mesh_data;
     57                tag_map*   m_tag_map;
    5158
    5259                uint32 m_start_frame;
     
    5966                bool   m_looping;
    6067                bool   m_active;
     68
     69                uint32 m_index_count;
     70                uint32 m_frame_count;
     71                uint32 m_vertex_count;
    6172        };
    6273
     
    6576        {
    6677        public:
    67                 keyframed_mesh_gpu( context* a_context, mesh_data_old* a_data, program* a_program );
     78                keyframed_mesh_gpu( context* a_context, mesh_data* a_data, tag_map* a_tag_map, program* a_program );
    6879                void update( uint32 ms );
    6980        private:
     
    7889        {
    7990        public:
    80                 keyframed_mesh_cpu( context* a_context, mesh_data_old* a_data );
     91                keyframed_mesh_cpu( context* a_context, mesh_data* a_data, tag_map* a_tag_map );
    8192                void update( uint32 ms );
    8293        private:
    83                 std::vector<vec3> m_position;
    84                 std::vector<vec3> m_normal;
    85                 vertex_buffer* m_vb_position;
    86                 vertex_buffer* m_vb_normal;
     94                std::vector<vertex_pn> m_vertex;
     95                vertex_buffer*         m_vb;
    8796        };
    8897
Note: See TracChangeset for help on using the changeset viewer.