Changeset 111
- Timestamp:
- 06/09/13 15:21:23 (12 years ago)
- Location:
- trunk/nv
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/common.hh
r90 r111 193 193 if (p == 0) 194 194 { 195 NV_THROW( std::bad_cast , "dynamic_cast returned NULL");195 NV_THROW( std::bad_cast ); 196 196 } 197 197 -
trunk/nv/interface/clear_state.hh
r31 r111 27 27 bool alpha; 28 28 29 color_mask() : red( true ), blue( true ), green( true ), alpha( true ) {}29 color_mask() : red( true ), green( true ), blue( true ), alpha( true ) {} 30 30 color_mask( bool red, bool green, bool blue, bool alpha ) 31 31 : red( red ), green( green ), blue( blue ), alpha( alpha ) {} -
trunk/nv/interface/mesh.hh
r101 r111 107 107 vertex_attribute<T>* get_indices() 108 108 { 109 return m_indices->get_type() == type_to_enum<T>() ? ((vertex_attribute<T>*)(m_indices)) ;: nullptr;109 return m_indices->get_type() == type_to_enum<T>() ? ((vertex_attribute<T>*)(m_indices)) : nullptr; 110 110 } 111 111 -
trunk/nv/interface/program.hh
r73 r111 61 61 { 62 62 public: 63 type nameT value_type;63 typedef T value_type; 64 64 65 65 uniform( const string& name, int location, int length ) 66 : uniform_base( name, type_to_enum< typenameT >::type, location, length ), m_value()66 : uniform_base( name, type_to_enum< T >::type, location, length ), m_value() 67 67 {} 68 68 -
trunk/nv/interface/vertex_buffer.hh
r101 r111 39 39 int get_size() const { return m_size; }; 40 40 buffer_hint get_hint() const { return m_hint; }; 41 virtual ~buffer() {} 41 42 protected: 42 43 int m_size; -
trunk/nv/interface/window.hh
r98 r111 33 33 virtual void swap_buffers() = 0; 34 34 virtual device* get_device() = 0; 35 virtual ~window() = 0{};35 virtual ~window() {}; 36 36 }; 37 37 -
trunk/nv/types.hh
r94 r111 162 162 }; 163 163 164 template <typename TYPE> void ConstructObject(void* object) 165 { 166 // Use placement new to call the constructor 167 new (object) TYPE; 168 } 169 template <typename TYPE> void DestructObject(void* object) 170 { 171 // Explicit call of the destructor 172 ((TYPE*)object)->TYPE::~TYPE(); 173 } 174 164 175 struct type_entry; 165 176 … … 256 267 std::vector<type_enum> enum_list; 257 268 258 template <int TYPE> 259 type_entry& base() 260 { 261 base_type = type_db->get_type( typeid(TYPE) ); 262 } 269 template <typename TYPE> 270 type_entry& base(); 263 271 264 272 template <int SIZE> 265 type_entry& fields( type_field (&init_fields)[SIZE] ) 266 { 267 for (int i = 0; i < SIZE; i++) 268 { 269 type_field f = init_fields[i]; 270 f.type = type_db->get_type(*(f.type_inf)); 271 f.type_name = f.type->name; 272 field_list.push_back(f); 273 } 274 return *this; 275 } 273 type_entry& fields( type_field (&init_fields)[SIZE] ); 276 274 277 275 template <int SIZE> … … 342 340 type_info_map m_idx_types; 343 341 }; 344 345 template <typename TYPE> void ConstructObject(void* object) 346 { 347 // Use placement new to call the constructor 348 new (object) TYPE; 349 } 350 template <typename TYPE> void DestructObject(void* object) 351 { 352 // Explicit call of the destructor 353 ((TYPE*)object)->TYPE::~TYPE(); 354 } 342 343 template < typename TYPE > 344 type_entry& type_entry::base() 345 { 346 base_type = type_db->get_type( typeid(TYPE) ); 347 } 348 349 template <int SIZE> 350 type_entry& type_entry::fields( type_field (&init_fields)[SIZE] ) 351 { 352 for (int i = 0; i < SIZE; i++) 353 { 354 type_field f = init_fields[i]; 355 f.type = type_db->get_type(*(f.type_inf)); 356 f.type_name = f.type->name; 357 field_list.push_back(f); 358 } 359 return *this; 360 } 355 361 356 362 }
Note: See TracChangeset
for help on using the changeset viewer.