Emscripten workarounds and llvm syntax fixes
[platform/core/uifw/dali-core.git] / dali / internal / render / dynamics / scene-graph-dynamics-debug-renderer.h
1 #ifndef __SCENE_GRAPH_DYNAMICS_DEBUG_RENDERER_H__
2 #define __SCENE_GRAPH_DYNAMICS_DEBUG_RENDERER_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // INTERNAL HEADERS
21 #include <dali/internal/common/buffer-index.h>
22 #include <dali/internal/common/message.h>
23 #include <dali/internal/common/owner-pointer.h>
24 #include <dali/internal/render/gl-resources/gpu-buffer.h>
25 #include <dali/integration-api/dynamics/dynamics-debug-vertex.h>
26 #include <dali/public-api/math/vector3.h>
27 #include <dali/public-api/math/vector4.h>
28 #include <dali/public-api/math/matrix.h>
29
30 namespace Dali
31 {
32
33 namespace Internal
34 {
35
36 class Context;
37
38 namespace SceneGraph
39 {
40
41 class Shader;
42
43 /**
44  * Dynamics world debug renderer
45  * Renderers an array of colored line sections
46  */
47 class DynamicsDebugRenderer
48 {
49 public:
50
51   DynamicsDebugRenderer(const Shader& debugShader);
52   virtual ~DynamicsDebugRenderer();
53
54   void Initialize(Context& context);
55   void Render();
56   void UpdateMatrices( BufferIndex bufferIndex, const Matrix& projectionMatrix, const Matrix& viewMatrix );
57   void UpdateBuffer( const Integration::DynamicsDebugVertexContainer& vertices );
58
59 private:
60   Shader& mShader;
61   Context* mContext;
62   BufferIndex mBufferIndex;
63   Matrix mViewMatrix;
64   Matrix mProjectionMatrix;
65   OwnerPointer<GpuBuffer> mBuffer;
66   int mNumberOfPoints;
67 };
68
69 } // namespace SceneGraph
70
71 } // namespace Internal
72
73 } // namespace Dali
74
75 #endif /* __SCENE_GRAPH_DYNAMICS_DEBUG_RENDERER_H__ */