source: GTP/trunk/Lib/Vis/Preprocessing/src/GlobalLinesRenderer.h @ 1949

Revision 1949, 1.4 KB checked in by mattausch, 18 years ago (diff)

worked on depth peeling

RevLine 
[1941]1#ifndef __GLOBALLINESRENDERER_H
2#define __GLOBALLINESRENDERER_H
3
4#include "common.h"
5#include "Containers.h"
6
7class RenderTexture;
8
9namespace GtpVisibilityPreprocessor {
10
11class Beam;
12class Intersectable;
13class Preprocessor;
14class GlRenderer;
15
16struct VssRayContainer;
17
18class GlobalLinesRenderer
19{
20public:
21        /*GlobalLinesRenderer(RenderTexture *buffer1,
22                                                RenderTexture *buffer2,
23                                                Preprocessor *preprocessor,
24                                                GlRenderer *renderer);
25*/
26        GlobalLinesRenderer(Preprocessor *preprocessor, GlRenderer *renderer);
27
28        ~GlobalLinesRenderer();
29
30        void CastGlobalLines(Beam &beam, const int samples);
31
32        void InitGl();
33
34        /** Computes rays from information gained with hw sampling
35        */
36        void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays);
37
38        float GetPixelError(int &pvsSize);
39
40        int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const;
41
42        void RenderObject(Intersectable *obj);
43void DrawGeometry();
44void Run();
[1949]45int mMaxDepth;
[1941]46protected:
47
48        void ProcessDepthBuffer();
49
50        /** Draws the geometry for one pass.
51        */
52       
53
54        void ApplyDepthPeeling(Beam &beam, const int samples);
55
56        void SwitchRenderTextures();
57
58        void SetupProjection(const Vector3 &viewPoint,
59                                                 const Beam &beam);
60
61        RenderTexture *mNewBuffer;
62        RenderTexture *mOldBuffer;
63
64        Preprocessor *mPreprocessor;
65
66        GlRenderer *mRenderer;
67};
68
69extern GlobalLinesRenderer *globalLinesRenderer;
70
71};
72
73#endif
74
Note: See TracBrowser for help on using the repository browser.