Stellarium 0.90.0
List of all members | Public Member Functions | Friends
StelTextureMgr Class Reference

Manage textures loading. More...

#include <StelTextureMgr.hpp>

+ Inheritance diagram for StelTextureMgr:
+ Collaboration diagram for StelTextureMgr:

Public Member Functions

StelTextureSP createTexture (const QString &filename, const StelTexture::StelTextureParams &params=StelTexture::StelTextureParams())
 Load an image from a file and create a new texture from it. More...
 
StelTextureSP 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. More...
 
int getGLMemoryUsage ()
 Returns the estimated memory usage of all textures currently loaded through StelTexture. More...
 

Friends

class StelTexture
 
class ImageLoader
 
class StelApp
 

Detailed Description

Manage textures loading.

It provides method for loading images in a separate thread.

Definition at line 33 of file StelTextureMgr.hpp.

Member Function Documentation

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.

Parameters
filenamethe texture file name, can be absolute path if starts with '/' otherwise the file will be looked for in Stellarium's standard textures directories.
paramsthe 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.

Parameters
urlthe 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.
paramsthe texture creation parameters.
lazyLoadingdefine whether the texture should be actually loaded only when needed, i.e. when bind() is called the first time.
int StelTextureMgr::getGLMemoryUsage ( )

Returns the estimated memory usage of all textures currently loaded through StelTexture.


The documentation for this class was generated from the following file: