public:
/**
- * Enumeration to tell that this sampler does not have a unique index yet
- */
- enum
- {
- NOT_INITIALIZED = -1
- };
-
- /**
* Constructor
*/
Texture()
public: // called from RenderThread
/**
- * @param[in] buffer A vector wit
* Get the texture ID
* @return the id of the associated texture
*/
void Destroy( Context& context );
/**
+ * Called by RenderManager to inform the texture that the context has been destroyed
+ */
+ void GlContextDestroyed();
+
+ /**
* Uploads data to the texture.
* @param[in] context The GL context
* @param[in] pixelData A pixel data object
*/
void ApplySampler( Context& context, Render::Sampler* sampler );
- GLuint mId; ///<Id of the texture
- Type mType; ///<Type of the texture
- Render::Sampler mSampler; ///<The current sampler state
- NativeImageInterfacePtr mNativeImage; ///<Pointer to native image
- GLenum mInternalFormat; ///<The format of the pixel data
- GLenum mPixelDataType; ///<The data type of the pixel data
- unsigned int mWidth; ///<Widht of the texture
- unsigned int mHeight; ///<Height of the texture
- bool mHasAlpha : 1; ///<Whether the format has an alpha channel
- bool mIsCompressed : 1; ///<Whether the format is compressed
+ GLuint mId; ///< Id of the texture
+ GLuint mTarget; ///< Specifies the target to which the texture is bound.
+ Type mType; ///< Type of the texture
+ Render::Sampler mSampler; ///< The current sampler state
+ NativeImageInterfacePtr mNativeImage; ///< Pointer to native image
+ GLenum mInternalFormat; ///< The format of the pixel data
+ GLenum mPixelDataType; ///< The data type of the pixel data
+ unsigned int mWidth; ///< Widht of the texture
+ unsigned int mHeight; ///< Height of the texture
+ bool mHasAlpha : 1; ///< Whether the format has an alpha channel
+ bool mIsCompressed : 1; ///< Whether the format is compressed
};