1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027813: Visualization - add method V3d_View::DiagnosticInformation() similar to vglinfo command

New method V3d_View::DiagnosticInformation() has been introduced
providing the access to low-level OpenGL context information
for diagnostic automated reports or displaying in application About System.
This commit is contained in:
kgv
2016-08-31 21:06:54 +03:00
committed by mkv
parent e7879c5796
commit 26d9c83516
16 changed files with 480 additions and 47 deletions

View File

@@ -49,6 +49,7 @@ Graphic3d_CView.cxx
Graphic3d_CView.hxx
Graphic3d_DataStructureManager.cxx
Graphic3d_DataStructureManager.hxx
Graphic3d_DiagnosticInfo.hxx
Graphic3d_ExportFormat.hxx
Graphic3d_GraduatedTrihedron.hxx
Graphic3d_GraphicDriver.cxx

View File

@@ -25,6 +25,7 @@
#include <Graphic3d_CLight.hxx>
#include <Graphic3d_CStructure.hxx>
#include <Graphic3d_DataStructureManager.hxx>
#include <Graphic3d_DiagnosticInfo.hxx>
#include <Graphic3d_ExportFormat.hxx>
#include <Graphic3d_GraduatedTrihedron.hxx>
#include <Graphic3d_MapOfStructure.hxx>
@@ -46,6 +47,7 @@
#include <Quantity_NameOfColor.hxx>
#include <Standard_Address.hxx>
#include <Standard_Transient.hxx>
#include <TColStd_IndexedDataMapOfStringString.hxx>
class Graphic3d_CView;
class Graphic3d_GraphicDriver;
@@ -459,6 +461,16 @@ public:
//! Sets list of clip planes for the view.
virtual void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes) = 0;
//! Fill in the dictionary with diagnostic info.
//! Should be called within rendering thread.
//!
//! This API should be used only for user output or for creating automated reports.
//! The format of returned information (e.g. key-value layout)
//! is NOT part of this API and can be changed at any time.
//! Thus application should not parse returned information to weed out specific parameters.
virtual void DiagnosticInformation (TColStd_IndexedDataMapOfStringString& theDict,
Graphic3d_DiagnosticInfo theFlags) const = 0;
private:
//! Adds the structure to display lists of the view.

View File

@@ -0,0 +1,32 @@
// Copyright (c) 2016 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Graphic3d_DiagnosticInfo_HeaderFile
#define _Graphic3d_DiagnosticInfo_HeaderFile
//! Diagnostic info categories bit flags.
enum Graphic3d_DiagnosticInfo
{
Graphic3d_DiagnosticInfo_Device = 0x001, //!< device / vendor / version information
Graphic3d_DiagnosticInfo_FrameBuffer = 0x002, //!< framebuffer information
Graphic3d_DiagnosticInfo_Limits = 0x004, //!< hardware limits
Graphic3d_DiagnosticInfo_Memory = 0x008, //!< memory counters
Graphic3d_DiagnosticInfo_NativePlatform = 0x010, //!< native platform API information (e.g. WGL / GLX / EGL)
Graphic3d_DiagnosticInfo_Extensions = 0x020, //!< vendor extension list (usually very long)
// groups
Graphic3d_DiagnosticInfo_Short = Graphic3d_DiagnosticInfo_Device | Graphic3d_DiagnosticInfo_FrameBuffer | Graphic3d_DiagnosticInfo_Limits, //!< minimal information
Graphic3d_DiagnosticInfo_Basic = Graphic3d_DiagnosticInfo_Short | Graphic3d_DiagnosticInfo_NativePlatform | Graphic3d_DiagnosticInfo_Memory, //!< basic information, without extension list
Graphic3d_DiagnosticInfo_Complete = Graphic3d_DiagnosticInfo_Basic | Graphic3d_DiagnosticInfo_Extensions //!< complete information, including extension list
};
#endif // _Graphic3d_DiagnosticInfo_HeaderFile