[3.0] Fix bug binding native image textures
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-texture.h
index 35efb2e..2833a4d 100644 (file)
@@ -45,14 +45,6 @@ class Texture
 public:
 
   /**
-   * Enumeration to tell that this sampler does not have a unique index yet
-   */
-  enum
-  {
-    NOT_INITIALIZED = -1
-  };
-
-  /**
    * Constructor
    */
   Texture()
@@ -86,7 +78,6 @@ public:
 public: // called from RenderThread
 
   /**
-   * @param[in] buffer A vector wit
    * Get the texture ID
    * @return the id of the associated texture
    */
@@ -143,6 +134,11 @@ public:
   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
@@ -216,16 +212,17 @@ private:
    */
   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
 };