[Tizen] Added support for Multiple Render Targets.
[platform/core/uifw/dali-core.git] / dali / public-api / rendering / texture.h
index a6b8c93..a043c7d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEXTURE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
 
 namespace Dali
 {
+/**
+ * @addtogroup dali_core_rendering_effects
+ * @{
+ */
 
 namespace Internal DALI_INTERNAL
 {
-class NewTexture;
+class Texture;
 }
 
 namespace TextureType
 {
 
 /**
- * @brief Texture types
+ * @brief Enumeration for texture types.
  * @SINCE_1_1.43
  */
 enum Type
@@ -55,12 +59,12 @@ namespace CubeMapLayer
    * These constants should be used as the "layer" parameter when uploading a cube-map with Texture::Upload.
    * @SINCE_1_1.43
    */
-  const unsigned int POSITIVE_X = 0u; ///< CubeMap image for +x @SINCE_1_1.43
-  const unsigned int NEGATIVE_X = 1u; ///< CubeMap image for -x @SINCE_1_1.43
-  const unsigned int POSITIVE_Y = 2u; ///< CubeMap image for +y @SINCE_1_1.43
-  const unsigned int NEGATIVE_Y = 3u; ///< CubeMap image for -y @SINCE_1_1.43
-  const unsigned int POSITIVE_Z = 4u; ///< CubeMap image for +z @SINCE_1_1.43
-  const unsigned int NEGATIVE_Z = 5u; ///< CubeMap image for -z @SINCE_1_1.43
+  const uint32_t POSITIVE_X = 0u; ///< CubeMap image for +x @SINCE_1_1.43
+  const uint32_t NEGATIVE_X = 1u; ///< CubeMap image for -x @SINCE_1_1.43
+  const uint32_t POSITIVE_Y = 2u; ///< CubeMap image for +y @SINCE_1_1.43
+  const uint32_t NEGATIVE_Y = 3u; ///< CubeMap image for -y @SINCE_1_1.43
+  const uint32_t POSITIVE_Z = 4u; ///< CubeMap image for +z @SINCE_1_1.43
+  const uint32_t NEGATIVE_Z = 5u; ///< CubeMap image for -z @SINCE_1_1.43
 
 } // namespace CubeMapLayer
 
@@ -69,12 +73,12 @@ namespace CubeMapLayer
  * @brief Texture represents a texture object used as input or output by shaders.
  * @SINCE_1_1.43
  */
-class DALI_IMPORT_API Texture : public BaseHandle
+class DALI_CORE_API Texture : public BaseHandle
 {
 public:
 
   /**
-   * @brief Creates a new Texture object
+   * @brief Creates a new Texture object.
    *
    * @SINCE_1_1.43
    * @param[in] type The type of the texture
@@ -83,10 +87,10 @@ public:
    * @param[in] height The height of the texture
    * @return A handle to a newly allocated Texture
    */
-  static Texture New( TextureType::Type type, Pixel::Format format, unsigned int width, unsigned int height );
+  static Texture New( TextureType::Type type, Pixel::Format format, uint32_t width, uint32_t height );
 
   /**
-   * @brief Creates a new Texture object from a native image
+   * @brief Creates a new Texture object from a native image.
    *
    * @SINCE_1_1.43
    * @param[in] nativeImageInterface A native image
@@ -97,21 +101,21 @@ public:
   static Texture New( NativeImageInterface& nativeImageInterface );
 
   /**
-   * @brief Default constructor, creates an empty handle
+   * @brief Default constructor, creates an empty handle.
    *
    * @SINCE_1_1.43
    */
   Texture();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * @SINCE_1_1.43
    */
   ~Texture();
 
   /**
-   * @brief Copy constructor, creates a new handle to the same object
+   * @brief Copy constructor, creates a new handle to the same object.
    *
    * @SINCE_1_1.43
    * @param[in] handle Handle to an object
@@ -119,8 +123,8 @@ public:
   Texture( const Texture& handle );
 
   /**
-   * @brief Downcast to a texture.
-   * If not the returned handle is left uninitialized.
+   * @brief Downcasts to a texture.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_1.43
    * @param[in] handle Handle to an object
@@ -129,7 +133,7 @@ public:
   static Texture DownCast( BaseHandle handle );
 
   /**
-   * @brief Assignment operator, changes this handle to point at the same object
+   * @brief Assignment operator, changes this handle to point at the same object.
    *
    * @SINCE_1_1.43
    * @param[in] handle Handle to an object
@@ -138,7 +142,7 @@ public:
   Texture& operator=( const Texture& handle );
 
   /**
-   * @brief Upload data to the texture from a PixelData object
+   * @brief Uploads data to the texture from a PixelData object.
    *
    * @SINCE_1_1.43
    * @param[in] pixelData The pixelData object
@@ -147,7 +151,7 @@ public:
   bool Upload( PixelData pixelData );
 
   /**
-   * @brief Upload data to the texture from a PixelData object
+   * @brief Uploads data to the texture from a PixelData object.
    * @note Upload does not upsample or downsample pixel data to fit the specified rectangular area in the texture.
    *
    * @SINCE_1_1.43
@@ -161,45 +165,48 @@ public:
    * @return True if the PixelData object has compatible pixel format and fits in the rectangle specified, false otherwise
    */
   bool Upload( PixelData pixelData,
-               unsigned int layer, unsigned int mipmap,
-               unsigned int xOffset, unsigned int yOffset,
-               unsigned int width, unsigned int height );
+               uint32_t layer, uint32_t mipmap,
+               uint32_t xOffset, uint32_t yOffset,
+               uint32_t width, uint32_t height );
 
   /**
-   * @brief Generate mipmaps for the texture
-   * This will auto generate all the mipmaps for the texture based on the data in the base level
+   * @brief Generates mipmaps for the texture.
+   * This will auto generate all the mipmaps for the texture based on the data in the base level.
    *
    * @SINCE_1_1.43
    */
   void GenerateMipmaps();
 
   /**
-   * @brief Returns the width of the texture
+   * @brief Returns the width of the texture.
    *
    * @SINCE_1_1.43
    * @return The width, in pixels, of the texture
    */
-  unsigned int GetWidth() const;
+  uint32_t GetWidth() const;
 
   /**
-   * @brief Returns the height of the texture
+   * @brief Returns the height of the texture.
    *
    * @SINCE_1_1.43
    * @return The height, in pixels, of the texture
    */
-  unsigned int GetHeight() const;
+  uint32_t GetHeight() const;
 
 public:
 
   /**
-   * @brief The constructor
+   * @brief The constructor.
    * @note  Not intended for application developers.
    * @SINCE_1_1.43
    * @param[in] pointer A pointer to a newly allocated Texture
    */
-  explicit DALI_INTERNAL Texture( Internal::NewTexture* pointer );
+  explicit DALI_INTERNAL Texture( Internal::Texture* pointer );
 };
 
+/**
+ * @}
+ */
 } //namespace Dali
 
 #endif // DALI_TEXTURE_H