mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-01 17:36:21 +03:00
0032073: Visualization - implement interface to change myToFlipOutput of OpenGl_View
This commit is contained in:
parent
2889518f7a
commit
0b964c5994
@ -89,6 +89,12 @@ public:
|
||||
//! Sets camera used by the view.
|
||||
virtual void SetCamera(const Handle(Graphic3d_Camera)& theCamera) { myCamera = theCamera; }
|
||||
|
||||
//! Returns necessity to flip OY in projection matrix
|
||||
virtual Standard_Boolean ToFlipOutput() const { return Standard_False; }
|
||||
|
||||
//! Sets state of flip OY necessity in projection matrix
|
||||
virtual void SetToFlipOutput(const Standard_Boolean) {}
|
||||
|
||||
public:
|
||||
//! Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default.
|
||||
Graphic3d_TypeOfShadingModel ShadingModel() const { return myRenderParams.ShadingModel; }
|
||||
|
@ -340,6 +340,15 @@ public: //! @name obsolete Graduated Trihedron functionality
|
||||
const Graphic3d_Vec3 theMax)
|
||||
Standard_OVERRIDE;
|
||||
|
||||
//! Returns necessity to flip OY in projection matrix
|
||||
virtual Standard_Boolean ToFlipOutput() const Standard_OVERRIDE { return myToFlipOutput; }
|
||||
|
||||
//! Sets state of flip OY necessity in projection matrix
|
||||
virtual void SetToFlipOutput(const Standard_Boolean theFlip) Standard_OVERRIDE
|
||||
{
|
||||
myToFlipOutput = theFlip;
|
||||
}
|
||||
|
||||
protected: //! @name Internal methods for managing GL resources
|
||||
//! Initializes OpenGl resource for environment texture.
|
||||
void initTextureEnv(const Handle(OpenGl_Context)& theContext);
|
||||
|
@ -11027,6 +11027,20 @@ static Standard_Integer VRenderParams(Draw_Interpretor& theDI,
|
||||
++anArgIter;
|
||||
}
|
||||
}
|
||||
else if (aFlag == "-flip")
|
||||
{
|
||||
if (toPrint)
|
||||
{
|
||||
theDI << (aView->View()->ToFlipOutput() ? "on " : "off ");
|
||||
continue;
|
||||
}
|
||||
Standard_Boolean isToFlipOutput = Standard_False;
|
||||
if (anArgIter + 1 < theArgNb && Draw::ParseOnOff(theArgVec[anArgIter + 1], isToFlipOutput))
|
||||
{
|
||||
aView->View()->SetToFlipOutput(isToFlipOutput);
|
||||
++anArgIter;
|
||||
}
|
||||
}
|
||||
else if (aFlag == "-rendscale" || aFlag == "-renderscale" || aFlag == "-renderresolutionscale")
|
||||
{
|
||||
if (toPrint)
|
||||
@ -14382,7 +14396,7 @@ vrenderparams [-raster] [-shadingModel {unlit|facet|gouraud|phong|pbr|pbr_facet}
|
||||
[-shadows {on|off}=on] [-shadowMapResolution value=1024] [-shadowMapBias value=0.005]
|
||||
[-depthPrePass {on|off}=off] [-alphaToCoverage {on|off}=on]
|
||||
[-frustumCulling {on|off|noupdate}=on] [-lineFeather width=1.0]
|
||||
[-sync {default|views}] [-reset]
|
||||
[-sync {default|views}] [-reset] [-flip {on|off}=off]
|
||||
-raster Disables GPU ray-tracing.
|
||||
-shadingModel Controls shading model.
|
||||
-msaa Specifies number of samples for MSAA.
|
||||
@ -14404,6 +14418,7 @@ vrenderparams [-raster] [-shadingModel {unlit|facet|gouraud|phong|pbr|pbr_facet}
|
||||
sets state to check structures culled previously.
|
||||
-sync Sets active View parameters as Viewer defaults / to other Views.
|
||||
-reset Resets active View parameters to Viewer defaults.
|
||||
-flip Flips View Vertically.
|
||||
|
||||
Diagnostic output (on-screen overlay):
|
||||
vrenderparams [-perfCounters none|fps|cpu|layers|structures|groups|arrays|triangles|points
|
||||
|
Loading…
x
Reference in New Issue
Block a user