![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Texture backend based on QGL, usable with both GL1 and GL2. More...
#include <StelQGLTextureBackend.hpp>
Public Member Functions | |
| ~StelQGLTextureBackend () | |
| Destroy the StelQGLTextureBackend. Must be called before the Renderer is destroyed. | |
| void | bind (const int textureUnit) |
| Called by QGLRenderer to bind the texture to specified texture unit. | |
| void | startAsynchronousLoading () |
| Start asynchrounously loading the texture in a separate thread. | |
Static Public Member Functions | |
| static StelQGLTextureBackend * | constructFromImage (class StelQGLRenderer *renderer, const QString &path, const TextureParams ¶ms, QImage &image) |
| Construct a StelQGLTextureBackend from an image. | |
| static StelQGLTextureBackend * | constructFromPVR (class StelQGLRenderer *renderer, const QString &path, const TextureParams ¶ms) |
| Construct a StelQGLTextureBackend from a PVR (compressed texture on some mobile platforms) file. | |
| static StelQGLTextureBackend * | constructAsynchronous (class StelQGLRenderer *renderer, const QString &path, const TextureParams ¶ms) |
| Construct a StelQGLTextureBackend asynchronously (in a separate thread). | |
| static StelQGLTextureBackend * | fromFBO (StelQGLRenderer *renderer, class QGLFramebufferObject *fbo) |
| Construct a StelQGLTextureBackend from a framebuffer object. | |
| static StelQGLTextureBackend * | fromViewport (StelQGLRenderer *renderer, const QSize viewportSize, const QGLFormat &viewportFormat) |
| Construct a StelQGLTextureBackend from the viewport. | |
| static StelQGLTextureBackend * | fromRawData (StelQGLRenderer *renderer, const void *data, const QSize size, const TextureDataFormat format, const TextureParams ¶ms) |
| Construct a texture from raw data. | |
Texture backend based on QGL, usable with both GL1 and GL2.
Definition at line 31 of file StelQGLTextureBackend.hpp.
| StelQGLTextureBackend::~StelQGLTextureBackend | ( | ) |
Destroy the StelQGLTextureBackend. Must be called before the Renderer is destroyed.
| void StelQGLTextureBackend::bind | ( | const int | textureUnit | ) |
Called by QGLRenderer to bind the texture to specified texture unit.
| static StelQGLTextureBackend* StelQGLTextureBackend::constructAsynchronous | ( | class StelQGLRenderer * | renderer, | |
| const QString & | path, | |||
| const TextureParams & | params | |||
| ) | [static] |
Construct a StelQGLTextureBackend asynchronously (in a separate thread).
Will return a StelQGLTextureBackend in Uninitialized state - if not lazy loading, caller must start loading themselves.
| renderer | Renderer this texture belongs to. | |
| path | Full path of image file in the file system (or a URL pointing to the image). | |
| params | Texture parameters (e.g. filtering, wrapping, etc.). |
| static StelQGLTextureBackend* StelQGLTextureBackend::constructFromImage | ( | class StelQGLRenderer * | renderer, | |
| const QString & | path, | |||
| const TextureParams & | params, | |||
| QImage & | image | |||
| ) | [static] |
Construct a StelQGLTextureBackend from an image.
| renderer | Renderer this texture belongs to. | |
| path | Full path of the image file in the filesystem. | |
| params | Texture parameters (e.g. filtering, wrapping, etc.). | |
| image | Image to load from. |
| static StelQGLTextureBackend* StelQGLTextureBackend::constructFromPVR | ( | class StelQGLRenderer * | renderer, | |
| const QString & | path, | |||
| const TextureParams & | params | |||
| ) | [static] |
Construct a StelQGLTextureBackend from a PVR (compressed texture on some mobile platforms) file.
This includes loading the texture from file, which might fail if the file does not exist, creating a texture with Error status.
| renderer | Renderer this texture belongs to. | |
| path | Full path of the PVR image file in the filesystem. | |
| params | Texture parameters (e.g. filtering, wrapping, etc.). |
| static StelQGLTextureBackend* StelQGLTextureBackend::fromFBO | ( | StelQGLRenderer * | renderer, | |
| class QGLFramebufferObject * | fbo | |||
| ) | [static] |
Construct a StelQGLTextureBackend from a framebuffer object.
This will simply wrap a texture of a framebuffer object in a StelQGLTextureBackend and return it. The texture itself will still be owned by the framebuffer object, and destroyed with the framebuffer objects, not with the StelQGLTextureBackend.
| renderer | Renderer this texture belongs to. | |
| fbo | Framebuffer object to get the texture from. |
| static StelQGLTextureBackend* StelQGLTextureBackend::fromRawData | ( | StelQGLRenderer * | renderer, | |
| const void * | data, | |||
| const QSize | size, | |||
| const TextureDataFormat | format, | |||
| const TextureParams & | params | |||
| ) | [static] |
Construct a texture from raw data.
Used to create textures from data Qt does not support, e.g. floating point textures.
| renderer | Renderer this texture belongs to. | |
| data | Pointer to the texture data. | |
| size | Texture size in pixels. | |
| format | Format of texture pixels stored in data. | |
| params | Texture parameters (e.g. filtering, wrapping, etc.) |
| static StelQGLTextureBackend* StelQGLTextureBackend::fromViewport | ( | StelQGLRenderer * | renderer, | |
| const QSize | viewportSize, | |||
| const QGLFormat & | viewportFormat | |||
| ) | [static] |
Construct a StelQGLTextureBackend from the viewport.
Used to get a texture of the viewport. The returned texture will be power-of-two containing the image data in area matching viewport size.
| renderer | Renderer this texture belongs to. | |
| viewportSize | Size of the viewport in pixels. | |
| viewportFormat | Pixel format of the viewport. |
| void StelQGLTextureBackend::startAsynchronousLoading | ( | ) |
Start asynchrounously loading the texture in a separate thread.
Can only be called on a StelQGLTextureBackend returned by constructAsynchronous.
Changes status from Uninitialized to Loading.
1.6.3