2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiEffects_RendererGraphicsEngineRenderTextureCache.h
20 * @brief Class for render textures cache
24 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_
25 #define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_
27 #include <renderer/engine-model/FUiEffects_RendererEngineModelForwardDeclaration.h>
28 #include <renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.h>
29 #include <renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h>
30 #include <renderer/system/FUiEffects_RendererSystemSmartPtr.h>
32 #include <renderer/graphics-engine/FUiEffects_RendererGraphicsEngineOpenGLImplementation.h>
33 #include <renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.h>
35 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine
38 class RenderTextureCache:
42 RenderTextureCache(Render* pRender);
43 virtual ~RenderTextureCache(void);
45 static GLenum GetGlInternalFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::InternalFormat::Value internalFormat);
46 static GLenum GetGlDataFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataFormat::Value dataFormat);
47 static GLenum GetGlDataType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataType::Value dataType);
48 static GLenum GetGlFilterType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::FilterType::Value filterType);
49 static GLenum GetGlWrapType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::WrapType::Value wrapType);
51 virtual void DropCache(void);
52 virtual void DestroyCache(void);
54 virtual void Bind(Render*, GLuint stage) = 0;
60 typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr<RenderTextureCache> RenderTextureCachePtr;
62 class RenderTexture2dCache:
63 public RenderTextureCache
66 RenderTexture2dCache(Render* pRender, Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty* pTexture);
67 virtual ~RenderTexture2dCache(void);
69 virtual void Validate(Render*);
70 void Validate(Render*, GLuint stage);
72 virtual void Bind(Render*, GLuint stage);
74 virtual void Die(void);
75 virtual void DestroyCache(void);
78 Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty* __pTexture;
81 typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr<RenderTexture2dCache> RenderTexture2DCachePtr;
83 }}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine
85 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_