1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-08-04 23:12:25 -04:00

OpenGL modernization: more GL_DEPRECATED blocks

This commit is contained in:
f4exb 2016-03-05 07:02:06 +01:00
parent f78206defc
commit 2720969a84
4 changed files with 19 additions and 12 deletions

View File

@ -15,8 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_GUI_GLSHADERSIMPLEPOLYLINE_H_ #ifndef INCLUDE_GUI_GLSHADERSIMPLE_H_
#define INCLUDE_GUI_GLSHADERSIMPLEPOLYLINE_H_ #define INCLUDE_GUI_GLSHADERSIMPLE_H_
#include <QString> #include <QString>
@ -47,4 +47,4 @@ private:
static const QString m_fragmentShaderSourceColored; static const QString m_fragmentShaderSourceColored;
}; };
#endif /* INCLUDE_GUI_GLSHADERSIMPLEPOLYLINE_H_ */ #endif /* INCLUDE_GUI_GLSHADERSIMPLE_H_ */

View File

@ -3,6 +3,7 @@
// written by Edouard Griffiths // // written by Edouard Griffiths //
// // // //
// See: http://glslstudio.com/primer/#gl2frag // // See: http://glslstudio.com/primer/#gl2frag //
// https://gitlab.com/pteam/korvins-qtbase/blob/5.4/examples/opengl/cube/mainwidget.cpp //
// // // //
// This program is free software; you can redistribute it and/or modify // // This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by // // it under the terms of the GNU General Public License as published by //

View File

@ -73,8 +73,10 @@ public:
private: private:
struct ChannelMarkerState { struct ChannelMarkerState {
ChannelMarker* m_channelMarker; ChannelMarker* m_channelMarker;
#ifdef GL_DEPRECATED
QRectF m_glRect; QRectF m_glRect;
QRectF m_glRectDsb; QRectF m_glRectDsb;
#endif
QMatrix4x4 m_glMatrixWaterfall; QMatrix4x4 m_glMatrixWaterfall;
QMatrix4x4 m_glMatrixDsbWaterfall; QMatrix4x4 m_glMatrixDsbWaterfall;
QMatrix4x4 m_glMatrixFreqScale; QMatrix4x4 m_glMatrixFreqScale;
@ -84,9 +86,11 @@ private:
QRect m_rect; QRect m_rect;
ChannelMarkerState(ChannelMarker* channelMarker) : ChannelMarkerState(ChannelMarker* channelMarker) :
m_channelMarker(channelMarker), m_channelMarker(channelMarker)
#ifdef GL_DEPRECATED
m_glRect(), m_glRect(),
m_glRectDsb() m_glRectDsb()
#endif
{ } { }
}; };
QList<ChannelMarkerState*> m_channelMarkerStates; QList<ChannelMarkerState*> m_channelMarkerStates;

View File

@ -1774,20 +1774,14 @@ void GLSpectrum::applyChanges()
} }
// draw the effective BW rectangle
dv->m_glRect.setRect(
m_frequencyScale.getPosFromValue(xc + nw) / (float)(width() - leftMargin - rightMargin),
0,
(pw-nw) / (float)m_sampleRate,
1);
// draw the DSB rectangle // draw the DSB rectangle
#ifdef GL_DEPRECATED
dv->m_glRectDsb.setRect( dv->m_glRectDsb.setRect(
m_frequencyScale.getPosFromValue(xc - (dsbw/2)) / (float)(width() - leftMargin - rightMargin), m_frequencyScale.getPosFromValue(xc - (dsbw/2)) / (float)(width() - leftMargin - rightMargin),
0, 0,
dsbw / (float)m_sampleRate, dsbw / (float)m_sampleRate,
1); 1);
#endif
QMatrix4x4 glMatrixDsb; QMatrix4x4 glMatrixDsb;
glMatrixDsb.setToIdentity(); glMatrixDsb.setToIdentity();
glMatrixDsb.translate( glMatrixDsb.translate(
@ -1829,6 +1823,14 @@ void GLSpectrum::applyChanges()
(float) frequencyScaleHeight / (float) height() (float) frequencyScaleHeight / (float) height()
); );
// draw the effective BW rectangle
#ifdef GL_DEPRECATED
dv->m_glRect.setRect(
m_frequencyScale.getPosFromValue(xc + nw) / (float)(width() - leftMargin - rightMargin),
0,
(pw-nw) / (float)m_sampleRate,
1);
#endif
QMatrix4x4 glMatrix; QMatrix4x4 glMatrix;
glMatrix.setToIdentity(); glMatrix.setToIdentity();
glMatrix.translate( glMatrix.translate(