source: trunk/src/engine/image_manager.cc @ 485

Last change on this file since 485 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
Line 
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
12using namespace nv;
13
14bool 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.