nux-1.14.0
|
00001 /* 00002 * Copyright 2010 Inalogic® Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License, as 00006 * published by the Free Software Foundation; either version 2.1 or 3.0 00007 * of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranties of 00011 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the applicable version of the GNU Lesser General Public 00013 * License for more details. 00014 * 00015 * You should have received a copy of both the GNU Lesser General Public 00016 * License along with this program. If not, see <http://www.gnu.org/licenses/> 00017 * 00018 * Authored by: Jay Taoko <jaytaoko@inalogic.com> 00019 * 00020 */ 00021 00022 #ifndef NUXGRAPHICSRESOURCES_H 00023 #define NUXGRAPHICSRESOURCES_H 00024 00025 namespace nux 00026 { 00027 00028 class FontTexture; 00029 class NResourceCache; 00030 00031 class NuxGraphicsResources 00032 { 00033 NUX_DECLARE_GLOBAL_OBJECT (NuxGraphicsResources, NuxGraphicsGlobalSingletonInitializer); 00034 public: 00035 00036 void InitializeResources(); 00037 NString FindResourceLocation (const TCHAR *ResourceFileName, bool ErrorOnFail = false); 00038 NString FindUITextureLocation (const TCHAR *ResourceFileName, bool ErrorOnFail = false); 00039 NString FindShaderLocation (const TCHAR *ResourceFileName, bool ErrorOnFail = false); 00040 NString FindFontLocation (const TCHAR *ResourceFileName, bool ErrorOnFail = false); 00041 00042 private: 00043 00044 std::vector<NString> m_FontSearchPath; 00045 std::vector<NString> m_ShaderSearchPath; 00046 std::vector<NString> m_UITextureSearchPath; 00047 FilePath m_ResourcePathLocation; 00048 }; 00049 00050 } 00051 00052 #define GNuxGraphicsResources NUX_GLOBAL_OBJECT_INSTANCE(nux::NuxGraphicsResources) 00053 00054 #endif // NUXGRAPHICSRESOURCES_H