MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRenderModelParameters.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace MR
6{
9
10
13{
14public:
15 TransparencyMode() = default;
16 TransparencyMode( bool alphaSort ) :alphaSort_{ alphaSort }
17 {
18 }
19 TransparencyMode( unsigned bgDepthTexId, unsigned fgColorTexId, unsigned fgDepthTexId ) :
20 bgDepthTexId_{ bgDepthTexId },
21 fgColorTexId_{ fgColorTexId },
22 fgDepthTexId_{ fgDepthTexId }
23 {
24 }
25 bool isAlphaSortEnabled() const { return alphaSort_; }
26 bool isDepthPeelingEnabled() const { return !alphaSort_ && bgDepthTexId_ != 0 && fgColorTexId_ != 0 && fgDepthTexId_ != 0; }
27 unsigned getBGDepthPeelingDepthTextureId() const { return bgDepthTexId_; }
28 unsigned getFGDepthPeelingColorTextureId() const { return fgColorTexId_; }
29 unsigned getFGDepthPeelingDepthTextureId() const { return fgDepthTexId_; }
30
31private:
32 bool alphaSort_{ false };
33 unsigned bgDepthTexId_ = 0;
34 unsigned fgColorTexId_ = 0;
35 unsigned fgDepthTexId_ = 0;
36};
37
40{
41 Opaque = 1 << 0,
42 Transparent = 1 << 1,
43 VolumeRendering = 1 << 2,
44 NoDepthTest = 1 << 3,
45
46 All =
48};
50
51}
#define MR_MAKE_FLAG_OPERATORS(T)
Generates operators for a enum (at namespace scope).
Definition MRFlagOperators.h:6
unsigned getFGDepthPeelingDepthTextureId() const
Definition MRRenderModelParameters.h:29
unsigned getBGDepthPeelingDepthTextureId() const
Definition MRRenderModelParameters.h:27
RenderModelPassMask
Various passes of the 3D rendering.
Definition MRRenderModelParameters.h:40
bool isAlphaSortEnabled() const
Definition MRRenderModelParameters.h:25
TransparencyMode(unsigned bgDepthTexId, unsigned fgColorTexId, unsigned fgDepthTexId)
Definition MRRenderModelParameters.h:19
bool isDepthPeelingEnabled() const
Definition MRRenderModelParameters.h:26
unsigned getFGDepthPeelingColorTextureId() const
Definition MRRenderModelParameters.h:28
TransparencyMode(bool alphaSort)
Definition MRRenderModelParameters.h:16
TransparencyMode()=default
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
struct to determine transparent rendering mode
Definition MRRenderModelParameters.h:13