|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Class allowing to handle textures lifetime. More...
#include <OGLTextureManager.h>

Public Member Functions | |
| QOpenGLTexture * | getTexture (const std::shared_ptr< QImage > &image) |
| QOpenGLTexture * | whiteTexture () |
| QOpenGLTexture * | fallbackTexture () |
Static Public Member Functions | |
| static OGLTextureManager * | instance (QOpenGLContext *context) |
Private Member Functions | |
| OGLTextureManager (QOpenGLContext *context) | |
| ~OGLTextureManager ()=default | |
| void | initializeTextures () |
Private Attributes | |
| std::map< std::weak_ptr< QImage >, std::unique_ptr< QOpenGLTexture >, std::owner_less<> > | imageTextures |
| QOpenGLTexture | _fallbackTexture |
| QOpenGLTexture | _whiteTexture |
Static Private Attributes | |
| static QMap< QOpenGLContext *, OGLTextureManager * > | instances |
Class allowing to handle textures lifetime.
Texture manager that supports resource sharing between OpenGL contexts.
FIXME: OpenGL texture can be shared between context of a same context group, so, IN THEORY, we could have a single instance of OGLTextureManager shared between all contexts. We didn't manage to create a group containing all contexts meaning that for the moment one OGLTextureManager is instanced for each context.
Definition at line 50 of file OGLTextureManager.h.
|
private |
Definition at line 45 of file OGLTextureManager.cpp.


|
privatedefault |
| QOpenGLTexture * OGLTextureManager::fallbackTexture | ( | ) |
Definition at line 77 of file OGLTextureManager.cpp.
| QOpenGLTexture * OGLTextureManager::getTexture | ( | const std::shared_ptr< QImage > & | image | ) |
Definition at line 82 of file OGLTextureManager.cpp.
|
private |
|
static |
Definition at line 34 of file OGLTextureManager.cpp.


| QOpenGLTexture * OGLTextureManager::whiteTexture | ( | ) |
Definition at line 72 of file OGLTextureManager.cpp.
|
private |
Definition at line 69 of file OGLTextureManager.h.
|
private |
Definition at line 70 of file OGLTextureManager.h.
|
private |
Definition at line 68 of file OGLTextureManager.h.
|
staticprivate |
Definition at line 72 of file OGLTextureManager.h.