/*
- * Copyright (c) 2014 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.
#include <dali/public-api/dali-core.h>
#include <dali/integration-api/bitmap.h>
#include <dali/devel-api/images/atlas.h>
-#include <dali/devel-api/images/pixel-data.h>
#include <dali-test-suite-utils.h>
#include <test-native-image.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.
#include <dali/public-api/dali-core.h>
#include <dali-test-suite-utils.h>
-#include <dali/devel-api/rendering/frame-buffer.h>
using namespace Dali;
texture.GenerateMipmaps();
//Attach NEGATIVE_Y face of the cubemap
- frameBuffer.AttachColorTexture( texture, 0u, CubeMap::NEGATIVE_Y );
+ frameBuffer.AttachColorTexture( texture, 0u, CubeMapLayer::NEGATIVE_Y );
application.SendNotification();
application.Render();
/*
- * 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.
#include <dali/public-api/dali-core.h>
#include <dali-test-suite-utils.h>
-#include <dali/devel-api/rendering/geometry.h>
-#include <dali/devel-api/rendering/renderer.h>
using namespace Dali;
/*
- * 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.
#include <cstdlib>
#include <dali-test-suite-utils.h>
-#include <dali/devel-api/images/pixel-data.h>
#include <dali/public-api/images/pixel.h>
+#include <dali/public-api/images/pixel-data.h>
#include <dali/public-api/common/dali-vector.h>
using namespace Dali;
/*
- * 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.
#include <dali/public-api/dali-core.h>
#include <dali-test-suite-utils.h>
-#include <dali/devel-api/rendering/renderer.h>
using namespace Dali;
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::POSITIVE_X, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::POSITIVE_X, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::NEGATIVE_X, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::NEGATIVE_X, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
//Upload data to the POSITIVE_Y face of the texture
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::POSITIVE_Y, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::POSITIVE_Y, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
//Upload data to the NEGATIVE_Y face of the texture
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::NEGATIVE_Y, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::NEGATIVE_Y, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
//Upload data to the POSITIVE_Z face of the texture
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::POSITIVE_Z, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::POSITIVE_Z, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
//Upload data to the NEGATIVE_Z face of the texture
{
callStack.Reset();
- texture.Upload( pixelData, CubeMap::NEGATIVE_Z, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::NEGATIVE_Z, 0u, 0u, 0u, width, height );
application.SendNotification();
application.Render();
unsigned int bufferSize( width * height * 4 );
unsigned char* buffer= reinterpret_cast<unsigned char*>( malloc( bufferSize ) );
PixelData pixelData = PixelData::New( buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE );
- texture.Upload( pixelData, CubeMap::NEGATIVE_X, 0u, 0u, 0u, width, height );
+ texture.Upload( pixelData, CubeMapLayer::NEGATIVE_X, 0u, 0u, 0u, width, height );
bufferSize = widthMipmap1 * heightMipmap1 * 4;
buffer = reinterpret_cast<unsigned char*>( malloc( bufferSize ) );
PixelData pixelDataMipmap1 = PixelData::New( buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE );
- texture.Upload( pixelDataMipmap1, CubeMap::NEGATIVE_X, 1u, 0u, 0u, widthMipmap1, heightMipmap1 );
+ texture.Upload( pixelDataMipmap1, CubeMapLayer::NEGATIVE_X, 1u, 0u, 0u, widthMipmap1, heightMipmap1 );
application.SendNotification();
application.Render();
// EXTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
-#include <dali/devel-api/object/property-buffer.h>
-#include <dali/devel-api/rendering/geometry.h>
-#include <dali/devel-api/rendering/texture-set.h>
-#include <dali/devel-api/rendering/renderer.h>
-#include <dali/devel-api/rendering/sampler.h>
-#include <dali/devel-api/rendering/shader.h>
#include <dali/devel-api/images/texture-set-image.h>
#include <iostream>
#include <algorithm>
#ifndef MESH_BUILDER_H
#define MESH_BUILDER_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.
*
*/
+// EXTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
-#include <dali/devel-api/object/property-buffer.h>
-#include <dali/devel-api/rendering/geometry.h>
-#include <dali/devel-api/rendering/texture-set.h>
-#include <dali/devel-api/rendering/sampler.h>
-#include <dali/devel-api/rendering/renderer.h>
namespace Dali
{
// EXTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
#include <dali/devel-api/images/texture-set-image.h>
-#include <dali/devel-api/rendering/renderer.h>
// INTERNAL INCLUDES
#include "mesh-builder.h"
-#ifndef __DALI_TEST_ACTOR_UTILS_H__
-#define __DALI_TEST_ACTOR_UTILS_H__
+#ifndef DALI_TEST_ACTOR_UTILS_H
+#define DALI_TEST_ACTOR_UTILS_H
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
} // namespace Dali
-#endif // __DALI_TEST_ACTOR_UTILS_H__
+#endif // DALI_TEST_ACTOR_UTILS_H
/*
- * Copyright (c) 2014 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.
*/
#include <iostream>
-
#include <stdlib.h>
#include <dali/public-api/dali-core.h>
#include <dali/devel-api/events/hit-test-algorithm.h>
-#include <dali/devel-api/rendering/frame-buffer.h>
#include <dali-test-suite-utils.h>
#include <dali/integration-api/debug.h>
#include <test-native-image.h>
publicapiimagesdir = $(publicapidir)/images
publicapimathdir = $(publicapidir)/math
publicapiobjectdir = $(publicapidir)/object
+publicapirenderingdir = $(publicapidir)/rendering
publicapirendertasksdir = $(publicapidir)/render-tasks
-publicapishadereffectsdir = $(publicapidir)/shader-effects
publicapisignalsdir = $(publicapidir)/signals
-
publicapisizenegotiationdir = $(publicapidir)/size-negotiation
+publicapishadereffectsdir = $(publicapidir)/shader-effects
publicapi_HEADERS = $(public_api_header_files)
publicapiactors_HEADERS = $(public_api_core_actors_header_files)
publicapievents_HEADERS = $(public_api_core_events_header_files)
publicapiimages_HEADERS = $(public_api_core_images_header_files)
publicapimath_HEADERS = $(public_api_core_math_header_files)
-publicapirendertasks_HEADERS = $(public_api_core_render_tasks_header_files)
publicapiobject_HEADERS = $(public_api_core_object_header_files)
+publicapirendering_HEADERS = $(public_api_core_rendering_header_files)
+publicapirendertasks_HEADERS = $(public_api_core_render_tasks_header_files)
+publicapisignals_HEADERS = $(public_api_core_signals_header_files)
publicapisizenegotiation_HEADERS = $(public_api_core_size_negotiation_header_files)
publicapishadereffects_HEADERS = $(public_api_core_shader_effects_header_files)
-publicapisignals_HEADERS = $(public_api_core_signals_header_files)
CLEANFILES = dali-shaders.cpp \
dali-shaders.h
$(devel_api_src_dir)/events/hit-test-algorithm.cpp \
$(devel_api_src_dir)/images/atlas.cpp \
$(devel_api_src_dir)/images/distance-field.cpp \
- $(devel_api_src_dir)/images/pixel-data.cpp \
$(devel_api_src_dir)/images/texture-set-image.cpp \
- $(devel_api_src_dir)/object/property-buffer.cpp \
$(devel_api_src_dir)/object/weak-handle.cpp \
- $(devel_api_src_dir)/rendering/frame-buffer.cpp \
- $(devel_api_src_dir)/rendering/geometry.cpp \
- $(devel_api_src_dir)/rendering/texture.cpp \
- $(devel_api_src_dir)/rendering/texture-set.cpp \
- $(devel_api_src_dir)/rendering/renderer.cpp \
- $(devel_api_src_dir)/rendering/sampler.cpp \
- $(devel_api_src_dir)/rendering/shader.cpp \
$(devel_api_src_dir)/scripting/scripting.cpp \
$(devel_api_src_dir)/signals/signal-delegate.cpp \
$(devel_api_src_dir)/threading/conditional-wait.cpp \
devel_api_core_images_header_files = \
$(devel_api_src_dir)/images/atlas.h \
$(devel_api_src_dir)/images/distance-field.h \
- $(devel_api_src_dir)/images/pixel-data.h \
$(devel_api_src_dir)/images/native-image-interface-extension.h \
$(devel_api_src_dir)/images/texture-set-image.h
devel_api_core_object_header_files = \
- $(devel_api_src_dir)/object/property-buffer.h \
$(devel_api_src_dir)/object/weak-handle.h
-devel_api_core_rendering_header_files = \
- $(devel_api_src_dir)/rendering/frame-buffer.h \
- $(devel_api_src_dir)/rendering/geometry.h \
- $(devel_api_src_dir)/rendering/texture.h \
- $(devel_api_src_dir)/rendering/texture-set.h \
- $(devel_api_src_dir)/rendering/renderer.h \
- $(devel_api_src_dir)/rendering/sampler.h \
- $(devel_api_src_dir)/rendering/shader.h
-
devel_api_core_signals_header_files = \
$(devel_api_src_dir)/signals/signal-delegate.h
-#ifndef __DALI_ATLAS_H__
-#define __DALI_ATLAS_H__
+#ifndef DALI_ATLAS_H
+#define DALI_ATLAS_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.
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/images/image.h>
#include <dali/public-api/images/buffer-image.h>
-#include <dali/devel-api/images/pixel-data.h>
+#include <dali/public-api/images/image.h>
+#include <dali/public-api/images/pixel-data.h>
namespace Dali
{
} // namespace Dali
-#endif // __DALI_ATLAS_H__
+#endif // DALI_ATLAS_H
+++ /dev/null
-#ifndef DALI_RENDERER_H
-#define DALI_RENDERER_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/handle.h> // Dali::Handle
-#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_OBJECT_PROPERTY_START_INDEX
-#include <dali/devel-api/rendering/geometry.h> // Dali::Geometry
-#include <dali/devel-api/rendering/texture-set.h> // Dali::TextureSet
-
-namespace Dali
-{
-
-namespace Internal DALI_INTERNAL
-{
-class Renderer;
-}
-
-namespace FaceCullingMode
-{
-
-/**
- * @brief Set face culling mode.
- * @SINCE_1_1.33
- */
-enum Type
-{
- NONE, ///< None of the faces should be culled
- FRONT, ///< Cull front face, back face should never be shown
- BACK, ///< Cull back face, back face should never be shown
- FRONT_AND_BACK, ///< Cull front and back faces; if the geometry is composed of triangles none of the faces will be shown
-};
-
-} // namespace FaceCullingMode
-
-namespace BlendMode
-{
-
-/**
- * @brief Blend mode.
- * @SINCE_1_1.33
- */
-enum Type
-{
- OFF, ///< Blending is disabled. @SINCE_1_1.33
- AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_1.33
- ON ///< Blending is enabled. @SINCE_1_1.33
-};
-
-} // namespace BlendMode
-
-namespace BlendEquation
-{
-/**
- * @brief Blend Equation.
- *
- * @SINCE_1_0.0
- * @remarks This is an experimental feature and might not be supported in the next release.
- * We do recommend not to use it.
- */
-enum Type
-{
- ADD = 0x8006, ///< The source and destination colors are added to each other. @SINCE_1_0.0
- SUBTRACT = 0x800A, ///< Subtracts the destination from the source. @SINCE_1_0.0
- REVERSE_SUBTRACT = 0x800B ///< Subtracts the source from the destination. @SINCE_1_0.0
-};
-
-} // namespace BlendEquation
-
-namespace BlendFactor
-{
-/**
- * @brief Blend Factor.
- *
- * @SINCE_1_0.0
- * @remarks This is an experimental feature and might not be supported in the next release.
- * We do recommend not to use it.
- */
-enum Type
-{
- ZERO = 0, ///< ZERO @SINCE_1_0.0
- ONE = 1, ///< ONE @SINCE_1_0.0
- SRC_COLOR = 0x0300, ///< SRC_COLOR @SINCE_1_0.0
- ONE_MINUS_SRC_COLOR = 0x0301, ///< ONE_MINUS_SRC_COLOR @SINCE_1_0.0
- SRC_ALPHA = 0x0302, ///< SRC_ALPHA @SINCE_1_0.0
- ONE_MINUS_SRC_ALPHA = 0x0303, ///< ONE_MINUS_SRC_ALPHA @SINCE_1_0.0
- DST_ALPHA = 0x0304, ///< DST_ALPHA @SINCE_1_0.0
- ONE_MINUS_DST_ALPHA = 0x0305, ///< ONE_MINUS_DST_ALPHA @SINCE_1_0.0
- DST_COLOR = 0x0306, ///< DST_COLOR @SINCE_1_0.0
- ONE_MINUS_DST_COLOR = 0x0307, ///< ONE_MINUS_DST_COLOR @SINCE_1_0.0
- SRC_ALPHA_SATURATE = 0x0308, ///< SRC_ALPHA_SATURATE @SINCE_1_0.0
- CONSTANT_COLOR = 0x8001, ///< CONSTANT_COLOR @SINCE_1_0.0
- ONE_MINUS_CONSTANT_COLOR = 0x8002, ///< ONE_MINUS_CONSTANT_COLOR @SINCE_1_0.0
- CONSTANT_ALPHA = 0x8003, ///< CONSTANT_ALPHA @SINCE_1_0.0
- ONE_MINUS_CONSTANT_ALPHA = 0x8004 ///< ONE_MINUS_CONSTANT_ALPHA @SINCE_1_0.0
-};
-
-} // namespace BlendFactor
-
-namespace DepthWriteMode
-{
-
-/**
- * @brief Depth buffer write modes
- */
-enum Type
-{
- OFF, ///< Renderer doesn't write to the depth buffer
- AUTO, ///< Renderer only writes to the depth buffer if it's opaque
- ON ///< Renderer writes to the depth buffer
-};
-
-} // namespace DepthWriteMode
-
-namespace DepthTestMode
-{
-
-/**
- * @brief Depth buffer test (reading) modes.
- */
-enum Type
-{
- OFF, ///< Renderer does not read from the depth buffer @SINCE_1_1.38
- AUTO, ///< Renderer only reads from the depth buffer if in a 3D layer @SINCE_1_1.38
- ON ///< Renderer reads from the depth buffer based on the DepthFunction @SINCE_1_1.38
-};
-
-} // namespace DepthTestMode
-
-namespace DepthFunction
-{
-
-/**
- * @brief Depth functions
- */
-enum Type
-{
- NEVER, ///< Depth test never passes
- ALWAYS, ///< Depth test always passes
- LESS, ///< Depth test passes if the incoming depth value is less than the stored depth value
- GREATER, ///< Depth test passes if the incoming depth value is greater than the stored depth value
- EQUAL, ///< Depth test passes if the incoming depth value is equal to the stored depth value
- NOT_EQUAL, ///< Depth test passes if the incoming depth value is not equal to the stored depth value
- LESS_EQUAL, ///< Depth test passes if the incoming depth value is less than or equal to the stored depth value
- GREATER_EQUAL ///< Depth test passes if the incoming depth value is greater than or equal to the stored depth value
-};
-
-} // namespace DepthFunction
-
-/**
- * @brief Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader
- */
-class DALI_IMPORT_API Renderer : public Handle
-{
-public:
-
- /**
- * @brief An enumeration of properties belonging to the Renderer class.
- */
- struct Property
- {
- enum
- {
- /**
- * @brief name "depthIndex", type INTEGER
- * @note The default value is 0
- */
- DEPTH_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX,
-
- /**
- * @brief name "faceCullingMode", type INTEGER
- * @note The default value is FaceCullingMode::NONE
- */
- FACE_CULLING_MODE,
-
- /**
- * @brief name "blendMode", type INTEGER
- * @note The default value is BlendMode::AUTO
- */
- BLEND_MODE,
-
- /**
- * @brief name "blendEquationRgb", type INTEGER
- * @note The default value is BlendEquation::ADD
- */
- BLEND_EQUATION_RGB,
-
- /**
- * @brief name "blendEquationAlpha", type INTEGER
- * @note The default value is BlendEquation::ADD
- */
- BLEND_EQUATION_ALPHA,
-
- /**
- * @brief name "blendFactorSrcRgb", type INTEGER
- * @note The default value is BlendFactor::SRC_ALPHA
- */
- BLEND_FACTOR_SRC_RGB,
-
- /**
- * @brief name "blendFactorDestRgb", type INTEGER
- * @note The default value is BlendFactor::ONE_MINUS_SRC_ALPHA
- */
- BLEND_FACTOR_DEST_RGB,
-
- /**
- * @brief name "blendFactorSrcAlpha", type INTEGER
- * @note The default value is BlendFactor::ONE
- */
- BLEND_FACTOR_SRC_ALPHA,
-
- /**
- * @brief name "blendFactorDestAlpha", type INTEGER
- * @note The default value is BlendFactor::ONE_MINUS_SRC_ALPHA
- */
- BLEND_FACTOR_DEST_ALPHA,
-
- /**
- * @brief name "blendColor", type VECTOR4
- * @note The default value is Color::TRANSPARENT
- */
- BLEND_COLOR,
-
- /**
- * @brief name "blendPreMultipledAlpha", type BOOLEAN
- * @note The default value is false
- */
- BLEND_PRE_MULTIPLIED_ALPHA,
-
- /**
- * @brief name "indexRangeFirst", type INTEGER
- * @note The default value is 0
- */
- INDEX_RANGE_FIRST,
-
- /**
- * @brief name "indexRangeCount", type INTEGER
- * @note The default (0) means that whole range of indices will be used
- */
- INDEX_RANGE_COUNT,
-
- /**
- * @brief name "depthWriteMode", type INTEGER
- * @see DepthWriteMode
- * @note The default value is DepthWriteMode::AUTO
- */
- DEPTH_WRITE_MODE,
-
- /**
- * @brief name "depthFunction", type INTEGER
- * @see DepthFunction
- * @note The default value is DepthFunction::LESS
- */
- DEPTH_FUNCTION,
-
- /**
- * @brief name "depthTestMode", type INTEGER
- * @see DepthTestMode
- * @note The default value is DepthTestMode::AUTO
- * @SINCE_1_1.38
- */
- DEPTH_TEST_MODE
- };
- };
-
- /**
- * @brief Creates a new Renderer object
- *
- * @param[in] geometry Geometry to be used by this renderer
- * @param[in] shader Shader to be used by this renderer
- */
- static Renderer New( Geometry& geometry, Shader& shader );
-
- /**
- * @brief Default constructor, creates an empty handle
- */
- Renderer();
-
- /**
- * @brief Destructor
- */
- ~Renderer();
-
- /**
- * @brief Copy constructor, creates a new handle to the same object
- *
- * @param[in] handle Handle to an object
- */
- Renderer( const Renderer& handle );
-
- /**
- * @brief Downcast to a renderer handle.
- *
- * If not a renderer the returned renderer handle is left uninitialized.
- * @param[in] handle to an object
- * @return renderer handle or an uninitialized handle
- */
- static Renderer DownCast( BaseHandle handle );
-
- /**
- * @brief Assignment operator, changes this handle to point at the same object
- *
- * @param[in] handle Handle to an object
- * @return Reference to the assigned object
- */
- Renderer& operator=( const Renderer& handle );
-
- /**
- * @brief Sets the geometry to be used by this renderer
- *
- * @param[in] geometry The geometry to be used by this renderer
- */
- void SetGeometry( Geometry& geometry );
-
- /**
- * @brief Gets the geometry used by this renderer
- *
- * @return The geometry used by the renderer
- */
- Geometry GetGeometry() const;
-
- /**
- * @brief Sets effective range of indices to draw from bound index buffer
- * @param [in] firstElement first element to draw
- * @param [in] elementsCount number of elements to draw
- */
- inline void SetIndexRange( int firstElement, int elementsCount )
- {
- SetProperty( Property::INDEX_RANGE_FIRST, firstElement );
- SetProperty( Property::INDEX_RANGE_COUNT, elementsCount );
- }
-
- /**
- * @brief Sets the texture set to be used by this renderer
- *
- * @param[in] textureSet The texture set to be used by this renderer
- */
- void SetTextures( TextureSet& textureSet );
-
- /**
- * @brief Gets the texture set used by this renderer
- *
- * @return The texture set used by the renderer
- */
- TextureSet GetTextures() const;
-
- /**
- * @brief Set the shader used by this renderer
- * @param[in] shader The shader to be used by this renderer
- */
- void SetShader( Shader& shader );
-
- /**
- * @brief Get the shader used by this renderer
- * @return THe shader used by the renderer
- */
- Shader GetShader() const;
-
-public:
- /**
- * @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated Renderer
- */
- explicit DALI_INTERNAL Renderer( Internal::Renderer* pointer );
-};
-
-} //namespace Dali
-
-#endif // DALI_RENDERER_H
#define DALI_BLENDING_OPTIONS_H
/*
- * Copyright (c) 2014 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.
*/
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/renderer.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/math/vector4.h>
namespace Dali
#define __DALI_INTERNAL_SHADER_DATA_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.
// INTERNAL INCLUDES
#include <dali/public-api/object/ref-object.h>
#include <dali/public-api/common/dali-vector.h>
-#include <dali/devel-api/rendering/shader.h> // ShaderHints
+#include <dali/public-api/rendering/shader.h> // ShaderHints
namespace Dali
{
*/
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/renderer.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/internal/common/type-abstraction.h>
namespace Dali
/*
- * Copyright (c) 2014 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.
// INTERNAL INCLUDES
#include <dali/public-api/animation/constraints.h> // for EqualToConstraint
#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/devel-api/scripting/scripting.h>
-#include <dali/devel-api/rendering/renderer.h>
#include <dali/internal/event/animation/constraint-impl.h>
#include <dali/internal/event/common/property-helper.h>
#include <dali/internal/event/effects/shader-effect-impl.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.
#include <dali/internal/event/common/property-buffer-impl.h>
// INTERNAL INCLUDES
-#include <dali/devel-api/object/property-buffer.h>
+#include <dali/public-api/rendering/property-buffer.h>
#include <dali/internal/event/common/stage-impl.h>
#include <dali/internal/update/manager/update-manager.h>
#define DALI_INTERNAL_PROPERTY_BUFFER_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.
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/property-map.h> // Dali::Property::Map
-#include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/render/renderers/render-property-buffer.h>
-#ifndef __DALI_INTERNAL_PIXEL_DATA_H__
-#define __DALI_INTERNAL_PIXEL_DATA_H__
+#ifndef DALI_INTERNAL_PIXEL_DATA_H
+#define DALI_INTERNAL_PIXEL_DATA_H
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
*/
// INTERNAL INCLUDES
-#include <dali/devel-api/images/pixel-data.h>
+#include <dali/public-api/images/pixel-data.h>
#include <dali/public-api/object/base-object.h>
namespace Dali
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
#include <dali/public-api/object/base-object.h>
-#include <dali/devel-api/rendering/frame-buffer.h>
-#include <dali/internal/event/rendering/texture-impl.h>
+#include <dali/public-api/rendering/frame-buffer.h>
#include <dali/internal/event/common/event-thread-services.h>
+#include <dali/internal/event/rendering/texture-impl.h>
namespace Dali
{
#define DALI_INTERNAL_GEOMETRY_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.
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/devel-api/rendering/geometry.h> // Dali::Geometry
+#include <dali/public-api/rendering/geometry.h> // Dali::Geometry
#include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
/*
- * 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.
// INTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
-#include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
#include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
#include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
#include <dali/internal/event/common/property-input-impl.h>
DALI_PROPERTY( "depthWriteMode", INTEGER, true, false, false, Dali::Renderer::Property::DEPTH_WRITE_MODE )
DALI_PROPERTY( "depthFunction", INTEGER, true, false, false, Dali::Renderer::Property::DEPTH_FUNCTION )
DALI_PROPERTY( "depthTestMode", INTEGER, true, false, false, Dali::Renderer::Property::DEPTH_TEST_MODE )
+DALI_PROPERTY( "stencilFunction", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_FUNCTION )
+DALI_PROPERTY( "stencilFunctionMask", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_FUNCTION_MASK )
+DALI_PROPERTY( "stencilFunctionReference", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_FUNCTION_REFERENCE )
+DALI_PROPERTY( "stencilMask", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_MASK )
+DALI_PROPERTY( "stencilMode", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_MODE )
+DALI_PROPERTY( "stencilOperationOnFail", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_OPERATION_ON_FAIL )
+DALI_PROPERTY( "stencilOperationOnZFail", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL )
+DALI_PROPERTY( "stencilOperationOnZPass", INTEGER, true, false, false, Dali::Renderer::Property::STENCIL_OPERATION_ON_Z_PASS )
+DALI_PROPERTY( "writeToColorBuffer", BOOLEAN, true, false, false, Dali::Renderer::Property::WRITE_TO_COLOR_BUFFER )
DALI_PROPERTY_TABLE_END( DEFAULT_OBJECT_PROPERTY_START_INDEX )
const ObjectImplHelper<DEFAULT_PROPERTY_COUNT> RENDERER_IMPL = { DEFAULT_PROPERTY_DETAILS };
}
break;
}
+ default:
+ {
+ break;
+ }
}
}
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
+#include <dali/public-api/rendering/renderer.h> // Dali::Renderer
#include <dali/internal/common/blending-options.h>
#include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
/*
- * 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.
#include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/sampler.h> // Dali::Internal::Sampler
#include <dali/internal/event/common/stage-impl.h>
#include <dali/internal/update/manager/update-manager.h>
#include <dali/internal/render/renderers/render-sampler.h>
#define DALI_INTERNAL_SAMPLER_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.
#include <dali/public-api/actors/sampling.h>
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/devel-api/rendering/sampler.h> // Dali::Sampler
+#include <dali/public-api/rendering/sampler.h> // Dali::Sampler
#include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
/*
- * 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.
// INTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/shader-effects/shader-effect.h> // Dali::ShaderEffect::GeometryHints // TODO: MESH_REWORK REMOVE
-#include <dali/devel-api/rendering/shader.h> // Dali::Shader
#include <dali/devel-api/scripting/scripting.h>
-
#include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
#include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
#include <dali/internal/event/common/thread-local-storage.h>
#define DALI_INTERNAL_SHADER_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.
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/devel-api/rendering/shader.h> // Dali::Shader
+#include <dali/public-api/rendering/shader.h> // Dali::Shader
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
#include <dali/internal/event/resources/resource-ticket.h> // Dali::Internal::ResourceTicketPtr
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/images/pixel.h>
-#include <dali/devel-api/rendering/texture.h> // Dali::Internal::Render::Texture
+#include <dali/public-api/rendering/texture.h> // Dali::Internal::Render::Texture
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/event/images/pixel-data-impl.h>
// INTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
-#include <dali/devel-api/rendering/texture-set.h> // Dali::Internal::Render::TextureSet
#include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
#include <dali/internal/update/manager/update-manager.h>
#include <dali/internal/update/rendering/scene-graph-texture-set.h>
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/devel-api/rendering/texture-set.h> // Dali::TextureSet
+#include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
#include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
*/
#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/internal/render/data-providers/node-data-provider.h>
#include <dali/internal/render/data-providers/property-buffer-data-provider.h>
#include <dali/internal/render/data-providers/uniform-map-data-provider.h>
-#include <dali/internal/render/renderers/render-texture.h>
#include <dali/internal/render/renderers/render-sampler.h>
-#include <dali/devel-api/rendering/renderer.h>
+#include <dali/internal/render/renderers/render-texture.h>
namespace Dali
{
/*
- * Copyright (c) 2014 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.
#include <cstring>
// INTERNAL INCLUDES
-#include <dali/public-api/common/constants.h>
#include <dali/public-api/common/compile-time-assert.h>
+#include <dali/public-api/common/constants.h>
+#include <dali/public-api/rendering/texture-set.h>
#include <dali/integration-api/platform-abstraction.h>
#include <dali/integration-api/debug.h>
#include <dali/internal/render/common/render-manager.h>
-#include <dali/devel-api/rendering/texture-set.h>
namespace Dali
{
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/gl-abstraction.h>
#include <dali/integration-api/gl-defines.h>
-#include <dali/devel-api/rendering/renderer.h>
#include <dali/internal/render/common/performance-monitor.h>
#include <dali/internal/render/gl-resources/texture-units.h>
#include <dali/internal/render/gl-resources/frame-buffer-state-cache.h>
* limitations under the License.
*/
-
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/frame-buffer.h>
-#include <dali/integration-api/resource-declarations.h>
-
+#include <dali/public-api/rendering/frame-buffer.h>
#include <dali/internal/render/gl-resources/context.h>
-#include <dali/integration-api/gl-defines.h>
#include <dali/internal/render/renderers/render-sampler.h>
+#include <dali/integration-api/gl-defines.h>
+#include <dali/integration-api/resource-declarations.h>
namespace Dali
{
#define DALI_INTERNAL_RENDER_GEOMETRY_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.
*/
#include <dali/public-api/common/dali-vector.h>
+#include <dali/public-api/rendering/geometry.h>
#include <dali/devel-api/common/owner-container.h>
-#include <dali/devel-api/rendering/geometry.h>
#include <dali/internal/common/owner-pointer.h>
-#include <dali/integration-api/gl-defines.h>
#include <dali/internal/common/buffer-index.h>
#include <dali/internal/common/owner-pointer.h>
#include <dali/integration-api/gl-abstraction.h>
-#include <dali/devel-api/rendering/geometry.h>
-
+#include <dali/integration-api/gl-defines.h>
namespace Dali
{
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/actors/sampling.h>
-#include <dali/devel-api/rendering/sampler.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/rendering/sampler.h>
#include <dali/internal/common/owner-pointer.h>
#include <dali/internal/render/renderers/render-sampler.h>
#include <dali/internal/render/gl-resources/gpu-buffer.h>
#define __DALI_INTERNAL_RENDER_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.
// INTERNAL INCLUDES
#include <dali/public-api/math/matrix.h>
#include <dali/public-api/math/vector4.h>
-#include <dali/devel-api/rendering/texture-set.h>
+#include <dali/public-api/rendering/texture-set.h>
#include <dali/internal/common/blending-options.h>
#include <dali/internal/common/message.h>
+#include <dali/internal/common/type-abstraction-enums.h>
#include <dali/internal/event/common/property-input-impl.h>
#include <dali/internal/event/effects/shader-declarations.h>
-#include <dali/internal/render/gl-resources/gl-resource-owner.h>
-#include <dali/integration-api/debug.h>
-#include <dali/internal/common/type-abstraction-enums.h>
-#include <dali/internal/update/manager/prepare-render-instructions.h>
#include <dali/internal/render/data-providers/render-data-provider.h>
+#include <dali/internal/render/gl-resources/gl-resource-owner.h>
#include <dali/internal/render/renderers/render-geometry.h>
+#include <dali/internal/update/manager/prepare-render-instructions.h>
+#include <dali/integration-api/debug.h>
namespace Dali
{
#define DALI_INTERNAL_RENDER_SAMPLER_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.
*/
#include <dali/public-api/actors/sampling.h>
-#include <dali/devel-api/rendering/sampler.h>
+#include <dali/public-api/rendering/sampler.h>
#include <dali/internal/render/renderers/render-sampler.h>
namespace Dali
// EXTERNAL INCLUDES
#include <math.h> //floor, log2
-//INTERNAL INCLUDES
-#include <dali/devel-api/rendering/texture.h> // Dali::Texture
-
namespace Dali
{
namespace Internal
#include <string>
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/sampler.h>
-#include <dali/devel-api/rendering/texture.h>
+#include <dali/public-api/rendering/sampler.h>
+#include <dali/public-api/rendering/texture.h>
#include <dali/internal/event/rendering/texture-impl.h>
-#include <dali/integration-api/resource-declarations.h>
-
#include <dali/internal/render/gl-resources/context.h>
-#include <dali/integration-api/gl-defines.h>
#include <dali/internal/render/renderers/render-sampler.h>
+#include <dali/integration-api/gl-defines.h>
+#include <dali/integration-api/resource-declarations.h>
namespace Dali
{
*/
-#include <dali/devel-api/rendering/geometry.h>
-#include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
+#include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/renderer.h> // Dali::Renderer
#include <dali/internal/common/blending-options.h>
#include <dali/internal/common/type-abstraction-enums.h>
#include <dali/internal/event/common/event-thread-services.h>
#include "scene-graph-texture-set.h"
// INTERNAL HEADERS
-#include <dali/devel-api/rendering/texture-set.h>
#include <dali/integration-api/resource-declarations.h>
#include <dali/internal/common/internal-constants.h>
#include <dali/internal/update/resources/texture-metadata.h>
*/
// INTERNAL INCLUDES
-#include <dali/devel-api/rendering/texture-set.h>
+#include <dali/public-api/rendering/texture-set.h>
#include <dali/internal/common/buffer-index.h>
#include <dali/internal/common/message.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/public-api/images/resource-image.h>
#include <dali/public-api/images/nine-patch-image.h>
#include <dali/public-api/images/pixel.h>
+#include <dali/public-api/images/pixel-data.h>
#include <dali/public-api/math/angle-axis.h>
#include <dali/public-api/math/compile-time-math.h>
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/math/vector3.h>
#include <dali/public-api/math/vector4.h>
+
#include <dali/public-api/object/any.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/render-tasks/render-task-list.h>
#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/rendering/frame-buffer.h>
+#include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/property-buffer.h>
+#include <dali/public-api/rendering/renderer.h>
+#include <dali/public-api/rendering/sampler.h>
+#include <dali/public-api/rendering/shader.h>
+#include <dali/public-api/rendering/texture.h>
+#include <dali/public-api/rendering/texture-set.h>
+
#include <dali/public-api/signals/base-signal.h>
#include <dali/public-api/signals/callback.h>
#include <dali/public-api/signals/connection-tracker-interface.h>
$(public_api_src_dir)/events/touch-data.cpp \
$(public_api_src_dir)/images/image.cpp \
$(public_api_src_dir)/images/pixel.cpp \
+ $(public_api_src_dir)/images/pixel-data.cpp \
$(public_api_src_dir)/images/buffer-image.cpp \
$(public_api_src_dir)/images/frame-buffer-image.cpp \
$(public_api_src_dir)/images/encoded-buffer-image.cpp \
$(public_api_src_dir)/object/ref-object.cpp \
$(public_api_src_dir)/render-tasks/render-task.cpp \
$(public_api_src_dir)/render-tasks/render-task-list.cpp \
+ $(public_api_src_dir)/rendering/frame-buffer.cpp \
+ $(public_api_src_dir)/rendering/geometry.cpp \
+ $(public_api_src_dir)/rendering/property-buffer.cpp \
+ $(public_api_src_dir)/rendering/texture.cpp \
+ $(public_api_src_dir)/rendering/texture-set.cpp \
+ $(public_api_src_dir)/rendering/renderer.cpp \
+ $(public_api_src_dir)/rendering/sampler.cpp \
+ $(public_api_src_dir)/rendering/shader.cpp \
$(public_api_src_dir)/shader-effects/shader-effect.cpp \
$(public_api_src_dir)/signals/callback.cpp \
$(public_api_src_dir)/signals/connection-tracker.cpp \
$(public_api_src_dir)/images/image-operations.h \
$(public_api_src_dir)/images/nine-patch-image.h \
$(public_api_src_dir)/images/pixel.h \
+ $(public_api_src_dir)/images/pixel-data.h \
$(public_api_src_dir)/images/resource-image.h \
$(public_api_src_dir)/images/native-image.h \
$(public_api_src_dir)/images/native-image-interface.h
$(public_api_src_dir)/render-tasks/render-task.h \
$(public_api_src_dir)/render-tasks/render-task-list.h
+public_api_core_rendering_header_files = \
+ $(public_api_src_dir)/rendering/frame-buffer.h \
+ $(public_api_src_dir)/rendering/geometry.h \
+ $(public_api_src_dir)/rendering/property-buffer.h \
+ $(public_api_src_dir)/rendering/texture.h \
+ $(public_api_src_dir)/rendering/texture-set.h \
+ $(public_api_src_dir)/rendering/renderer.h \
+ $(public_api_src_dir)/rendering/sampler.h \
+ $(public_api_src_dir)/rendering/shader.h
+
public_api_core_shader_effects_header_files = \
$(public_api_src_dir)/shader-effects/shader-effect.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.
-#ifndef __DALI_PIXEL_DATA_H__
-#define __DALI_PIXEL_DATA_H__
+#ifndef DALI_PIXEL_DATA_H
+#define DALI_PIXEL_DATA_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.
/**
* @brief The PixelData object holds a pixel buffer .
- *
* The PixelData takes over the ownership of the pixel buffer.
* The buffer memory must NOT be released outside of this class, instead, the PixelData object will release it automatically when the reference count falls to zero.
+ *
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API PixelData : public BaseHandle
{
enum ReleaseFunction
{
- FREE, ///< Use free function to release the pixel buffer
- DELETE_ARRAY, ///< Use delete[] operator to release the pixel buffer
+ FREE, ///< Use free function to release the pixel buffer @SINCE_1_1.43
+ DELETE_ARRAY, ///< Use delete[] operator to release the pixel buffer @SINCE_1_1.43
};
/**
* @brief Create a PixelData object.
*
- * @param [in] buffer The raw pixel data.
- * @param [in] bufferSize The size of the buffer in bytes
- * @param [in] width Buffer width in pixels
- * @param [in] height Buffer height in pixels
- * @param [in] pixelFormat The pixel format
- * @param [in] releaseFunction The function used to release the memory.
+ * @SINCE_1_1.43
+ * @param[in] buffer The raw pixel data.
+ * @param[in] bufferSize The size of the buffer in bytes
+ * @param[in] width Buffer width in pixels
+ * @param[in] height Buffer height in pixels
+ * @param[in] pixelFormat The pixel format
+ * @param[in] releaseFunction The function used to release the memory.
*/
static PixelData New( unsigned char* buffer,
unsigned int bufferSize,
/**
* @brief Create an empty handle.
- *
* Use PixelData::New() to create an initialized object.
+ *
+ * @SINCE_1_1.43
*/
PixelData();
/**
* Destructor
+ *
+ * @SINCE_1_1.43
*/
~PixelData();
/**
* @brief This copy constructor is required for (smart) pointer semantics.
*
- * @param [in] handle A reference to the copied handle
+ * @SINCE_1_1.43
+ * @param[in] handle A reference to the copied handle
*/
PixelData(const PixelData& handle);
/**
* @brief This assignment operator is required for (smart) pointer semantics.
*
- * @param [in] rhs A reference to the copied handle
- * @return A reference to this
+ * @SINCE_1_1.43
+ * @param[in] rhs A reference to the copied handle
+ * @return A reference to this object
*/
PixelData& operator=(const PixelData& rhs);
/**
* Get the width of the buffer in pixels.
+ *
+ * @SINCE_1_1.43
* @return The width of the buffer in pixels
*/
unsigned int GetWidth() const;
/**
* Get the height of the buffer in pixels
+ *
+ * @SINCE_1_1.43
* @return The height of the buffer in pixels
*/
unsigned int GetHeight() const;
/**
* Get the pixel format
+ *
+ * @SINCE_1_1.43
* @return The pixel format
*/
Pixel::Format GetPixelFormat() const;
-public: // Not intended for application developers
+public:
- explicit DALI_INTERNAL PixelData( Internal::PixelData* );
+ /**
+ * @brief The constructor
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated PixelData
+ */
+ explicit DALI_INTERNAL PixelData( Internal::PixelData* pointer );
};
} //namespace Dali
-#endif // __DALI_PIXEL_DATA_H__
+#endif // DALI_PIXEL_DATA_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.
// INTERNAL INCLUDES
#include <dali/public-api/common/constants.h>
+#include <dali/public-api/rendering/frame-buffer.h>
#include <dali/internal/event/actors/actor-impl.h>
#include <dali/internal/event/actors/camera-actor-impl.h>
#include <dali/internal/event/render-tasks/render-task-impl.h>
-#include <dali/devel-api/rendering/frame-buffer.h>
namespace Dali
{
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/frame-buffer.h>
+#include <dali/public-api/rendering/frame-buffer.h>
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/frame-buffer-impl.h> // Dali::Internal::FrameBuffer
// INTERNAL INCLUDES
#include <dali/public-api/object/base-handle.h>
-#include <dali/devel-api/rendering/texture.h>
+#include <dali/public-api/rendering/texture.h>
namespace Dali
{
/**
* @brief FrameBuffer is a collection of textures that can be used as the destination for rendering
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API FrameBuffer : public BaseHandle
{
public:
+ /**
+ * @brief Format of the FrameBuffer to be created.
+ * @SINCE_1_1.43
+ */
enum Format
{
- COLOR, ///< Framebuffer will be created with color buffer.
- COLOR_DEPTH, ///< Framebuffer will be created with color and depth buffer
- COLOR_STENCIL, ///< Framebuffer will be created with color and stencil buffer
- COLOR_DEPTH_STENCIL ///< Framebuffer will be created with color, depth and stencil buffer. @note May be not supported in all devices
+ COLOR, ///< Framebuffer will be created with color buffer @SINCE_1_1.43
+ COLOR_DEPTH, ///< Framebuffer will be created with color and depth buffer @SINCE_1_1.43
+ COLOR_STENCIL, ///< Framebuffer will be created with color and stencil buffer @SINCE_1_1.43
+ COLOR_DEPTH_STENCIL ///< Framebuffer will be created with color, depth and stencil buffer. @note May be not supported in all devices @SINCE_1_1.43
};
/**
* @brief Creates a new FrameBuffer object
*
+ * @SINCE_1_1.43
* @param[in] width The width of the FrameBuffer
* @param[in] height The height of the FrameBuffer
* @param[in] format The format of the FrameBuffer
/**
* @brief Destructor
+ * @SINCE_1_1.43
*/
~FrameBuffer();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
FrameBuffer( const FrameBuffer& handle );
/**
* @brief Downcast to a FrameBuffer.
*
+ * @SINCE_1_1.43
* If not the returned handle is left uninitialized.
- * @param[in] handle to an object
+ * @param[in] handle Handle to an object
* @return FrameBuffer handle or an uninitialized handle
*/
static FrameBuffer DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
/**
* @brief Attach the base LOD of a 2D texture to the framebuffer for color rendering
+ *
+ * @SINCE_1_1.43
* @param[in] texture The texture that will be used as output when rendering
* @note The texture has to have the same size than the FrameBuffer
* otherwise it won't be attached
/**
* @brief Attach a texture to the framebuffer for color rendering
+ *
+ * @SINCE_1_1.43
* @param[in] texture The texture that will be used as output when rendering
* @param[in] mipmapLevel The mipmap of the texture to be attached
* @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
/**
* @brief Get the color texture used as output in the FrameBuffer
+ *
+ * @SINCE_1_1.43
* @returns A handle to the texture used as color output, or an uninitialized handle
*/
Texture GetColorTexture();
public:
+
/**
- * @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated FrameBuffer
+ * @brief The constructor.
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated FrameBuffer
*/
explicit DALI_INTERNAL FrameBuffer( Internal::FrameBuffer* pointer );
};
/*
- * 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.
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/geometry.h> // Dali::Geometry
+#include <dali/public-api/rendering/geometry.h> // Dali::Geometry
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/geometry-impl.h> // Dali::Internal::Geometry
#define DALI_GEOMETRY_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.
// INTERNAL INCLUDES
#include <dali/public-api/object/handle.h> // Dali::Handle
#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
-#include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
+#include <dali/public-api/rendering/property-buffer.h> // Dali::PropertyBuffer
namespace Dali
{
/**
* @brief Geometry is handle to an object that can be used to define a geometric elements.
+ *
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API Geometry : public BaseHandle
{
public:
+ /**
+ * @brief Describes the type of geometry, used to determine how the coordinates will be used.
+ * @SINCE_1_1.43
+ */
enum GeometryType
{
- POINTS,
- LINES,
- LINE_LOOP,
- LINE_STRIP,
- TRIANGLES,
- TRIANGLE_FAN,
- TRIANGLE_STRIP
+ POINTS, ///< Individual points @SINCE_1_1.43
+ LINES, ///< Individual lines (made of 2 points each) @SINCE_1_1.43
+ LINE_LOOP, ///< A strip of lines (made of 1 point each) which also joins the first and last point @SINCE_1_1.43
+ LINE_STRIP, ///< A strip of lines (made of 1 point each) @SINCE_1_1.43
+ TRIANGLES, ///< Individual triangles (made of 3 points each) @SINCE_1_1.43
+ TRIANGLE_FAN, ///< A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point) @SINCE_1_1.43
+ TRIANGLE_STRIP ///< A strip of triangles (after the first triangle, following triangles need only 1 point) @SINCE_1_1.43
};
/**
* @brief Creates a new Geometry object
*
- * @return An handle to a newly allocated Geometry
+ * @SINCE_1_1.43
+ * @return A handle to a newly allocated Geometry object
*/
static Geometry New();
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
Geometry();
/**
* @brief Destructor
+ *
+ * @SINCE_1_1.43
*/
~Geometry();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
Geometry( const Geometry& handle );
/**
* @brief Downcast to a geometry.
- *
* If not the returned handle is left uninitialized.
- * @param[in] handle to an object
- * @return geometry handle or an uninitialized handle
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return geometry Handle or an uninitialized handle
*/
static Geometry DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
/**
* @brief Add a PropertyBuffer to be used as source of geometry vertices
*
+ * @SINCE_1_1.43
* @param[in] vertexBuffer PropertyBuffer to be used as source of geometry vertices
* @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove
* this buffer if no longer required
/**
* @brief Retrieve the number of vertex buffers that have been added to this geometry
*
+ * @SINCE_1_1.43
* @return Number of vertex buffers that have been added to this geometry
*/
std::size_t GetNumberOfVertexBuffers() const;
/**
* @brief Remove a vertex buffer
- *
* The index must be between 0 and GetNumberOfVertexBuffers()
*
+ * @SINCE_1_1.43
* @param[in] index Index to the vertex buffer to remove
*/
void RemoveVertexBuffer( std::size_t index );
/**
* @brief Set a the index data to be used as a source of indices for the geometry
- *
* Setting this buffer will cause the geometry to be rendered using indices.
* To unset call SetIndexBuffer with a null pointer or count 0
*
+ * @SINCE_1_1.43
* @param[in] indices Array of indices
* @param[in] count Number of indices in the array
*/
/**
* @brief Set the type of primitives this geometry contains
*
+ * @SINCE_1_1.43
* @param[in] geometryType Type of primitives this geometry contains
*/
void SetGeometryType( GeometryType geometryType );
/**
* @brief Get the type of primitives this geometry contains
- *
* Calling this function sets the property GEOMETRY_TYPE
*
+ * @SINCE_1_1.43
* @return Type of primitives this geometry contains
*/
GeometryType GetGeometryType() const;
public:
+
/**
* @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated Geometry
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated Geometry
*/
explicit DALI_INTERNAL Geometry( Internal::Geometry* pointer );
};
/*
- * 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.
*/
// CLASS HEADER
-#include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
+#include <dali/public-api/rendering/property-buffer.h>
// INTERNAL INCLUDES
-#include <dali/public-api/object/property-map.h> // Dali::Property::Map
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/public-api/object/property-map.h> // Dali::Property::Map
+#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
namespace Dali
{
#define DALI_PROPERTY_BUFFER_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.
// EXTERNAL INCLUDES
#include <cstddef> // std::size_t
-#include <string> // std::string
+#include <string> // std::string
// INTERNAL INCLUDES
-#include <dali/public-api/object/handle.h> // Dali::Handle
+#include <dali/public-api/object/handle.h> // Dali::Handle
#include <dali/public-api/object/property-map.h> // Dali::Property::Map
namespace Dali
* texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices );
* texturedQuadGeometry.SetIndexBuffer( indexData, sizeof(indexData)/sizeof(indexData[0] );
*
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API PropertyBuffer : public BaseHandle
{
/**
* @brief Create a PropertyBuffer
- *
* Static property buffers use less memory.
*
+ * @SINCE_1_1.43
* @param[in] bufferFormat Map of names and types that describes the components of the buffer
* @return Handle to a newly allocated PropertyBuffer
*/
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
PropertyBuffer();
/**
* @brief Destructor
+ *
+ * @SINCE_1_1.43
*/
~PropertyBuffer();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
PropertyBuffer( const PropertyBuffer& handle );
/**
* @brief Downcast to a property buffer handle.
- *
* If not a property buffer the returned property buffer handle is left uninitialized.
- * @param[in] handle to an object
- * @return property buffer handle or an uninitialized handle
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Property buffer handle or an uninitialized handle
*/
static PropertyBuffer DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
* propertyBuffer.SetData( vertices );
* </pre>
*
+ * @SINCE_1_1.43
* @param[in] data A pointer to the data that will be copied to the buffer.
* @param[in] size Number of elements to expand or contract the buffer.
*/
/**
* @brief Get the number of elements in the buffer
*
+ * @SINCE_1_1.43
* @return Number of elements to expand or contract the buffer
*/
std::size_t GetSize() const;
public:
+
/**
* @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated PropertyBuffer
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated PropertyBuffer
*/
explicit DALI_INTERNAL PropertyBuffer( Internal::PropertyBuffer* pointer );
};
/*
- * 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.
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
+#include <dali/public-api/rendering/renderer.h> // Dali::Renderer
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/renderer-impl.h> // Dali::Internal::Renderer
--- /dev/null
+#ifndef DALI_RENDERER_H
+#define DALI_RENDERER_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/handle.h> // Dali::Handle
+#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_OBJECT_PROPERTY_START_INDEX
+#include <dali/public-api/rendering/geometry.h> // Dali::Geometry
+#include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
+
+namespace Dali
+{
+
+namespace Internal DALI_INTERNAL
+{
+class Renderer;
+}
+
+namespace FaceCullingMode
+{
+
+/**
+ * @brief Face culling mode.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ NONE, ///< None of the faces should be culled @SINCE_1_1.43
+ FRONT, ///< Cull front face, back face should never be shown @SINCE_1_1.43
+ BACK, ///< Cull back face, back face should never be shown @SINCE_1_1.43
+ FRONT_AND_BACK, ///< Cull front and back faces; if the geometry is composed of triangles none of the faces will be shown @SINCE_1_1.43
+};
+
+} // namespace FaceCullingMode
+
+namespace BlendMode
+{
+
+/**
+ * @brief Blend mode.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ OFF, ///< Blending is disabled. @SINCE_1_1.43
+ AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_1.43
+ ON ///< Blending is enabled. @SINCE_1_1.43
+};
+
+} // namespace BlendMode
+
+namespace BlendEquation
+{
+
+/**
+ * @brief Blend Equation.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ ADD = 0x8006, ///< The source and destination colors are added to each other. @SINCE_1_1.43
+ SUBTRACT = 0x800A, ///< Subtracts the destination from the source. @SINCE_1_1.43
+ REVERSE_SUBTRACT = 0x800B ///< Subtracts the source from the destination. @SINCE_1_1.43
+};
+
+} // namespace BlendEquation
+
+namespace BlendFactor
+{
+
+/**
+ * @brief Blend Factor.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ ZERO = 0, ///< ZERO @SINCE_1_1.43
+ ONE = 1, ///< ONE @SINCE_1_1.43
+ SRC_COLOR = 0x0300, ///< SRC_COLOR @SINCE_1_1.43
+ ONE_MINUS_SRC_COLOR = 0x0301, ///< ONE_MINUS_SRC_COLOR @SINCE_1_1.43
+ SRC_ALPHA = 0x0302, ///< SRC_ALPHA @SINCE_1_1.43
+ ONE_MINUS_SRC_ALPHA = 0x0303, ///< ONE_MINUS_SRC_ALPHA @SINCE_1_1.43
+ DST_ALPHA = 0x0304, ///< DST_ALPHA @SINCE_1_1.43
+ ONE_MINUS_DST_ALPHA = 0x0305, ///< ONE_MINUS_DST_ALPHA @SINCE_1_1.43
+ DST_COLOR = 0x0306, ///< DST_COLOR @SINCE_1_1.43
+ ONE_MINUS_DST_COLOR = 0x0307, ///< ONE_MINUS_DST_COLOR @SINCE_1_1.43
+ SRC_ALPHA_SATURATE = 0x0308, ///< SRC_ALPHA_SATURATE @SINCE_1_1.43
+ CONSTANT_COLOR = 0x8001, ///< CONSTANT_COLOR @SINCE_1_1.43
+ ONE_MINUS_CONSTANT_COLOR = 0x8002, ///< ONE_MINUS_CONSTANT_COLOR @SINCE_1_1.43
+ CONSTANT_ALPHA = 0x8003, ///< CONSTANT_ALPHA @SINCE_1_1.43
+ ONE_MINUS_CONSTANT_ALPHA = 0x8004 ///< ONE_MINUS_CONSTANT_ALPHA @SINCE_1_1.43
+};
+
+} // namespace BlendFactor
+
+namespace DepthWriteMode
+{
+
+/**
+ * @brief Depth buffer write modes.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ OFF, ///< Renderer doesn't write to the depth buffer @SINCE_1_1.43
+ AUTO, ///< Renderer only writes to the depth buffer if it's opaque @SINCE_1_1.43
+ ON ///< Renderer writes to the depth buffer @SINCE_1_1.43
+};
+
+} // namespace DepthWriteMode
+
+namespace DepthTestMode
+{
+
+/**
+ * @brief Depth buffer test (read) modes.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ OFF, ///< Renderer does not read from the depth buffer @SINCE_1_1.43
+ AUTO, ///< Renderer only reads from the depth buffer if in a 3D layer @SINCE_1_1.43
+ ON ///< Renderer reads from the depth buffer based on the DepthFunction @SINCE_1_1.43
+};
+
+} // namespace DepthTestMode
+
+namespace DepthFunction
+{
+
+/**
+ * @brief Depth functions.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ NEVER, ///< Depth test never passes @SINCE_1_1.43
+ ALWAYS, ///< Depth test always passes @SINCE_1_1.43
+ LESS, ///< Depth test passes if the incoming depth value is less than the stored depth value @SINCE_1_1.43
+ GREATER, ///< Depth test passes if the incoming depth value is greater than the stored depth value @SINCE_1_1.43
+ EQUAL, ///< Depth test passes if the incoming depth value is equal to the stored depth value @SINCE_1_1.43
+ NOT_EQUAL, ///< Depth test passes if the incoming depth value is not equal to the stored depth value @SINCE_1_1.43
+ LESS_EQUAL, ///< Depth test passes if the incoming depth value is less than or equal to the stored depth value @SINCE_1_1.43
+ GREATER_EQUAL ///< Depth test passes if the incoming depth value is greater than or equal to the stored depth value @SINCE_1_1.43
+};
+
+} // namespace DepthFunction
+
+namespace StencilFunction
+{
+
+/**
+ * @brief The comparison function used on the stencil buffer.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ NEVER, ///< Always fails @SINCE_1_1.43
+ LESS, ///< Passes if ( reference & mask ) < ( stencil & mask ) @SINCE_1_1.43
+ EQUAL, ///< Passes if ( reference & mask ) = ( stencil & mask ) @SINCE_1_1.43
+ LESS_EQUAL, ///< Passes if ( reference & mask ) <= ( stencil & mask ) @SINCE_1_1.43
+ GREATER, ///< Passes if ( reference & mask ) > ( stencil & mask ) @SINCE_1_1.43
+ NOT_EQUAL, ///< Passes if ( reference & mask ) != ( stencil & mask ) @SINCE_1_1.43
+ GREATER_EQUAL, ///< Passes if ( reference & mask ) >= ( stencil & mask ) @SINCE_1_1.43
+ ALWAYS, ///< Always passes @SINCE_1_1.43
+};
+
+} // namespace StencilFunction
+
+namespace StencilMode
+{
+
+/**
+ * @brief How the stencil buffer will be managed.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ OFF, ///< Off for this renderer @SINCE_1_1.43
+ AUTO, ///< Managed by the Actor clipping API. This is the default @SINCE_1_1.43
+ ON ///< On for this renderer. Select this to use the Renderer stencil properties to manage behavior. Note that Actor clipping management is bypassed for this renderer @SINCE_1_1.43
+};
+
+} // namespace StencilMode
+
+namespace StencilOperation
+{
+
+/**
+ * @brief Specifies the action to take when the stencil (or depth) test fails during stencil test.
+ * @SINCE_1_1.43
+ */
+enum Type
+{
+ ZERO, ///< Sets the stencil buffer value to 0 @SINCE_1_1.43
+ KEEP, ///< Keeps the current value @SINCE_1_1.43
+ REPLACE, ///< Sets the stencil buffer value to ref, as specified by glStencilFunc @SINCE_1_1.43
+ INCREMENT, ///< Increments the current stencil buffer value. Clamps to the maximum representable unsigned value @SINCE_1_1.43
+ DECREMENT, ///< Decrements the current stencil buffer value. Clamps to 0 @SINCE_1_1.43
+ INVERT, ///< Bitwise inverts the current stencil buffer value @SINCE_1_1.43
+ INCREMENT_WRAP, ///< Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing the maximum representable unsigned value @SINCE_1_1.43
+ DECREMENT_WRAP ///< Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of zero @SINCE_1_1.43
+};
+
+} // namespace StencilOperation
+
+
+/**
+ * @brief Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader
+ *
+ * @SINCE_1_1.43
+ */
+class DALI_IMPORT_API Renderer : public Handle
+{
+public:
+
+ /**
+ * @brief An enumeration of properties belonging to the Renderer class.
+ */
+ struct Property
+ {
+ enum
+ {
+ /**
+ * @brief name "depthIndex", type INTEGER
+ * @note The default value is 0
+ * @SINCE_1_1.43
+ */
+ DEPTH_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX,
+
+ /**
+ * @brief name "faceCullingMode", type INTEGER
+ * @note The default value is FaceCullingMode::NONE
+ * @SINCE_1_1.43
+ */
+ FACE_CULLING_MODE,
+
+ /**
+ * @brief name "blendMode", type INTEGER
+ * @note The default value is BlendMode::AUTO
+ * @SINCE_1_1.43
+ */
+ BLEND_MODE,
+
+ /**
+ * @brief name "blendEquationRgb", type INTEGER
+ * @note The default value is BlendEquation::ADD
+ * @SINCE_1_1.43
+ */
+ BLEND_EQUATION_RGB,
+
+ /**
+ * @brief name "blendEquationAlpha", type INTEGER
+ * @note The default value is BlendEquation::ADD
+ * @SINCE_1_1.43
+ */
+ BLEND_EQUATION_ALPHA,
+
+ /**
+ * @brief name "blendFactorSrcRgb", type INTEGER
+ * @note The default value is BlendFactor::SRC_ALPHA
+ * @SINCE_1_1.43
+ */
+ BLEND_FACTOR_SRC_RGB,
+
+ /**
+ * @brief name "blendFactorDestRgb", type INTEGER
+ * @note The default value is BlendFactor::ONE_MINUS_SRC_ALPHA
+ * @SINCE_1_1.43
+ */
+ BLEND_FACTOR_DEST_RGB,
+
+ /**
+ * @brief name "blendFactorSrcAlpha", type INTEGER
+ * @note The default value is BlendFactor::ONE
+ * @SINCE_1_1.43
+ */
+ BLEND_FACTOR_SRC_ALPHA,
+
+ /**
+ * @brief name "blendFactorDestAlpha", type INTEGER
+ * @note The default value is BlendFactor::ONE_MINUS_SRC_ALPHA
+ * @SINCE_1_1.43
+ */
+ BLEND_FACTOR_DEST_ALPHA,
+
+ /**
+ * @brief name "blendColor", type VECTOR4
+ * @note The default value is Color::TRANSPARENT
+ * @SINCE_1_1.43
+ */
+ BLEND_COLOR,
+
+ /**
+ * @brief name "blendPreMultipledAlpha", type BOOLEAN
+ * @note The default value is false
+ * @SINCE_1_1.43
+ */
+ BLEND_PRE_MULTIPLIED_ALPHA,
+
+ /**
+ * @brief name "indexRangeFirst", type INTEGER
+ * @note The default value is 0
+ * @SINCE_1_1.43
+ */
+ INDEX_RANGE_FIRST,
+
+ /**
+ * @brief name "indexRangeCount", type INTEGER
+ * @note The default (0) means that whole range of indices will be used
+ * @SINCE_1_1.43
+ */
+ INDEX_RANGE_COUNT,
+
+ /**
+ * @brief name "depthWriteMode", type INTEGER
+ * @see DepthWriteMode
+ * @note The default value is DepthWriteMode::AUTO
+ * @SINCE_1_1.43
+ */
+ DEPTH_WRITE_MODE,
+
+ /**
+ * @brief name "depthFunction", type INTEGER
+ * @see DepthFunction
+ * @note The default value is DepthFunction::LESS
+ * @SINCE_1_1.43
+ */
+ DEPTH_FUNCTION,
+
+ /**
+ * @brief name "depthTestMode", type INTEGER
+ * @see DepthTestMode
+ * @note The default value is DepthTestMode::AUTO
+ * @SINCE_1_1.43
+ */
+ DEPTH_TEST_MODE,
+
+ /**
+ * @brief name "stencilFunction", type INTEGER
+ * @see StencilFunction
+ * @note The default value is StencilFunction::ALWAYS
+ * @SINCE_1_1.43
+ */
+ STENCIL_FUNCTION,
+
+ /**
+ * @brief name "stencilFunctionMask", type INTEGER
+ * @note The default value is 0xFF
+ * @SINCE_1_1.43
+ */
+ STENCIL_FUNCTION_MASK,
+
+ /**
+ * @brief name "stencilFunctionReference", type INTEGER
+ * @note The default value is 0
+ * @SINCE_1_1.43
+ */
+ STENCIL_FUNCTION_REFERENCE,
+
+ /**
+ * @brief name "stencilMask", type INTEGER
+ * @note The default value is 0xFF
+ * @SINCE_1_1.43
+ */
+ STENCIL_MASK,
+
+ /**
+ * @brief name "stencilMode", type INTEGER
+ * @see StencilMode
+ * @note The default value is StencilMode::AUTO
+ * @SINCE_1_1.43
+ */
+ STENCIL_MODE,
+
+ /**
+ * @brief name "stencilOperationOnFail", type INTEGER
+ * @see StencilOperation
+ * @note The default value is StencilOperation::KEEP
+ * @SINCE_1_1.43
+ */
+ STENCIL_OPERATION_ON_FAIL,
+
+ /**
+ * @brief name "stencilOperationOnZFail", type INTEGER
+ * @see StencilOperation
+ * @note The default value is StencilOperation::KEEP
+ * @SINCE_1_1.43
+ */
+ STENCIL_OPERATION_ON_Z_FAIL,
+
+ /**
+ * @brief name "stencilOperationOnZPass", type INTEGER
+ * @see StencilOperation
+ * @note The default value is StencilOperation::KEEP
+ * @SINCE_1_1.43
+ */
+ STENCIL_OPERATION_ON_Z_PASS,
+
+ /**
+ * @brief name "writeToColorBuffer", type BOOLEAN
+ * This allows per-renderer control of writing to the color buffer.
+ * For example: This can be turned off to write to the stencil or depth buffers only.
+ * @note The default value is True
+ * @SINCE_1_1.43
+ */
+ WRITE_TO_COLOR_BUFFER
+ };
+ };
+
+ /**
+ * @brief Creates a new Renderer object
+ *
+ * @SINCE_1_1.43
+ * @param[in] geometry Geometry to be used by this renderer
+ * @param[in] shader Shader to be used by this renderer
+ */
+ static Renderer New( Geometry& geometry, Shader& shader );
+
+ /**
+ * @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
+ */
+ Renderer();
+
+ /**
+ * @brief Destructor
+ *
+ * @SINCE_1_1.43
+ */
+ ~Renderer();
+
+ /**
+ * @brief Copy constructor, creates a new handle to the same object
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ */
+ Renderer( const Renderer& handle );
+
+ /**
+ * @brief Downcast to a renderer handle.
+ * If not a renderer the returned renderer handle is left uninitialized.
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Renderer handle or an uninitialized handle
+ */
+ static Renderer DownCast( BaseHandle handle );
+
+ /**
+ * @brief Assignment operator, changes this handle to point at the same object
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Reference to the assigned object
+ */
+ Renderer& operator=( const Renderer& handle );
+
+ /**
+ * @brief Sets the geometry to be used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @param[in] geometry The geometry to be used by this renderer
+ */
+ void SetGeometry( Geometry& geometry );
+
+ /**
+ * @brief Gets the geometry used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @return The geometry used by the renderer
+ */
+ Geometry GetGeometry() const;
+
+ /**
+ * @brief Sets effective range of indices to draw from bound index buffer
+ *
+ * @SINCE_1_1.43
+ * @param[in] firstElement The First element to draw
+ * @param[in] elementsCount The number of elements to draw
+ */
+ inline void SetIndexRange( int firstElement, int elementsCount )
+ {
+ SetProperty( Property::INDEX_RANGE_FIRST, firstElement );
+ SetProperty( Property::INDEX_RANGE_COUNT, elementsCount );
+ }
+
+ /**
+ * @brief Sets the texture set to be used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @param[in] textureSet The texture set to be used by this renderer
+ */
+ void SetTextures( TextureSet& textureSet );
+
+ /**
+ * @brief Gets the texture set used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @return The texture set used by the renderer
+ */
+ TextureSet GetTextures() const;
+
+ /**
+ * @brief Set the shader used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @param[in] shader The shader to be used by this renderer
+ */
+ void SetShader( Shader& shader );
+
+ /**
+ * @brief Get the shader used by this renderer
+ *
+ * @SINCE_1_1.43
+ * @return The shader used by the renderer
+ */
+ Shader GetShader() const;
+
+public:
+
+ /**
+ * @brief The constructor.
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated Renderer
+ */
+ explicit DALI_INTERNAL Renderer( Internal::Renderer* pointer );
+};
+
+} //namespace Dali
+
+#endif // DALI_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.
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/sampler.h> // Dali::Sampler
+#include <dali/public-api/rendering/sampler.h> // Dali::Sampler
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
#define DALI_SAMPLER_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.
*/
// INTERNAL INCLUDES
-#include <dali/public-api/object/handle.h> // Dali::Handle
+#include <dali/public-api/object/handle.h> // Dali::Handle
#include <dali/public-api/actors/sampling.h>
namespace Dali
/**
* @brief Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures
+ *
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API Sampler : public BaseHandle
{
/**
* @brief Creates a new Sampler object
+ *
+ * @SINCE_1_1.43
*/
static Sampler New();
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
Sampler();
/**
* @brief Destructor
+ *
+ * @SINCE_1_1.43
*/
~Sampler();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
Sampler( const Sampler& handle );
/**
* @brief Downcast to a sampler handle.
- *
* If not the returned handle is left uninitialized.
- * @param[in] handle to An object
- * @return handle or an uninitialized handle
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Handle or an uninitialized handle
*/
static Sampler DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
/**
* @brief Set the filter modes for this sampler
+ * Calling this function sets the properties MINIFICATION_FILTER and MAGNIFICATION_FILTER.
*
- * Calling this function sets the properties MINIFICATION_FILTER
- * and MAGNIFICATION_FILTER
- *
+ * @SINCE_1_1.43
* @param[in] minFilter The minification filter that will be used
* @param[in] magFilter The magnification filter that will be used
*/
/**
* @brief Set the wrap modes for this sampler
*
+ * @SINCE_1_1.43
* param[in] uWrap Wrap mode for u coordinates
* param[in] vWrap Wrap mode for v coordinates
*/
/**
* @brief Set the wrap modes for this sampler
*
- * param[in] rWrap Wrap mode in the z direction
- * param[in] sWrap Wrap mode for x direction
- * param[in] tWrap Wrap mode for y direction
+ * @SINCE_1_1.43
+ * param[in] rWrap Wrap mode for the z direction
+ * param[in] sWrap Wrap mode for the x direction
+ * param[in] tWrap Wrap mode for the y direction
*/
void SetWrapMode( WrapMode::Type rWrap, WrapMode::Type sWrap, WrapMode::Type tWrap );
public:
+
/**
* @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated Sampler
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated Sampler
*/
explicit DALI_INTERNAL Sampler( Internal::Sampler* pointer );
};
/*
- * 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.
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/shader.h> // Dali::Shader
+#include <dali/public-api/rendering/shader.h> // Dali::Shader
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
#define DALI_SHADER_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.
#include <string> // std::string
// INTERNAL INCLUDES
-#include <dali/public-api/object/handle.h> // Dali::Handle
+#include <dali/public-api/object/handle.h> // Dali::Handle
#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
/**
* }
* );
* </pre>
+ *
+ * @SINCE_1_1.43
*/
#define DALI_COMPOSE_SHADER(STR) #STR
}
/**
- * @brief Shaders allows custom vertex and color transformations in the GPU
+ * @brief Shaders allows custom vertex and color transformations in the GPU.
+ *
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API Shader : public Handle
{
public:
+
/**
* @brief Hints for rendering/subdividing geometry.
+ * @SINCE_1_1.43
*/
enum ShaderHints
{
- HINT_NONE = 0x00, ///< no hints
- HINT_OUTPUT_IS_TRANSPARENT = 0x01, ///< Might generate transparent alpha from opaque inputs
- HINT_MODIFIES_GEOMETRY = 0x02, ///< Might change position of vertices,
- ///< this option disables any culling optimizations
+ HINT_NONE = 0x00, ///< No hints @SINCE_1_1.43
+ HINT_OUTPUT_IS_TRANSPARENT = 0x01, ///< Might generate transparent alpha from opaque inputs @SINCE_1_1.43
+ HINT_MODIFIES_GEOMETRY = 0x02, ///< Might change position of vertices, this option disables any culling optimizations @SINCE_1_1.43
};
/**
* @brief An enumeration of properties belonging to the Shader class.
+ * @SINCE_1_1.43
*/
struct Property
{
enum
{
- PROGRAM = DEFAULT_OBJECT_PROPERTY_START_INDEX ///< name "program", type MAP; {"vertex":"","fragment":"",hints:"",
- /// "vertexPrefix":"","fragmentPrefix":""}
+ /**
+ * @brief Name: "program", Type: MAP
+ * @note The default value is empty
+ * @note Format: {"vertex":"","fragment":"",hints:"","vertexPrefix":"","fragmentPrefix":""}
+ * @SINCE_1_1.43
+ */
+ PROGRAM = DEFAULT_OBJECT_PROPERTY_START_INDEX
};
};
/**
* @brief Create Shader.
*
- * @param vertexShader code for the effect. If you pass in an empty string, the default version will be used
- * @param fragmentShader code for the effect. If you pass in an empty string, the default version will be used
- * @param hints GeometryHints to define the geometry of the rendered object
+ * @SINCE_1_1.43
+ * @param[in] vertexShader Vertex shader code for the effect. If you pass in an empty string, the default version will be used
+ * @param[in] fragmentShader fragment shader code for the effect. If you pass in an empty string, the default version will be used
+ * @param[in] hints GeometryHints to define the geometry of the rendered object
* @return A handle to a shader effect
*/
static Shader New( const std::string& vertexShader,
const std::string& fragmentShader,
- ShaderHints hints = ShaderHints(HINT_NONE) );
+ ShaderHints hints = ShaderHints( HINT_NONE ) );
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
Shader();
/**
* @brief Destructor
- *
* This is non-virtual since derived Handle types must not contain data or virtual methods.
+ *
+ * @SINCE_1_1.43
*/
~Shader();
/**
* @brief Copy constructor
*
- * @param handle A handle to a Shader object
+ * @SINCE_1_1.43
+ * @param[in] handle A handle to a Shader object
*/
Shader( const Shader& handle );
/**
* @brief Downcast to a shader handle.
- *
* If not a shader the returned shader handle is left uninitialized.
- * @param[in] handle to an object
- * @return shader handle or an uninitialized handle
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Shader handle or an uninitialized handle
*/
static Shader DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
Shader& operator=( const Shader& handle );
-public: // Not intended for application developers
+public:
+
/**
* @brief This constructor is used by Dali New() methods.
- * @param [in] effect A pointer to a newly allocated Dali resource.
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] effect A pointer to a newly allocated Dali resource.
*/
explicit DALI_INTERNAL Shader( Internal::Shader* effect );
};
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/texture-set.h> // Dali::TextureSet
+#include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/texture-set-impl.h> // Dali::Internal::TextureSet
-#include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
-#include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
+#include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
+#include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
namespace Dali
{
#include <cstddef> // std::size_t
// INTERNAL INCLUDES
-#include <dali/public-api/object/handle.h> // Dali::Handle
-#include <dali/devel-api/rendering/sampler.h> // Dali::Sampler
-#include <dali/devel-api/rendering/texture.h> // Dali::Texture
-#include <dali/devel-api/rendering/shader.h> // Dali::Shader
+#include <dali/public-api/object/handle.h> // Dali::Handle
+#include <dali/public-api/rendering/sampler.h> // Dali::Sampler
+#include <dali/public-api/rendering/shader.h> // Dali::Shader
+#include <dali/public-api/rendering/texture.h> // Dali::Texture
namespace Dali
{
}
/**
- * @brief TextureSet is a handle to an object that specifies the set of images used as textures by a renderer
- * The images have to be ordered in the same order they are declared in the shader
+ * @brief TextureSet is a handle to an object that specifies the set of images used as textures by a renderer.
+ * The images have to be ordered in the same order they are declared in the shader.
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API TextureSet : public BaseHandle
{
/**
* @brief Creates a new TextureSet object
*
+ * @SINCE_1_1.43
* @return A handle to a newly allocated TextureSet
*/
static TextureSet New();
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
TextureSet();
/**
* @brief Destructor
+ *
+ * @SINCE_1_1.43
*/
~TextureSet();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
TextureSet( const TextureSet& handle );
/**
* @brief Downcast to a TextureSet handle.
*
+ * @SINCE_1_1.43
* If handle is not a TextureSet, the returned handle is left uninitialized.
- * @param[in] handle to an object
+ * @param[in] handle Handle to an object
* @return TextureSet handle or an uninitialized handle
*/
static TextureSet DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
TextureSet& operator=( const TextureSet& handle );
/**
* @brief Set the texture at position "index"
+ *
+ * @SINCE_1_1.43
* @param[in] index The position in the texture set of the texture
* @param[in] texture The texture
*/
/**
* @brief Get the image at position "index"
+ *
+ * @SINCE_1_1.43
* @param[in] index The position in the texture set of the image
* @return A handle to the image at the the specified position
*/
/**
* @brief Set the sampler to be used by the image at position "index"
+ *
+ * @SINCE_1_1.43
* @param[in] index The position in the texture set of the sampler
* @param[in] sampler The sampler to use
*/
/**
* @brief Set the sampler to be used by the image at position "index"
+ *
+ * @SINCE_1_1.43
* @param[in] index The position in the texture set of the image
* @return A handle to the sampler at the specified position
*/
/**
* @brief Get the number of textures present in the TextureSet
*
+ * @SINCE_1_1.43
* @return The number of textures in the TextureSet
*/
size_t GetTextureCount() const;
public:
+
/**
- * @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated TextureSet
+ * @brief The constructor.
+ * @note Not intended for application developers.
+ * @SINCE_1_1.43
+ * @param[in] pointer A pointer to a newly allocated TextureSet
*/
explicit DALI_INTERNAL TextureSet( Internal::TextureSet* pointer );
};
} //namespace Dali
-
#endif // DALI_TEXTURE_SET_H
*/
// CLASS HEADER
-#include <dali/devel-api/rendering/texture.h> // Dali::Texture
+#include <dali/public-api/rendering/texture.h> // Dali::Texture
// INTERNAL INCLUDES
#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
+#include <dali/internal/event/images/pixel-data-impl.h> // Dali::Internal::PixelData
namespace Dali
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/images/native-image-interface.h>
#include <dali/public-api/images/pixel.h>
-#include <dali/devel-api/images/pixel-data.h>
+#include <dali/public-api/images/pixel-data.h>
namespace Dali
{
namespace TextureType
{
+
/**
* @brief Texture types
+ * @SINCE_1_1.43
*/
enum Type
{
- TEXTURE_2D, ///< One 2D image
- TEXTURE_CUBE ///< Six 2D images arranged in a cube-shape
+ TEXTURE_2D, ///< One 2D image @SINCE_1_1.43
+ TEXTURE_CUBE ///< Six 2D images arranged in a cube-shape @SINCE_1_1.43
};
-}
-namespace CubeMap
+} // namespace TextureType
+
+namespace CubeMapLayer
{
-/**
- * @brief Faces of a cube map
- */
- const unsigned int POSITIVE_X = 0u;
- const unsigned int NEGATIVE_X = 1u;
- const unsigned int POSITIVE_Y = 2u;
- const unsigned int NEGATIVE_Y = 3u;
- const unsigned int POSITIVE_Z = 4u;
- const unsigned int NEGATIVE_Z = 5u;
-}
+
+ /**
+ * @brief Faces of a cube map.
+ * 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
+
+} // namespace CubeMapLayer
/**
- * @brief Texture represents a texture object used as input or output by shaders
+ * @brief Texture represents a texture object used as input or output by shaders.
+ * @SINCE_1_1.43
*/
class DALI_IMPORT_API Texture : public BaseHandle
{
/**
* @brief Creates a new Texture object
*
+ * @SINCE_1_1.43
* @param[in] type The type of the texture
* @param[in] format The format of the pixel data
* @param[in] width The width of the texture
/**
* @brief Creates a new Texture object from a native image
+ *
+ * @SINCE_1_1.43
* @param[in] nativeImageInterface A native image
* @return A handle to a newly allocated Texture
* @note It is not possible to upload data to textures created from a native image using Upload methods
/**
* @brief Default constructor, creates an empty handle
+ *
+ * @SINCE_1_1.43
*/
Texture();
/**
* @brief Destructor
+ *
+ * @SINCE_1_1.43
*/
~Texture();
/**
* @brief Copy constructor, creates a new handle to the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
*/
Texture( const Texture& handle );
/**
* @brief Downcast to a texture.
- *
* If not the returned handle is left uninitialized.
- * @param[in] handle to an object
- * @return texture handle or an uninitialized handle
+ *
+ * @SINCE_1_1.43
+ * @param[in] handle Handle to an object
+ * @return Texture handle or an uninitialized handle
*/
static Texture DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object
*
+ * @SINCE_1_1.43
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
/**
* @brief Upload data to the texture from a PixelData object
+ *
+ * @SINCE_1_1.43
* @param[in] pixelData The pixelData object
* @return True if the PixelData object has compatible pixel format and fits within the texture, false otherwise
*/
/**
* @brief Upload 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
* @param[in] pixelData The pixelData object
- * @param[in] layer Specifies the layer of a cube map or array texture. (Unused for 2D textures)
+ * @param[in] layer Specifies the layer of a cube map or array texture (Unused for 2D textures). @see CubeMapLayer
* @param[in] mipmap Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image
* @param[in] xOffset Specifies an horizontal offset of the rectangular area in the texture that will be updated
* @param[in] yOffset Specifies a vertical offset of the rectangular area in the texture that will be updated
* @param[in] width Specifies the width of the rectangular area in the texture that will be updated
* @param[in] height Specifies the height of the rectangular area in the texture that will be updated
* @return True if the PixelData object has compatible pixel format and fits in the rectangle specified, false otherwise
- * @note Upload does not upsample or downsample pixel data to fit the specified rectangular area in the texture.
*/
bool Upload( PixelData pixelData,
unsigned int layer, unsigned int mipmap,
/**
* @brief Generate 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 de 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;
/**
- * @brief Returns de 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;
public:
+
/**
* @brief The constructor
- *
- * @param [in] pointer A pointer to a newly allocated Texture
+ * @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 );
};