#ifndef __GLOBALLINESRENDERER_H #define __GLOBALLINESRENDERER_H #include "common.h" #include "Containers.h" class RenderTexture; namespace GtpVisibilityPreprocessor { class Beam; class Intersectable; class Preprocessor; class GlRenderer; struct VssRayContainer; class GlobalLinesRenderer { public: /*GlobalLinesRenderer(RenderTexture *buffer1, RenderTexture *buffer2, Preprocessor *preprocessor, GlRenderer *renderer); */ GlobalLinesRenderer(Preprocessor *preprocessor, GlRenderer *renderer); ~GlobalLinesRenderer(); void CastGlobalLines(Beam &beam, const int samples); void InitGl(); /** Computes rays from information gained with hw sampling */ void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays); float GetPixelError(int &pvsSize); int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; void RenderObject(Intersectable *obj); void DrawGeometry(); void Run(); protected: void ProcessDepthBuffer(); /** Draws the geometry for one pass. */ void ApplyDepthPeeling(Beam &beam, const int samples); void SwitchRenderTextures(); void SetupProjection(const Vector3 &viewPoint, const Beam &beam); RenderTexture *mNewBuffer; RenderTexture *mOldBuffer; Preprocessor *mPreprocessor; int mMaxDepth; GlRenderer *mRenderer; }; extern GlobalLinesRenderer *globalLinesRenderer; }; #endif