Stellarium
0.20.4
|
Manage textures loading. More...
#include <StelTextureMgr.hpp>
Public Member Functions | |
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 | createTexture (const QImage &image, const StelTexture::StelTextureParams ¶ms=StelTexture::StelTextureParams()) |
Create a texture from a QImage. | |
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... | |
StelTextureSP | wrapperForGLTexture (GLuint texId) |
Creates or finds a StelTexture wrapper for the specified OpenGL texture object. More... | |
Friends | |
class | StelTexture |
class | ImageLoader |
class | StelApp |
It provides method for loading images in a separate thread.
StelTextureSP StelTextureMgr::createTexture | ( | const QString & | filename, |
const StelTexture::StelTextureParams & | params = StelTexture::StelTextureParams() |
||
) |
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 |
||
) |
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. |
StelTextureSP StelTextureMgr::wrapperForGLTexture | ( | GLuint | texId | ) |
The wrapper takes ownership of the texture and will delete it if it is destroyed.
texID | The OpenGL texture ID which should be wrapped. If this is already a StelTexture, the existing wrapper will be returned. |