File: CastleGLShadowVolumes.TGLShadowVolumeRenderer.html

package info (click to toggle)
castle-game-engine 5.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 185,428 kB
  • sloc: pascal: 260,781; cpp: 1,363; objc: 713; makefile: 537; xml: 496; sh: 480; php: 4
file content (410 lines) | stat: -rw-r--r-- 29,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleGLShadowVolumes: Class TGLShadowVolumeRenderer</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TGLShadowVolumeRenderer"></a><h1 class="cio">Class TGLShadowVolumeRenderer</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a  href="CastleGLShadowVolumes.html">CastleGLShadowVolumes</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TGLShadowVolumeRenderer = class(<a class="normal" href="Castle3D.TBaseShadowVolumeRenderer.html">TBaseShadowVolumeRenderer</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Shadow volume rendering in OpenGL. This class provides various utilities related to shadow volume rendering. It provides everything, except it doesn't actually render the 3D models or their shadow volumes (actual rendering is provided by <a class="normal" href="Castle3D.T3D.html">T3D</a> descendants, like <a class="normal" href="CastleScene.TCastleScene.html#Render">TCastleScene.Render</a> and <a class="normal" href="CastleScene.TCastleScene.html#RenderShadowVolume">TCastleScene.RenderShadowVolume</a>).

<p>For general usage tutorial of this class, see [<a  href="http://castle-engine.sourceforge.net/vrml_engine_doc/output/xsl/html/chapter.shadows.html">http://castle-engine.sourceforge.net/vrml_engine_doc/output/xsl/html/chapter.shadows.html</a>]</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="ancestor"><a class="normal" href="Castle3D.TBaseShadowVolumeRenderer.html">TBaseShadowVolumeRenderer</a></li>
<li class="thisitem">TGLShadowVolumeRenderer</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#Create">Create</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#GLContextOpen">GLContextOpen</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitFrustumAndLight">InitFrustumAndLight</a></b>( const Frustum: <a  href="CastleFrustum.TFrustum.html">TFrustum</a>; const ALightPosition: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a></b>(const SceneBox: <a  href="CastleBoxes.TBox3D.html">TBox3D</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitSceneDontSetupStencil">InitSceneDontSetupStencil</a></b>(const SceneBox: <a  href="CastleBoxes.TBox3D.html">TBox3D</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitSceneOnlySetupStencil">InitSceneOnlySetupStencil</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitSceneAlwaysVisible">InitSceneAlwaysVisible</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#Render">Render</a></b>( const Params: <a  href="Castle3D.TRenderParams.html">TRenderParams</a>; const Render3D: <a  href="CastleGLShadowVolumes.html#TSVRenderParamsProc">TSVRenderParamsProc</a>; const RenderShadowVolumes: <a  href="CastleGLShadowVolumes.html#TSVRenderProc">TSVRenderProc</a>; const DrawShadowVolumes: boolean);</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#WrapAvailable">WrapAvailable</a></b>: boolean read FWrapAvailable;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#LightPosition">LightPosition</a></b>: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a> read FLightPosition;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#LightPositionDouble">LightPositionDouble</a></b>: <a  href="CastleVectors.html#TVector4Double">TVector4Double</a> read FLightPositionDouble;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#SceneShadowPossiblyVisible">SceneShadowPossiblyVisible</a></b>: boolean
      read FSceneShadowPossiblyVisible;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a></b>: boolean read FZFail;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFailAndLightCap">ZFailAndLightCap</a></b>: boolean read FZFailAndLightCap;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#StencilTwoSided">StencilTwoSided</a></b>: boolean read FStencilTwoSided;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#StencilSetupKind">StencilSetupKind</a></b>: <a  href="CastleGLShadowVolumes.html#TStencilSetupKind">TStencilSetupKind</a>
      read FStencilSetupKind  write FStencilSetupKind
      default ssFrontAndBack;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#Count">Count</a></b>: boolean read FCount write FCount default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountScenes">CountScenes</a></b>: Cardinal read FCountScenes;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountShadowsNotVisible">CountShadowsNotVisible</a></b>: Cardinal read FCountShadowsNotVisible;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountZPass">CountZPass</a></b>: Cardinal read FCountZPass;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountZFailNoLightCap">CountZFailNoLightCap</a></b>: Cardinal read FCountZFailNoLightCap;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountZFailAndLightCap">CountZFailAndLightCap</a></b>: Cardinal read FCountZFailAndLightCap;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLContextOpen"></a><code>procedure <b>GLContextOpen</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Call this when OpenGL context is initialized, this will set some things. For now, this sets StencilOpIncrWrap, StencilOpDecrWrap.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="InitFrustumAndLight"></a><code>procedure <b>InitFrustumAndLight</b>( const Frustum: <a  href="CastleFrustum.TFrustum.html">TFrustum</a>; const ALightPosition: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Call this when camera frustum is known and light position (of the shadow casting light) is known, typically at the beginning of your drawing routine. You have to call this before <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>.

<p>This prepares some things (so that each <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a> call doesn't have to) and all subsequent <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a> calls assume that Frustum and <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#LightPosition">LightPosition</a> are the same.

<p>It also resets <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#CountScenes">CountScenes</a> etc. counters for debug purposes.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="InitScene"></a><code>procedure <b>InitScene</b>(const SceneBox: <a  href="CastleBoxes.TBox3D.html">TBox3D</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Call this when the bounding box of shadow caster is known.

<p>This calculates various things related to shadow volumes rendering of this scene. 1. checks whether you need to render shadow of the object inside SceneBox, settting <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#SceneShadowPossiblyVisible">SceneShadowPossiblyVisible</a>. 2. checks whether <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a> method is needed, setting <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a>.

<p>This assumes that Frustum and <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#LightPosition">LightPosition</a> values given in <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitFrustumAndLight">InitFrustumAndLight</a> are OK.

<p>Also note that after <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitFrustumAndLight">InitFrustumAndLight</a>, all <code>InitScene</code> will assume that they have complete control over glStencilOp states for the time of rendering shadow volumes. In other words: <code>InitScene</code> will setup some stencil configuration, depending on <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a> state and <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#StencilSetupKind">StencilSetupKind</a>. For the sake of speed, we try to avoid setting the same state twice, so we optimize it: first <code>InitScene</code> after <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitFrustumAndLight">InitFrustumAndLight</a> does always setup stencil confguration. Following <code>InitScene</code> will only change stencil configuration if <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a> value will actually change. This means that if e.g. all objects will be detected to be in z-pass method, then stencil configuration will be done only once.

<p>The above optimization works OK if you do not change StencilOp configuration yourself during SV rendering.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="InitSceneDontSetupStencil"></a><code>procedure <b>InitSceneDontSetupStencil</b>(const SceneBox: <a  href="CastleBoxes.TBox3D.html">TBox3D</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
You can split <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a> call into these two calls, first <code>InitSceneDontSetupStencil</code> and then <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitSceneOnlySetupStencil">InitSceneOnlySetupStencil</a>.

<p>This is useful only in very special cases, in particular: if you only have one shadow caster object in your scene. Then you can call <code>InitSceneDontSetupStencil</code> only once, before any drawing, and later you can call <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitSceneOnlySetupStencil">InitSceneOnlySetupStencil</a> multiple times to set stencil configuration for this object.

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="InitSceneOnlySetupStencil"></a><code>procedure <b>InitSceneOnlySetupStencil</b>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="InitSceneAlwaysVisible"></a><code>procedure <b>InitSceneAlwaysVisible</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Initialize scene, assuming shadow caster is always visible. This is an alternative version of <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a> that initializes the same variables as <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>, but assumes that the scene, along with it's shadow, will always be visible. This means that for example <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#SceneShadowPossiblyVisible">SceneShadowPossiblyVisible</a>, <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a>, <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFailAndLightCap">ZFailAndLightCap</a> will always be <code>True</code>.

<p>Use this only if you have a scene that will really be always visible and z-fail will be needed. For example, level scene in FPS games will usually be always visible, so making optimizations in <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a> may be useless. Also, this is useful if for any reason you don't know bounding box of the scene.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Render"></a><code>procedure <b>Render</b>( const Params: <a  href="Castle3D.TRenderParams.html">TRenderParams</a>; const Render3D: <a  href="CastleGLShadowVolumes.html#TSVRenderParamsProc">TSVRenderParamsProc</a>; const RenderShadowVolumes: <a  href="CastleGLShadowVolumes.html#TSVRenderProc">TSVRenderProc</a>; const DrawShadowVolumes: boolean);</code></td>
</tr>
<tr><td colspan="2">
<p>
Do actual rendering with shadow volumes.

<p>You have to provide the appropriate callbacks that render given scene parts.

<p>Params.Transparent and Params.ShadowVolumesReceivers and Params.InShadow are changed here (their previous values are ignored). They cannot be modified by our callbacks.

<p>Render3D renders part of the scene.

<p></p>

<ul class="paragraph_spacing">
  <li><p> With Params.ShadowVolumesReceivers = <code>True</code>, renders only things that may be in the shadow. You should use Params.InShadow to either display the version of the scene in the shadows (so probably darker, probably with some lights off) or the version that is currently lighted (probably brighter, with normal scene lights on).</p></li>
  <li><p> With Params.ShadowVolumesReceivers = <code>False</code>, renders only things that must never be considered in shadow (are not shadow receivers). Params.InShadow is always <code>False</code> when Params.ShadowVolumesReceivers = <code>False</code>.</p></li>
</ul>

<p>

<p>Render3D must also honour Params.Transparent, rendering only opaque or only transparent parts. For Transparent = <code>True</code>, always Params.InShadow = <code>False</code>. Shadow volumes simply don't allow transparent object to function properly as shadow receivers. Reading [<a  href="http://developer.nvidia.com/object/fast_shadow_volumes.html">http://developer.nvidia.com/object/fast_shadow_volumes.html</a>] notes: they also just do separate rendering pass to render the partially-transparent parts, IOW they also note that transparent parts simply don't work at all with shadow volumes.

<p>RenderShadowVolumes renders shadow volumes from shadow casters.

<p>If DrawShadowVolumes then shadow volumes will be also actually drawn to color buffer (as <a class="normal" href="CastleColors.html#Yellow">yellow</a> blended polygons), this is useful for debugging shadow volumes.</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="WrapAvailable"></a><code>property <b>WrapAvailable</b>: boolean read FWrapAvailable;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="LightPosition"></a><code>property <b>LightPosition</b>: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a> read FLightPosition;</code></td>
</tr>
<tr><td colspan="2">
<p>
Light casting shadows position, initialized by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitFrustumAndLight">InitFrustumAndLight</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="LightPositionDouble"></a><code>property <b>LightPositionDouble</b>: <a  href="CastleVectors.html#TVector4Double">TVector4Double</a> read FLightPositionDouble;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SceneShadowPossiblyVisible"></a><code>property <b>SceneShadowPossiblyVisible</b>: boolean
      read FSceneShadowPossiblyVisible;</code></td>
</tr>
<tr><td colspan="2">
<p>
Does the shadow need to be rendered, set by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ZFail"></a><code>property <b>ZFail</b>: boolean read FZFail;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is the <code>ZFail</code> method needed, set by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ZFailAndLightCap"></a><code>property <b>ZFailAndLightCap</b>: boolean read FZFailAndLightCap;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is the <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#ZFail">ZFail</a> with light caps method needed, set by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="StencilTwoSided"></a><code>property <b>StencilTwoSided</b>: boolean read FStencilTwoSided;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is two-sided stencil test (that allows you to make SV in a single pass) available.

<p>This is initialized by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#GLContextOpen">GLContextOpen</a>, and is true if OpenGL provides one of: </p>

<ul class="paragraph_spacing">
  <li><p>glStencilOpSeparate (in OpenGL &gt;= 2.0)</p></li>
  <li><p>GL_ATI_separate_stencil extension, glStencilOpSeparateATI</p></li>
  <li><p>We could also handle GL_EXT_stencil_two_side extension, glActiveStencilFaceEXT. But, since OpenGL &gt;= 2.0 is now common, don't try.</p></li>
</ul>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="StencilSetupKind"></a><code>property <b>StencilSetupKind</b>: <a  href="CastleGLShadowVolumes.html#TStencilSetupKind">TStencilSetupKind</a>
      read FStencilSetupKind  write FStencilSetupKind
      default ssFrontAndBack;</code></td>
</tr>
<tr><td colspan="2">
<p>
What kind of stencil settings should be set by <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#InitScene">InitScene</a>.

<p>Set ssFrontAndBack only if <a class="normal" href="CastleGLShadowVolumes.TGLShadowVolumeRenderer.html#StencilTwoSided">StencilTwoSided</a> is <code>True</code>. Otherwise, you have to use 2-pass method (render everything 2 times, culling front one time, culling back second time) &mdash; in this case use ssFront or ssBack as appropriate.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Count"></a><code>property <b>Count</b>: boolean read FCount write FCount default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Statistics of shadow volumes. They are enabled by default, as calculating them takes practically no time. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CountScenes"></a><code>property <b>CountScenes</b>: Cardinal read FCountScenes;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CountShadowsNotVisible"></a><code>property <b>CountShadowsNotVisible</b>: Cardinal read FCountShadowsNotVisible;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CountZPass"></a><code>property <b>CountZPass</b>: Cardinal read FCountZPass;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CountZFailNoLightCap"></a><code>property <b>CountZFailNoLightCap</b>: Cardinal read FCountZFailNoLightCap;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CountZFailAndLightCap"></a><code>property <b>CountZFailAndLightCap</b>: Cardinal read FCountZFailAndLightCap;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Piwik Code -->

<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:10</em>
</span>
</td></tr></table></body></html>