X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frendering%2Frenderer-impl.h;h=745159b0cfd23228ba3347eda949f929b83222c9;hb=24a1e2d36b9340010242c40b043e208674cb4695;hp=c0cdb082954ed51264db0ff6d9679b07f5b48cfa;hpb=ba5ad9b4f9cc695a5b4ddbe0aa349bc8f596306e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/rendering/renderer-impl.h b/dali/internal/event/rendering/renderer-impl.h index c0cdb08..745159b 100644 --- a/dali/internal/event/rendering/renderer-impl.h +++ b/dali/internal/event/rendering/renderer-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_RENDERER_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 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. @@ -21,13 +21,14 @@ // INTERNAL INCLUDES #include // DALI_ASSERT_ALWAYS #include // Dali::IntrusivePtr -#include // Dali::Renderer +#include // Dali::Renderer #include #include // Dali::Internal::Connectable #include // Dali::Internal::ObjectConnector #include // Dali::Internal::Object #include // Dali::Internal::TextureSet #include // Dali::Internal::Geometry +#include // Dali::Render::Renderer::StencilParameters namespace Dali { @@ -38,7 +39,6 @@ namespace SceneGraph class Renderer; } - class Renderer; typedef IntrusivePtr RendererPtr; @@ -95,57 +95,47 @@ public: */ int GetDepthIndex() const; - /** - * @copydoc Dali::Renderer::SetFaceCullingMode() - */ - void SetFaceCullingMode( Dali::Renderer::FaceCullingMode cullingMode ); - - /** - * @copydoc Dali::Renderer::GetFaceCullingMode() - */ - Dali::Renderer::FaceCullingMode GetFaceCullingMode(); - /** * @copydoc Dali::Renderer::SetBlendMode() */ - void SetBlendMode( BlendingMode::Type mode ); + void SetBlendMode( BlendMode::Type mode ); /** * @copydoc Dali::Renderer::GetBlendMode() */ - BlendingMode::Type GetBlendMode() const; + BlendMode::Type GetBlendMode() const; /** * @copydoc Dali::Renderer::SetBlendFunc() */ - void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba ); + void SetBlendFunc( BlendFactor::Type srcFactorRgba, BlendFactor::Type destFactorRgba ); /** * @copydoc Dali::Renderer::SetBlendFunc() */ - void SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb, - BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha ); + void SetBlendFunc( BlendFactor::Type srcFactorRgb, BlendFactor::Type destFactorRgb, + BlendFactor::Type srcFactorAlpha, BlendFactor::Type destFactorAlpha ); /** * @copydoc Dali::Renderer::GetBlendFunc() */ - void GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb, - BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const; + void GetBlendFunc( BlendFactor::Type& srcFactorRgb, BlendFactor::Type& destFactorRgb, + BlendFactor::Type& srcFactorAlpha, BlendFactor::Type& destFactorAlpha ) const; /** * @copydoc Dali::Renderer::SetBlendEquation() */ - void SetBlendEquation( BlendingEquation::Type equationRgba ); + void SetBlendEquation( BlendEquation::Type equationRgba ); /** * @copydoc Dali::Renderer::SetBlendEquation() */ - void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha ); + void SetBlendEquation( BlendEquation::Type equationRgb, BlendEquation::Type equationAlpha ); /** * @copydoc Dali::Renderer::GetBlendEquation() */ - void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const; + void GetBlendEquation( BlendEquation::Type& equationRgb, BlendEquation::Type& equationAlpha ) const; /** * @copydoc Dali::Renderer::SetBlendColor() @@ -158,6 +148,16 @@ public: Vector4 GetBlendColor() const; /** + * @copydoc Dali::Renderer::SetIndexedDrawFirstElement + */ + void SetIndexedDrawFirstElement( size_t firstElement ); + + /** + * @copydoc Dali::Renderer::SetIndexedDrawElementsCount + */ + void SetIndexedDrawElementsCount( size_t elementsCount ); + + /** * @brief Set whether the Pre-multiplied Alpha Blending is required * * @param[in] preMultipled whether alpha is pre-multiplied. @@ -172,7 +172,7 @@ public: bool IsPreMultipliedAlphaEnabled() const; /** - * @brief Get the scene graph object ( the node attachment ) + * @brief Get the scene graph object * * @return the scene object */ @@ -293,19 +293,27 @@ private: // unimplemented methods private: // data SceneGraph::Renderer* mSceneObject; - Vector4* mBlendColor; ///< Local copy of blend color, pointer only as its rarely used - ObjectConnector mGeometryConnector; ///< Connector that holds the geometry used by this renderer - ObjectConnector mTextureSetConnector; ///< Connector that holds the texture set used by this renderer - IntrusivePtr mShader; ///< Connector that holds the shader used by this renderer + Vector4* mBlendColor; ///< Local copy of blend color, pointer only as its rarely used + GeometryPtr mGeometry; ///< Connector that holds the geometry used by this renderer + ObjectConnector mTextureSetConnector; ///< Connector that holds the texture set used by this renderer + IntrusivePtr mShader; ///< Connector that holds the shader used by this renderer int mDepthIndex; int mOnStageCount; - Dali::Renderer::FaceCullingMode mFaceCullingMode; ///< Local copy of face culling mode - BlendingMode::Type mBlendingMode; ///< Local copy of blending mode - BlendingOptions mBlendingOptions; ///< Local copy of blending options bitmask - bool mPremultipledAlphaEnabled; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required + size_t mIndexedDrawFirstElement; ///< Offset of first element to draw from bound index buffer + size_t mIndexedDrawElementCount; ///< Number of elements to draw + + Render::Renderer::StencilParameters mStencilParameters; ///< Struct containing all stencil related options + BlendingOptions mBlendingOptions; ///< Local copy of blending options bitmask + DepthFunction::Type mDepthFunction:3; ///< Local copy of the depth function + FaceCullingMode::Type mFaceCullingMode:2; ///< Local copy of the mode of face culling + BlendMode::Type mBlendMode:2; ///< Local copy of the mode of blending + DepthWriteMode::Type mDepthWriteMode:2; ///< Local copy of the depth write mode + DepthTestMode::Type mDepthTestMode:2; ///< Local copy of the depth test mode + bool mWriteToColorBuffer:1; ///< Local copy of the write to color buffer flag + bool mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required }; } // namespace Internal