Commit 2e85e015 authored by Christopher Tenter's avatar Christopher Tenter
Browse files

add clearCache() in acg shadercache

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18219 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c8052c02
......@@ -62,7 +62,7 @@
namespace ACG
{
//#define SG_DEBUG_OUTPUT
#define SG_DEBUG_OUTPUT
ShaderCache::ShaderCache()
{
......@@ -220,6 +220,12 @@ int ACG::ShaderCache::compareShaderGenDescs( const CacheEntry* _a, const CacheEn
}
void ACG::ShaderCache::clearCache()
{
cache_.clear();
}
//=============================================================================
} // namespace ACG
//=============================================================================
......@@ -89,6 +89,10 @@ public:
* @return The program (Either from cache or newly compiled and linked)
*/
GLSL::Program* getProgram(const ShaderGenDesc* _desc, unsigned int _usage = 0);
/** \brief Delete all cached shaders
*/
void clearCache();
protected:
ShaderCache();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment