mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#3947 HoloLens : Add face culling to VdeExportPart
This commit is contained in:
1 parent
5222950476
commit
5014c86a3f
3 files changed
+46
-1
No files matched your search
@@ -44,8 +44,9 @@
|
||||
|
||||
#include "cvfPart.h"
|
||||
#include "cvfRenderState.h"
|
||||
#include "cvfRenderStateTextureBindings.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateCullFace.h"
|
||||
#include "cvfRenderStateTextureBindings.h"
|
||||
#include "cvfTexture.h"
|
||||
#include "cvfTexture2D_FF.h"
|
||||
|
||||
@@ -131,6 +132,23 @@ std::vector<VdeExportPart> RicHoloLensExportImpl::partsForExport(const RimGridVi
|
||||
}
|
||||
}
|
||||
|
||||
if (visiblePart->effect())
|
||||
{
|
||||
const cvf::RenderStateCullFace* renderStateCullFace = dynamic_cast<const cvf::RenderStateCullFace*>(
|
||||
visiblePart->effect()->renderStateOfType(cvf::RenderState::CULL_FACE));
|
||||
if (renderStateCullFace)
|
||||
{
|
||||
if (renderStateCullFace->mode() == cvf::RenderStateCullFace::BACK)
|
||||
{
|
||||
exportPart.setCullFace(VdeExportPart::CF_BACK);
|
||||
}
|
||||
else if (renderStateCullFace->mode() == cvf::RenderStateCullFace::FRONT)
|
||||
{
|
||||
exportPart.setCullFace(VdeExportPart::CF_FRONT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
appendTextureImage(exportPart, visiblePart.p());
|
||||
|
||||
exportParts.push_back(exportPart);
|
||||
|
||||
Reference in new issue
Block a user