Mipmap level parameter
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-texture.h
index 35efb2e..526a690 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_RENDER_TEXTURE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -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
@@ -207,6 +203,15 @@ public:
     return mType;
   }
 
+  /**
+   * Check if the texture is a native image
+   * @return if the texture is a native image
+   */
+  bool IsNativeImage() const
+  {
+    return mNativeImage;
+  }
+
 private:
 
   /**
@@ -216,16 +221,18 @@ 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;                  ///< Width of the texture
+  unsigned int mHeight;                 ///< Height of the texture
+  unsigned int mMaxMipMapLevel;         ///< Maximum mipmap level
+  bool mHasAlpha : 1;                   ///< Whether the format has an alpha channel
+  bool mIsCompressed : 1;               ///< Whether the format is compressed
 };