MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDepthPeelingGL.h
Go to the documentation of this file.
1#pragma once
2#include "MRViewerFwd.h"
3#include "MRRenderGLHelpers.h"
4
5namespace MR
6{
9
10
12class MRVIEWER_CLASS DepthPeelingGL
13{
14public:
16
19 MRVIEWER_API void reset( const Vector2i& size );
20
23 MRVIEWER_API bool doPasses( FramebufferData* bgFramebuffer );
24
26 MRVIEWER_API void draw();
27
29 int getNumPasses() const { return numPasses_; }
30 void setNumPasses( int passes ) { numPasses_ = passes; }
31private:
32 FramebufferData accumFB_;
34 GlTexture2 nearestDepth_;
35 unsigned nearestDepthFB_ = 0;
36 int numPasses_{ 5 };
37};
38
39}
class to encapsulate depth peeling rendering passes as fall back if alpha sort is not available
Definition MRDepthPeelingGL.h:13
class for easier rendering in framebuffer texture
Definition MRRenderGLHelpers.h:217
represents OpenGL 2D texture owner, and allows uploading data in it remembering texture size
Definition MRRenderGLHelpers.h:68
class for rendering simple texture
Definition MRRenderGLHelpers.h:202
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:59
void draw()
draws this result texture onto
int getNumPasses() const
functions to control number of passes
Definition MRDepthPeelingGL.h:29
void setNumPasses(int passes)
Definition MRDepthPeelingGL.h:30
void reset(const Vector2i &size)
bool doPasses(FramebufferData *bgFramebuffer)
MR_ADD_CTOR_DELETE_MOVE(DepthPeelingGL)
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8