1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0022582: Visualization - provide an API for dumping a sub-region of the viewport

Graphic3d_Camera definition has been exended by optional Tile property (Graphic3d_CameraTile structure).
V3d_View::ToPixMap() now performs tiled dump when image size exceeds hardware limits.

OpenGl_View::Redraw() - fixed dump of immediate Z layers in no stereo and no MSAA case.

OpenGl_Context now tracks viewport values.
Draw Harness command vdump has been extended with new argument -tileSize.
This commit is contained in:
osa
2016-08-21 21:55:10 +03:00
committed by bugmaster
parent 1ede545fef
commit 3bffef5524
28 changed files with 827 additions and 327 deletions

View File

@@ -154,6 +154,11 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
myIsGlDebugCtx (Standard_False),
myResolutionRatio (1.0f)
{
myViewport[0] = 0;
myViewport[1] = 0;
myViewport[2] = 0;
myViewport[3] = 0;
// system-dependent fields
#if defined(HAVE_EGL)
myDisplay = (Aspect_Display )EGL_NO_DISPLAY;
@@ -288,6 +293,19 @@ void OpenGl_Context::forcedRelease()
}
}
// =======================================================================
// function : ResizeViewport
// purpose :
// =======================================================================
void OpenGl_Context::ResizeViewport (const Standard_Integer* theRect)
{
core11fwd->glViewport (theRect[0], theRect[1], theRect[2], theRect[3]);
myViewport[0] = theRect[0];
myViewport[1] = theRect[1];
myViewport[2] = theRect[2];
myViewport[3] = theRect[3];
}
#if !defined(GL_ES_VERSION_2_0)
inline Standard_Integer stereoToMonoBuffer (const Standard_Integer theBuffer)
{