Last change
on this file since 229 was
229,
checked in by epyon, 11 years ago
|
- framebuffer extension added to gl
- various minro changes and fixes
|
File size:
821 bytes
|
Rev | Line | |
---|
[7] | 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 |
|
---|
| 9 | using namespace nv;
|
---|
| 10 |
|
---|
| 11 | resource_manager::resource_manager()
|
---|
| 12 | {
|
---|
| 13 |
|
---|
| 14 | }
|
---|
| 15 |
|
---|
[229] | 16 | resource* resource_manager::get_raw_resource(uint32 id) const
|
---|
[7] | 17 | {
|
---|
| 18 | return m_data[ id ];
|
---|
| 19 | }
|
---|
| 20 |
|
---|
[229] | 21 | resource* resource_manager::get_raw_resource(const std::string& id) const
|
---|
[7] | 22 | {
|
---|
| 23 | auto i = m_id_map.find( id );
|
---|
| 24 | if ( i != m_id_map.end() )
|
---|
| 25 | {
|
---|
[45] | 26 | return m_data[ (unsigned int)i->second ];
|
---|
[7] | 27 | }
|
---|
[229] | 28 | return nullptr;
|
---|
[7] | 29 | }
|
---|
| 30 |
|
---|
[229] | 31 | void resource_manager::register_resource_type( const std::string& type_name, resource_constructor_func c )
|
---|
[7] | 32 | {
|
---|
[229] | 33 | m_constructors[ type_name ] = c;
|
---|
[7] | 34 | }
|
---|
| 35 |
|
---|
| 36 | resource_manager::~resource_manager()
|
---|
| 37 | {
|
---|
| 38 |
|
---|
| 39 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.