mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 09:22:13 -05:00
Use modern OpenGL Qt widget
Use cvfqt::OpenGLWidget and make required changes - move code from paintEvent to paintGL to make grabFrambuffer work - remove obsolete sharedWidget - implement onWidgetOpenGLReady and initialize rendering in this function as OpenGL capabilities is required - simplify snapshotImage to use grabFramebuffer Fix missing include
This commit is contained in:
1 parent
6ce9af1148
commit
8e13d6c528
5 files changed
+55
-150
No files matched your search
@@ -27,10 +27,8 @@
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
#include "RivGridBoxGenerator.h"
|
||||
@@ -60,20 +58,15 @@
|
||||
|
||||
#include "cvfCamera.h"
|
||||
#include "cvfFont.h"
|
||||
#include "cvfOpenGLResourceManager.h"
|
||||
#include "cvfOverlayAxisCross.h"
|
||||
#include "cvfOverlayItem.h"
|
||||
#include "cvfPartRenderHintCollection.h"
|
||||
#include "cvfRenderQueueSorter.h"
|
||||
#include "cvfRenderSequence.h"
|
||||
#include "cvfRendering.h"
|
||||
#include "cvfScene.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
using cvf::ManipulatorTrackball;
|
||||
|
||||
const double RI_MIN_NEARPLANE_DISTANCE = 0.1;
|
||||
@@ -92,8 +85,8 @@ std::unique_ptr<QCursor> RiuViewer::s_hoverCursor;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
|
||||
: caf::Viewer( format, parent )
|
||||
RiuViewer::RiuViewer( QWidget* parent )
|
||||
: caf::Viewer( parent )
|
||||
, m_isNavigationRotationEnabled( true )
|
||||
, m_zScale( 1.0 )
|
||||
{
|
||||
|
||||
@@ -23,15 +23,9 @@
|
||||
#include "RiuInterfaceToViewWindow.h"
|
||||
#include "RiuViewerToViewInterface.h"
|
||||
|
||||
#include "cafFontTools.h"
|
||||
#include "cafMouseState.h"
|
||||
#include "cafPdmInterfacePointer.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafViewer.h"
|
||||
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class RicCommandFeature;
|
||||
@@ -73,7 +67,7 @@ class RiuViewer : public caf::Viewer, public RiuInterfaceToViewWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuViewer( const QGLFormat& format, QWidget* parent );
|
||||
RiuViewer( QWidget* parent );
|
||||
~RiuViewer() override;
|
||||
|
||||
RiuViewer( const RiuViewer& ) = delete;
|
||||
|
||||
Reference in new issue
Block a user