source: trunk/src/resource_manager.cc @ 239

Last change on this file since 239 was 229, checked in by epyon, 11 years ago
  • framebuffer extension added to gl
  • various minro changes and fixes
File size: 821 bytes
Line 
1// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6
7#include <nv/resource_manager.hh>
8
9using namespace nv;
10
11resource_manager::resource_manager()
12{
13
14}
15
16resource* resource_manager::get_raw_resource(uint32 id) const
17{
18        return m_data[ id ];
19}
20
21resource* resource_manager::get_raw_resource(const std::string& id) const
22{
23        auto i = m_id_map.find( id );
24        if ( i != m_id_map.end() )
25        {
26                return m_data[ (unsigned int)i->second ];
27        }
28        return nullptr;
29}
30
31void resource_manager::register_resource_type( const std::string& type_name, resource_constructor_func c )
32{
33        m_constructors[ type_name ] = c;
34}
35
36resource_manager::~resource_manager()
37{
38
39}
Note: See TracBrowser for help on using the repository browser.