Last change
on this file since 484 was
484,
checked in by epyon, 10 years ago
|
- resource manager updates
- nv-image added
- missing stl memory added
- several other missing files
|
File size:
603 bytes
|
Rev | Line | |
---|
[484] | 1 | // Copyright (C) 2015-2015 ChaosForge Ltd
|
---|
| 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
| 4 | // This file is part of Nova libraries.
|
---|
| 5 | // For conditions of distribution and use, see copying.txt file in root folder.
|
---|
| 6 |
|
---|
| 7 | #include "nv/engine/image_manager.hh"
|
---|
| 8 |
|
---|
| 9 | #include "nv/image/png_loader.hh"
|
---|
| 10 | #include "nv/io/c_file_system.hh"
|
---|
| 11 |
|
---|
| 12 | using namespace nv;
|
---|
| 13 |
|
---|
| 14 | bool image_manager::load_resource( const string_view& filename )
|
---|
| 15 | {
|
---|
| 16 | png_loader loader;
|
---|
| 17 | c_file_system fs;
|
---|
| 18 | stream* file = fs.open( filename );
|
---|
| 19 | image_data* result = loader.load( *file );
|
---|
| 20 | delete file;
|
---|
| 21 | add( filename, result );
|
---|
| 22 | return result != nullptr;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.