0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and...
[occt.git] / src / Graphic3d / Graphic3d_CView.hxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14#ifndef _Graphic3d_CView_HeaderFile
15#define _Graphic3d_CView_HeaderFile
16
17#include <InterfaceGraphic_Graphic3d.hxx>
18#include <InterfaceGraphic_Visual3d.hxx>
cb389a77 19#include <Graphic3d_TextureEnv.hxx>
b5ac8292 20#include <Graphic3d_Camera.hxx>
21
22#include <Standard_Type.hxx>
12381341 23#include <Graphic3d_CLight.hxx>
51b10cd4 24#include <Graphic3d_SequenceOfHClipPlane.hxx>
bf75be98 25
26class CALL_DEF_VIEWCONTEXT
27{
28
29public:
30
31 CALL_DEF_VIEWCONTEXT()
32 : Aliasing (0),
33 BackZClipping (0),
34 FrontZClipping (0),
35 DepthCueing (0),
36 ZClipFrontPlane (0.0f),
37 ZClipBackPlane (0.0f),
38 DepthFrontPlane (0.0f),
39 DepthBackPlane (0.0f),
40 ZBufferActivity (0),
41 Model (0),
42 Visualization (0),
43 NbActiveLight (0),
44 ActiveLight (NULL),
4269bd1b 45 SurfaceDetail (0),
46 ClipPlanes()
bf75be98 47 {
48 //
49 }
50
51public:
52
53 int Aliasing;
54
55 int BackZClipping;
56 int FrontZClipping;
57
58 int DepthCueing;
59
60 float ZClipFrontPlane;
61 float ZClipBackPlane;
62
63 float DepthFrontPlane;
64 float DepthBackPlane;
65
66 int ZBufferActivity;
67 int Model;
68 int Visualization;
69
70 int NbActiveLight;
12381341 71 Graphic3d_CLight* ActiveLight;
bf75be98 72
bf75be98 73 Handle(Graphic3d_TextureEnv) TextureEnv;
74 int SurfaceDetail;
75
51b10cd4 76 Graphic3d_SequenceOfHClipPlane ClipPlanes;
b5ac8292 77
78 Handle(Graphic3d_Camera) Camera;
bf75be98 79};
80
81class Graphic3d_CView
82{
83
84public:
85
86 Graphic3d_CView()
87 : WsId (-1),
88 ViewId (0),
89 ptrView (NULL),
90 IsDeleted (0),
91 IsOpen (0),
92 Active (0),
93 ptrUnderLayer (NULL),
94 ptrOverLayer (NULL),
bf75be98 95 Backfacing (0),
b5ac8292 96 GContext (NULL),
bf75be98 97 GDisplayCB (NULL),
98 GClientData (NULL),
e276548b 99 ptrFBO (NULL),
100 WasRedrawnGL (0),
101 IsRaytracing (0),
102 IsShadowsEnabled (1),
fc73a202 103 IsReflectionsEnabled (0),
e276548b 104 IsAntialiasingEnabled (0)
bf75be98 105 {
b5ac8292 106 memset(&DefWindow,0,sizeof(DefWindow));
bf75be98 107 }
108
109public:
110
111 int WsId;
112 int ViewId;
113 void* ptrView;
114
115 int IsDeleted;
116 int IsOpen;
117
118 int Active;
119
bf75be98 120 CALL_DEF_VIEWCONTEXT Context;
121
122 CALL_DEF_WINDOW DefWindow;
123
124 void* ptrUnderLayer;
125 void* ptrOverLayer;
126
bf75be98 127 int Backfacing;
128
129 Aspect_RenderingContext GContext;
130 Aspect_GraphicCallbackProc GDisplayCB;
131 void* GClientData;
132
133 void* ptrFBO;
134
e276548b 135 //! Was the window redrawn by standard OpenGL?
136 mutable int WasRedrawnGL;
137
138 //! Enables/disables OpenCL-based ray-tracing.
139 int IsRaytracing;
140
141 //! Enables/disables ray-traced sharp shadows.
142 int IsShadowsEnabled;
143
144 //! Enables/disables ray-traced reflections.
145 int IsReflectionsEnabled;
146
147 //! Enables/disables ray-traced adaptive anti-aliasing.
148 int IsAntialiasingEnabled;
149
bf75be98 150};
151
7fd59977 152const Handle(Standard_Type)& TYPE(Graphic3d_CView);
7fd59977 153
bf75be98 154#endif // Graphic3d_CView_HeaderFile