//- // ========================================================================== // Copyright (C) 2005 ATI Technologies Inc. All rights reserved. // // Copyright (C) 1995 - 2005 Alias Systems Corp. and/or its licensors. All // rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files are provided by Alias // Systems Corp. ("Alias") and/or its licensors for the exclusive use of the // Customer (as defined in the Alias Software License Agreement that // accompanies this Alias software). Such Customer has the right to use, // modify, and incorporate the Data into other products and to distribute such // products for use by end-users. // // THE DATA IS PROVIDED "AS IS". ALIAS HEREBY DISCLAIMS ALL WARRANTIES // RELATING TO THE DATA, INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS OR // IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. IN NO EVENT SHALL ALIAS BE LIABLE FOR ANY DAMAGES // WHATSOEVER, WHETHER DIRECT, INDIRECT, SPECIAL, OR PUNITIVE, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, OR IN EQUITY, // ARISING OUT OF ACCESS TO, USE OF, OR RELIANCE UPON THE DATA. // ========================================================================== //+ #ifndef RESOURCE_MANAGER_H #define RESOURCE_MANAGER_H #include #include "glExtensions.h" //this class is a static place holder for now, it may need to be a singleton //Presently it only manages the destruction of resources, it should also //manage a resource pool, so that shader nodes can share texture instances. class ResourceManager { public: //these mark GL objects for deletion, since a context might not be available static void destroyTexture( GLuint tex); static void destroyAsmProgram( GLuint prog); static void destroyProgram( GLuint prog); static void destroyShader( GLuint shad); //clean up the resources we have been unable to previously static void recover(); private: static std::vector sTextureList; static std::vector sAsmProgramList; static std::vector sProgramList; static std::vector sShaderList; //prevent construction ResourceManager() {}; }; #endif //RESOURCE_MANAGER_H