Removing rendering backend
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / stencil-parameters.h
1 #ifndef DALI_INTERNAL_UPDATE_RENDERING_STENCIL_PARAMETERS_H
2 #define DALI_INTERNAL_UPDATE_RENDERING_STENCIL_PARAMETERS_H
3 /*
4  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <dali/public-api/rendering/renderer.h>
20
21 namespace Dali
22 {
23 namespace Internal
24 {
25 namespace SceneGraph
26 {
27
28 /**
29  * @brief Struct to encapsulate stencil parameters required for control of the stencil buffer.
30  */
31 struct StencilParameters
32 {
33   StencilParameters( RenderMode::Type renderMode, StencilFunction::Type stencilFunction, int stencilFunctionMask,
34                      int stencilFunctionReference, int stencilMask, StencilOperation::Type stencilOperationOnFail,
35                      StencilOperation::Type stencilOperationOnZFail, StencilOperation::Type stencilOperationOnZPass )
36   : stencilFunctionMask      ( stencilFunctionMask      ),
37     stencilFunctionReference ( stencilFunctionReference ),
38     stencilMask              ( stencilMask              ),
39     renderMode               ( renderMode               ),
40     stencilFunction          ( stencilFunction          ),
41     stencilOperationOnFail   ( stencilOperationOnFail   ),
42     stencilOperationOnZFail  ( stencilOperationOnZFail  ),
43     stencilOperationOnZPass  ( stencilOperationOnZPass  )
44   {
45   }
46
47   int stencilFunctionMask;                          ///< The stencil function mask
48   int stencilFunctionReference;                     ///< The stencil function reference
49   int stencilMask;                                  ///< The stencil mask
50   RenderMode::Type       renderMode:3;              ///< The render mode
51   StencilFunction::Type  stencilFunction:3;         ///< The stencil function
52   StencilOperation::Type stencilOperationOnFail:3;  ///< The stencil operation for stencil test fail
53   StencilOperation::Type stencilOperationOnZFail:3; ///< The stencil operation for depth test fail
54   StencilOperation::Type stencilOperationOnZPass:3; ///< The stencil operation for depth test pass
55 };
56
57
58 } // namespace SceneGraph
59
60 } // namespace Interanl
61
62 } // namespace Dali
63
64 #endif //DALI_INTERNAL_UPDATE_RENDERING_STENCIL_PARAMETERS_H