20 #ifndef _STELQGLTEXTUREBACKEND_HPP_
21 #define _STELQGLTEXTUREBACKEND_HPP_
23 #include "StelGLUtilityFunctions.hpp"
24 #include "StelRenderer.hpp"
25 #include "StelTextureBackend.hpp"
39 void bind(
const int textureUnit);
109 (
StelQGLRenderer* renderer,
const QSize viewportSize,
const QGLFormat& viewportFormat);
123 const TextureDataFormat format,
const TextureParams& params);
126 void onImageLoaded(QImage image);
129 void onLoadingError(
const QString& errorMessage) ;
172 void loadFromImage(QImage image);
178 QGLContext* prepareContextForLoading();
181 void completeLoading();
184 void setTextureWrapping();
187 void invariant()
const
190 const TextureStatus status =
getStatus();
191 if((glTextureID != 0) != (status == TextureStatus_Loaded))
193 qDebug() <<
"Handle: " << glTextureID <<
" Status: " << textureStatusName(status);
194 Q_ASSERT_X(
false, Q_FUNC_INFO,
"Texture can be specified if and only if loaded.");
197 Q_ASSERT_X(loader == NULL || status == TextureStatus_Loading,
198 Q_FUNC_INFO,
"Texture loader can only exist during loading");
202 #endif // _STELQGLTEXTUREBACKEND_HPP_