Texture mipmap support 22/257922/1
authorRichard Huang <r.huang@samsung.com>
Thu, 6 May 2021 10:33:10 +0000 (11:33 +0100)
committerRichard Huang <r.huang@samsung.com>
Thu, 6 May 2021 10:33:10 +0000 (11:33 +0100)
Change-Id: Iee0f2e0e1bb9407b82f756dffddeb30b638e730c

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h

index a3a0feef74fb43501547271093e959e9495eacb4..e5db6ed8937637331d60224c254660f4fbb3200d 100644 (file)
@@ -996,6 +996,15 @@ void TestGraphicsController::UpdateTextures(const std::vector<Graphics::TextureU
   }
 }
 
+void TestGraphicsController::GenerateTextureMipmaps(const Graphics::Texture& texture)
+{
+  mCallStack.PushCall("GenerateTextureMipmaps", "");
+
+  auto gfxTexture = Uncast<TestGraphicsTexture>(&texture);
+  mGl.BindTexture(gfxTexture->GetTarget(), 0);
+  mGl.GenerateMipmap(gfxTexture->GetTarget());
+}
+
 bool TestGraphicsController::EnableDepthStencilBuffer(bool enableDepth, bool enableStencil)
 {
   TraceCallStack::NamedParams namedParams;
index 1d93bfa33965033b00ec5e44f74f53a19b7b4168..1c62119ae979ae49ce07f51b39cc1e75296dcde8 100644 (file)
@@ -161,6 +161,12 @@ public:
   void UpdateTextures(const std::vector<Graphics::TextureUpdateInfo>&       updateInfoList,
                       const std::vector<Graphics::TextureUpdateSourceInfo>& sourceList) override;
 
+  /**
+   * Auto generates mipmaps for the texture
+   * @param[in] texture The texture
+   */
+  void GenerateTextureMipmaps(const Graphics::Texture& texture) override;
+
   /**
    * TBD: do we need those functions in the new implementation?
    */