mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Change 18603 on 2012/09/11 by fredrik@fredrik_MBP-BootCamp
Added glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); to get proper orientation of textures on point sprites
This commit is contained in:
@@ -414,6 +414,9 @@ void caf::Viewer::paintEvent(QPaintEvent* event)
|
||||
painter.endNativePainting();
|
||||
#endif
|
||||
|
||||
// Call virtual method to allow subclasses to paint on the OpenGlCanvas
|
||||
this->paintOverlayItems(&painter);
|
||||
|
||||
if (m_showPerfInfoHud && isShadersSupported())
|
||||
{
|
||||
cvfqt::PerformanceInfoHud hud;
|
||||
@@ -664,3 +667,12 @@ void caf::Viewer::enableForcedImmediateMode(bool enable)
|
||||
m_mainRendering->renderEngine()->enableForcedImmediateMode(enable);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int caf::Viewer::currentFrameIndex()
|
||||
{
|
||||
if (m_animationControl) return m_animationControl->currentFrame();
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,8 +112,18 @@ public:
|
||||
public slots:
|
||||
virtual void slotSetCurrentFrame(int frameIndex);
|
||||
virtual void slotEndAnimation();
|
||||
int currentFrameIndex();
|
||||
|
||||
protected:
|
||||
// Method to override if painting directly on the OpenGl Canvas is needed.
|
||||
virtual void paintOverlayItems(QPainter* painter) {};
|
||||
|
||||
// Overridable methods to setup the render system
|
||||
virtual void setupMainRendering();
|
||||
virtual void setupRenderingSequence();
|
||||
virtual void optimizeClippingPlanes();
|
||||
|
||||
// Standard overrides. Not for overriding
|
||||
virtual void resizeGL(int width, int height);
|
||||
virtual void paintEvent(QPaintEvent* event);
|
||||
|
||||
@@ -123,13 +133,6 @@ protected:
|
||||
m_navigationPolicy;
|
||||
bool m_navigationPolicyEnabled;
|
||||
|
||||
// Overridable methods to setup the render system
|
||||
virtual void setupMainRendering();
|
||||
virtual void setupRenderingSequence();
|
||||
|
||||
virtual void optimizeClippingPlanes();
|
||||
void updateCamera(int width, int height);
|
||||
|
||||
// Actual rendering objects
|
||||
cvf::ref<cvf::RenderSequence> m_renderingSequence;
|
||||
cvf::ref<cvf::Scene> m_mainScene;
|
||||
@@ -140,6 +143,8 @@ protected:
|
||||
double m_maxFarPlaneDistance;
|
||||
|
||||
private:
|
||||
void updateCamera(int width, int height);
|
||||
|
||||
void releaseOGlResourcesForCurrentFrame();
|
||||
void debugShowRenderingSequencePartNames();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user