~ubuntu-branches/ubuntu/trusty/libavg/trusty-proposed

« back to all changes in this revision

Viewing changes to src/graphics/ShaderRegistry.cpp

  • Committer: Package Import Robot
  • Author(s): OXullo Intersecans
  • Date: 2011-12-06 22:44:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20111206224456-qc7250z3ya1vi8s9
Tags: 1.7.0-0ubuntu1
* New upstream release (LP: #899183)
* Remove patches 0002-libav-0.7.patch, 0003-fglrx-segfault-on-startup.patch
  now merged to upstream
* Remove unnecessary .la files
* Update debian/watch file
* Fix debian/copyright dep-5 compliancy
* Update standards to version 3.9.2
* Add man pages for avg_checktouch, avg_checkvsync, avg_showsvg
* Minor debian/rules enhancement
* Add librsvg2-dev, libgdk-pixbuf2.0-dev to Build-Depends
* Proper transition to dh_python2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
//  libavg - Media Playback Engine. 
3
 
//  Copyright (C) 2003-2008 Ulrich von Zadow
 
3
//  Copyright (C) 2003-2011 Ulrich von Zadow
4
4
//
5
5
//  This library is free software; you can redistribute it and/or
6
6
//  modify it under the terms of the GNU Lesser General Public
20
20
//
21
21
 
22
22
#include "ShaderRegistry.h"
 
23
 
 
24
#include "GLContext.h"
 
25
 
23
26
#include "../base/Logger.h"
24
27
#include "../base/Exception.h"
25
28
 
28
31
 
29
32
namespace avg {
30
33
    
31
 
thread_specific_ptr<ShaderRegistryPtr> ShaderRegistry::s_pInstance;
32
 
 
33
 
ShaderRegistryPtr& ShaderRegistry::get() 
34
 
{
35
 
    if (s_pInstance.get() == 0) {
36
 
        s_pInstance.reset(new ShaderRegistryPtr(new ShaderRegistry()));
37
 
    }
38
 
    return *s_pInstance;
39
 
}
40
 
 
41
 
void ShaderRegistry::kill()
42
 
{
43
 
    s_pInstance.reset();
 
34
ShaderRegistryPtr ShaderRegistry::get() 
 
35
{
 
36
    return GLContext::getCurrent()->getShaderRegistry();
44
37
}
45
38
 
46
39
ShaderRegistry::ShaderRegistry()