Stellarium 0.14.3
|
Manage textures loading. More...
#include <StelTextureMgr.hpp>
Public Member Functions | |
void | init () |
Initialize some variable from the openGL context. More... | |
StelTextureSP | createTexture (const QString &filename, const StelTexture::StelTextureParams ¶ms=StelTexture::StelTextureParams()) |
Load an image from a file and create a new texture from it. More... | |
StelTextureSP | createTextureThread (const QString &url, const StelTexture::StelTextureParams ¶ms=StelTexture::StelTextureParams(), bool lazyLoading=true) |
Load an image from a file and create a new texture from it in a new thread. More... | |
Manage textures loading.
It provides method for loading images in a separate thread.
Definition at line 33 of file StelTextureMgr.hpp.
StelTextureSP StelTextureMgr::createTexture | ( | const QString & | filename, |
const StelTexture::StelTextureParams & | params = StelTexture::StelTextureParams() |
||
) |
Load an image from a file and create a new texture from it.
filename | the texture file name, can be absolute path if starts with '/' otherwise the file will be looked for in Stellarium's standard textures directories. |
params | the texture creation parameters. |
StelTextureSP StelTextureMgr::createTextureThread | ( | const QString & | url, |
const StelTexture::StelTextureParams & | params = StelTexture::StelTextureParams() , |
||
bool | lazyLoading = true |
||
) |
Load an image from a file and create a new texture from it in a new thread.
url | the texture file name or URL, can be absolute path if starts with '/' otherwise the file will be looked for in Stellarium's standard textures directories. |
params | the texture creation parameters. |
lazyLoading | define whether the texture should be actually loaded only when needed, i.e. when bind() is called the first time. |
void StelTextureMgr::init | ( | ) |
Initialize some variable from the openGL context.
Must be called after the creation of the GLContext.