1 | #pragma once
|
---|
2 | #include "RenderingRun.h"
|
---|
3 |
|
---|
4 | /**
|
---|
5 | @brief Base abstract class __declspec( dllexport ) that defines a rendering process of a shadow map.
|
---|
6 |
|
---|
7 | A shadow map stores depth values from the lightsource.
|
---|
8 | */
|
---|
9 | class __declspec( dllexport ) DepthShadowMapRenderingRun : virtual public RenderingRun
|
---|
10 | {
|
---|
11 | public:
|
---|
12 | /**
|
---|
13 | @brief Constructor.
|
---|
14 |
|
---|
15 | @param resolutionX width of the depth map texture
|
---|
16 | @param resolutionY height of the depth map texture
|
---|
17 | */
|
---|
18 | DepthShadowMapRenderingRun( unsigned int resolutionX,
|
---|
19 | unsigned int resolutionY)
|
---|
20 | :RenderingRun(1, 1)
|
---|
21 | {
|
---|
22 | this->resolutionX = resolutionX;
|
---|
23 | this->resolutionY = resolutionY;
|
---|
24 | }
|
---|
25 |
|
---|
26 | virtual ~DepthShadowMapRenderingRun(){}
|
---|
27 |
|
---|
28 | protected:
|
---|
29 | /**
|
---|
30 | @brief width of the depth map texture
|
---|
31 | */
|
---|
32 | unsigned int resolutionX;
|
---|
33 | /**
|
---|
34 | @brief height of the depth map texture
|
---|
35 | */
|
---|
36 | unsigned int resolutionY;
|
---|
37 |
|
---|
38 | /**
|
---|
39 | @brief Creates the depth map texture (2D or CUBE according to light type).
|
---|
40 | */
|
---|
41 | virtual inline void createDepthMap() = 0;
|
---|
42 | /**
|
---|
43 | @brief Updates one face of the depth cubemap (used only in case of point lights).
|
---|
44 |
|
---|
45 | @param facenum the number of the face to be updated
|
---|
46 | */
|
---|
47 | virtual inline void updateDepthCubeFace(int facenum) = 0;
|
---|
48 | /**
|
---|
49 | @brief Updates the depth map (in case of directional and spot lights).
|
---|
50 | */
|
---|
51 | virtual inline void updateDepthMap() = 0;
|
---|
52 | //inherited
|
---|
53 | virtual void updateFrame(unsigned long frameNum) = 0;
|
---|
54 | };
|
---|