mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-05 22:57:47 -04:00
OpenGL modernization: GLScope modernization completed
This commit is contained in:
parent
8d843939e2
commit
382ee344d3
@ -186,6 +186,9 @@ private:
|
|||||||
GLShaderSimple m_glShaderSimple;
|
GLShaderSimple m_glShaderSimple;
|
||||||
GLShaderTextured m_glShaderLeft1Scale;
|
GLShaderTextured m_glShaderLeft1Scale;
|
||||||
GLShaderTextured m_glShaderBottom1Scale;
|
GLShaderTextured m_glShaderBottom1Scale;
|
||||||
|
GLShaderTextured m_glShaderLeft2Scale;
|
||||||
|
GLShaderTextured m_glShaderBottom2Scale;
|
||||||
|
GLShaderTextured m_glShaderPowerOverlay;
|
||||||
|
|
||||||
void initializeGL();
|
void initializeGL();
|
||||||
void resizeGL(int width, int height);
|
void resizeGL(int width, int height);
|
||||||
|
@ -220,6 +220,9 @@ void GLScope::initializeGL()
|
|||||||
m_glShaderSimple.initializeGL();
|
m_glShaderSimple.initializeGL();
|
||||||
m_glShaderLeft1Scale.initializeGL();
|
m_glShaderLeft1Scale.initializeGL();
|
||||||
m_glShaderBottom1Scale.initializeGL();
|
m_glShaderBottom1Scale.initializeGL();
|
||||||
|
m_glShaderLeft2Scale.initializeGL();
|
||||||
|
m_glShaderBottom2Scale.initializeGL();
|
||||||
|
m_glShaderPowerOverlay.initializeGL();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScope::resizeGL(int width, int height)
|
void GLScope::resizeGL(int width, int height)
|
||||||
@ -348,15 +351,9 @@ void GLScope::paintGL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_mode == ModeIQPolar) {
|
float blue = (m_mode == ModeIQPolar ? 0.25f : 1.0f);
|
||||||
QVector4D color(1.0f, 1.0f, 1.0f, (float) m_displayGridIntensity / 100.0f);
|
QVector4D color(1.0f, 1.0f, blue, (float) m_displayGridIntensity / 100.0f);
|
||||||
m_glShaderSimple.drawSegments(m_glScopeMatrix1, color, q3, 2*effectiveTicks);
|
m_glShaderSimple.drawSegments(m_glScopeMatrix1, color, q3, 2*effectiveTicks);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QVector4D color(1.0f, 1.0f, 1.0f, (float) m_displayGridIntensity / 100.0f);
|
|
||||||
m_glShaderSimple.drawSegments(m_glScopeMatrix1, color, q3, 2*effectiveTicks);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -642,7 +639,7 @@ void GLScope::paintGL()
|
|||||||
float rectW = m_glScopeRect1.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1);
|
float rectW = m_glScopeRect1.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1);
|
||||||
float rectH = -(m_glScopeRect1.height() / 2.0f) * m_amp1;
|
float rectH = -(m_glScopeRect1.height() / 2.0f) * m_amp1;
|
||||||
|
|
||||||
QVector4D color(1.0f, 1.0f, 0.25f, 0.4f);
|
QVector4D color(1.0f, 1.0f, 0.25f, m_displayTraceIntensity / 100.0f);
|
||||||
QMatrix4x4 mat;
|
QMatrix4x4 mat;
|
||||||
mat.setToIdentity();
|
mat.setToIdentity();
|
||||||
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
@ -672,20 +669,6 @@ void GLScope::paintGL()
|
|||||||
// Paint trace 2 (Q) over
|
// Paint trace 2 (Q) over
|
||||||
if (m_displayTrace->size() > 0)
|
if (m_displayTrace->size() > 0)
|
||||||
{
|
{
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect1.x(), m_glScopeRect1.y() + m_glScopeRect1.height() / 2.0, 0);
|
|
||||||
glScalef(m_glScopeRect1.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1), -(m_glScopeRect1.height() / 2) * m_amp2, 1);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(0.25f, 1, 1, m_displayTraceIntensity / 100.0);
|
|
||||||
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
|
||||||
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
|
||||||
if(end - start < 2)
|
|
||||||
start--;
|
|
||||||
float posLimit = 1.0 / m_amp2;
|
|
||||||
float negLimit = -1.0 / m_amp2;
|
|
||||||
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
|
|
||||||
@ -702,6 +685,16 @@ void GLScope::paintGL()
|
|||||||
glEnd();
|
glEnd();
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
||||||
|
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
||||||
|
|
||||||
|
if(end - start < 2) {
|
||||||
|
start--;
|
||||||
|
}
|
||||||
|
|
||||||
|
float posLimit = 1.0 / m_amp2;
|
||||||
|
float negLimit = -1.0 / m_amp2;
|
||||||
|
|
||||||
GLfloat q3[2*(end - start)];
|
GLfloat q3[2*(end - start)];
|
||||||
|
|
||||||
for(int i = start; i < end; i++)
|
for(int i = start; i < end; i++)
|
||||||
@ -714,33 +707,30 @@ void GLScope::paintGL()
|
|||||||
q3[2*i] = i - start;
|
q3[2*i] = i - start;
|
||||||
q3[2*i + 1] = v;
|
q3[2*i + 1] = v;
|
||||||
}
|
}
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectX = m_glScopeRect1.x();
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
float rectY = m_glScopeRect1.y() + m_glScopeRect1.height() / 2.0f;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
float rectW = m_glScopeRect1.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1);
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectH = -(m_glScopeRect1.height() / 2.0f) * m_amp2;
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
QVector4D color(0.25f, 1.0f, 1.0f, m_displayTraceIntensity / 100.0);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
QMatrix4x4 mat;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
mat.setToIdentity();
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
#endif
|
mat.scale(2.0f * rectW, -2.0f * rectH);
|
||||||
|
m_glShaderSimple.drawPolyline(mat, color, q3, end -start);
|
||||||
|
|
||||||
|
// glPushMatrix();
|
||||||
|
// glTranslatef(m_glScopeRect1.x(), m_glScopeRect1.y() + m_glScopeRect1.height() / 2.0, 0);
|
||||||
|
// glScalef(m_glScopeRect1.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1), -(m_glScopeRect1.height() / 2) * m_amp2, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paint secondary grid
|
// Paint secondary grid
|
||||||
// draw rect around
|
// draw rect around
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect1.x(), m_glScopeRect1.y(), 0);
|
|
||||||
glScalef(m_glScopeRect1.width(), m_glScopeRect1.height(), 1);
|
|
||||||
const ScaleEngine::TickList* tickList;
|
const ScaleEngine::TickList* tickList;
|
||||||
const ScaleEngine::Tick* tick;
|
const ScaleEngine::Tick* tick;
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(0.25f, 1, 1, m_displayGridIntensity / 100.0);
|
|
||||||
// Horizontal Y2
|
// Horizontal Y2
|
||||||
tickList = &m_y2Scale.getTickList();
|
tickList = &m_y2Scale.getTickList();
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
@ -774,24 +764,11 @@ void GLScope::paintGL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
QVector4D color(0.25f, 1.0f, 1.0f, (float) m_displayGridIntensity / 100.0f);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
m_glShaderSimple.drawSegments(m_glScopeMatrix1, color, q3, 2*effectiveTicks);
|
||||||
glDrawArrays(GL_LINES, 0, 2*effectiveTicks);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
// Paint secondary scale
|
// Paint secondary scale
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glRight1ScaleRect.x(), m_glRight1ScaleRect.y(), 0);
|
|
||||||
glScalef(m_glRight1ScaleRect.width(), m_glRight1ScaleRect.height(), 1);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_left2ScaleTexture);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord2f(0, 1);
|
glTexCoord2f(0, 1);
|
||||||
@ -817,27 +794,10 @@ void GLScope::paintGL()
|
|||||||
1, 0,
|
1, 0,
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
m_glShaderLeft2Scale.drawSurface(m_glRight1ScaleMatrix, tex1, vtx1, 4);
|
||||||
glEnableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, vtx1);
|
|
||||||
glVertexAttribPointer(GL_TEXTURE_COORD_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
glDisableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, vtx1);
|
|
||||||
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
} // Both displays or primary only
|
} // Both displays or primary only
|
||||||
|
|
||||||
@ -846,13 +806,6 @@ void GLScope::paintGL()
|
|||||||
if ((m_displays == DisplayBoth) || (m_displays == DisplaySecondOnly))
|
if ((m_displays == DisplayBoth) || (m_displays == DisplaySecondOnly))
|
||||||
{
|
{
|
||||||
// draw rect around
|
// draw rect around
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect2.x(), m_glScopeRect2.y(), 0);
|
|
||||||
glScalef(m_glScopeRect2.width(), m_glScopeRect2.height(), 1);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(1, 1, 1, 0.5);
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
glVertex2f(1, 1);
|
glVertex2f(1, 1);
|
||||||
@ -868,28 +821,16 @@ void GLScope::paintGL()
|
|||||||
0, 0,
|
0, 0,
|
||||||
1, 0
|
1, 0
|
||||||
};
|
};
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
QVector4D color(1.0f, 1.0f, 1.0f, 0.5f);
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
m_glShaderSimple.drawContour(m_glScopeMatrix2, color, q3, 4);
|
||||||
glDrawArrays(GL_LINE_LOOP, 0, 4);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
|
||||||
glDrawArrays(GL_LINE_LOOP, 0, 4);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glDisable(GL_BLEND);
|
|
||||||
|
|
||||||
// paint grid
|
// paint grid
|
||||||
const ScaleEngine::TickList* tickList;
|
const ScaleEngine::TickList* tickList;
|
||||||
const ScaleEngine::Tick* tick;
|
const ScaleEngine::Tick* tick;
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(1, 1, 1, m_displayGridIntensity / 100.0);
|
|
||||||
// Horizontal Y2
|
// Horizontal Y2
|
||||||
tickList = &m_y2Scale.getTickList();
|
tickList = &m_y2Scale.getTickList();
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
@ -922,19 +863,12 @@ void GLScope::paintGL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
QVector4D color(1.0f, 1.0f, 1.0f, (float) m_displayGridIntensity / 100.0f);
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
m_glShaderSimple.drawSegments(m_glScopeMatrix2, color, q3, 2*effectiveTicks);
|
||||||
glDrawArrays(GL_LINES, 0, 2*effectiveTicks);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
|
||||||
glDrawArrays(GL_LINES, 0, 2*effectiveTicks);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Vertical X2
|
// Vertical X2
|
||||||
tickList = &m_x2Scale.getTickList();
|
tickList = &m_x2Scale.getTickList();
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
@ -967,31 +901,13 @@ void GLScope::paintGL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
QVector4D color(1.0f, 1.0f, 1.0f, (float) m_displayGridIntensity / 100.0f);
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
m_glShaderSimple.drawSegments(m_glScopeMatrix2, color, q3, 2*effectiveTicks);
|
||||||
glDrawArrays(GL_LINES, 0, 2*effectiveTicks);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
|
||||||
glDrawArrays(GL_LINES, 0, 2*effectiveTicks);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
// paint left #2 scale
|
// paint left #2 scale
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glLeft2ScaleRect.x(), m_glLeft2ScaleRect.y(), 0);
|
|
||||||
glScalef(m_glLeft2ScaleRect.width(), m_glLeft2ScaleRect.height(), 1);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_left2ScaleTexture);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord2f(0, 1);
|
glTexCoord2f(0, 1);
|
||||||
@ -1017,38 +933,12 @@ void GLScope::paintGL()
|
|||||||
1, 0,
|
1, 0,
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
m_glShaderLeft2Scale.drawSurface(m_glLeft2ScaleMatrix, tex1, vtx1, 4);
|
||||||
glEnableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, vtx1);
|
|
||||||
glVertexAttribPointer(GL_TEXTURE_COORD_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
glDisableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, vtx1);
|
|
||||||
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
// paint bottom #2 scale
|
// paint bottom #2 scale
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glBot2ScaleRect.x(), m_glBot2ScaleRect.y(), 0);
|
|
||||||
glScalef(m_glBot2ScaleRect.width(), m_glBot2ScaleRect.height(), 1);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_bot2ScaleTexture);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord2f(0, 1);
|
glTexCoord2f(0, 1);
|
||||||
@ -1074,43 +964,16 @@ void GLScope::paintGL()
|
|||||||
1, 0,
|
1, 0,
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
m_glShaderBottom2Scale.drawSurface(m_glBot2ScaleMatrix, tex1, vtx1, 4);
|
||||||
glEnableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, vtx1);
|
|
||||||
glVertexAttribPointer(GL_TEXTURE_COORD_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
glDisableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, vtx1);
|
|
||||||
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
|
||||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
// paint trigger level #2
|
// paint trigger level #2
|
||||||
if ((m_triggerChannel == ScopeVis::TriggerPhase) || (m_triggerChannel == ScopeVis::TriggerDPhase) || (m_triggerChannel == ScopeVis::TriggerChannelQ))
|
if ((m_triggerChannel == ScopeVis::TriggerPhase)
|
||||||
|
|| (m_triggerChannel == ScopeVis::TriggerDPhase)
|
||||||
|
|| (m_triggerChannel == ScopeVis::TriggerChannelQ))
|
||||||
{
|
{
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect2.x(), m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0);
|
|
||||||
glScalef(m_glScopeRect2.width(), -(m_glScopeRect2.height() / 2) * m_amp2, 1);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
//glEnable(GL_LINE_SMOOTH);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(0, 1, 0, 0.4);
|
|
||||||
|
|
||||||
float posLimit = 1.0 / m_amp2;
|
|
||||||
float negLimit = -1.0 / m_amp2;
|
|
||||||
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
if ((m_triggerChannel == ScopeVis::TriggerChannelQ)
|
if ((m_triggerChannel == ScopeVis::TriggerChannelQ)
|
||||||
@ -1125,51 +988,42 @@ void GLScope::paintGL()
|
|||||||
}
|
}
|
||||||
glEnd();
|
glEnd();
|
||||||
#else
|
#else
|
||||||
if ((m_triggerChannel == ScopeVis::TriggerChannelQ)
|
float posLimit = 1.0 / m_amp2;
|
||||||
|| (m_triggerChannel == ScopeVis::TriggerPhase)
|
float negLimit = -1.0 / m_amp2;
|
||||||
|| (m_triggerChannel == ScopeVis::TriggerDPhase))
|
|
||||||
|
if ((m_triggerLevelDis2 > negLimit) && (m_triggerLevelDis2 < posLimit))
|
||||||
{
|
{
|
||||||
if ((m_triggerLevelDis2 > negLimit) && (m_triggerLevelDis2 < posLimit))
|
GLfloat q3[] {
|
||||||
{
|
0, m_triggerLevelDis2,
|
||||||
GLfloat q3[] {
|
1, m_triggerLevelDis2
|
||||||
0, m_triggerLevelDis2,
|
};
|
||||||
1, m_triggerLevelDis2
|
|
||||||
};
|
float rectX = m_glScopeRect2.x();
|
||||||
#ifdef GL_ANDROID
|
float rectY = m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0f;
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectW = m_glScopeRect2.width();
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
float rectH = -(m_glScopeRect2.height() / 2.0f) * m_amp2;
|
||||||
glDrawArrays(GL_LINES, 0, 2);
|
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
QVector4D color(0.0f, 1.0f, 0.0f, 0.4f);
|
||||||
#else
|
QMatrix4x4 mat;
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
mat.setToIdentity();
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
glDrawArrays(GL_LINES, 0, 2);
|
mat.scale(2.0f * rectW, -2.0f * rectH);
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
m_glShaderSimple.drawSegments(mat, color, q3, 2);
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//glDisable(GL_LINE_SMOOTH);
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// paint trace #2
|
// paint trace #2
|
||||||
if(m_displayTrace->size() > 0) {
|
if(m_displayTrace->size() > 0)
|
||||||
|
{
|
||||||
if (m_mode == ModeIQPolar)
|
if (m_mode == ModeIQPolar)
|
||||||
{
|
{
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect2.x() + m_glScopeRect2.width() / 2.0, m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0);
|
|
||||||
glScalef(m_glScopeRect2.width() / 2, -(m_glScopeRect2.height() / 2), 1);
|
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(1, 1, 0.25f, m_displayTraceIntensity / 100.0);
|
|
||||||
|
|
||||||
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
||||||
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
||||||
if(end - start < 2)
|
|
||||||
|
if (end - start < 2) {
|
||||||
start--;
|
start--;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
@ -1209,37 +1063,27 @@ void GLScope::paintGL()
|
|||||||
q3[2*i] = x;
|
q3[2*i] = x;
|
||||||
q3[2*i+1] = y;
|
q3[2*i+1] = y;
|
||||||
}
|
}
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectX = m_glScopeRect2.x() + m_glScopeRect2.width() / 2.0f;
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
float rectY = m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0f;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
float rectW = m_glScopeRect2.width() / 2.0f;
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectH = -(m_glScopeRect2.height() / 2.0f);
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
QVector4D color(1.0f, 1.0f, 0.25f, m_displayTraceIntensity / 100.0f);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
QMatrix4x4 mat;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
mat.setToIdentity();
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
#endif
|
mat.scale(2.0f * rectW, -2.0f * rectH);
|
||||||
|
m_glShaderSimple.drawPolyline(mat, color, q3, end -start);
|
||||||
|
|
||||||
|
// glPushMatrix();
|
||||||
|
// glTranslatef(m_glScopeRect2.x() + m_glScopeRect2.width() / 2.0, m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0);
|
||||||
|
// glScalef(m_glScopeRect2.width() / 2, -(m_glScopeRect2.height() / 2), 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(m_glScopeRect2.x(), m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0);
|
|
||||||
glScalef(m_glScopeRect2.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1), -(m_glScopeRect2.height() / 2) * m_amp2, 1);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
//glEnable(GL_LINE_SMOOTH);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(1, 1, 0.25f, m_displayTraceIntensity / 100.0);
|
|
||||||
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
|
||||||
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
|
||||||
if(end - start < 2)
|
|
||||||
start--;
|
|
||||||
float posLimit = 1.0 / m_amp2;
|
|
||||||
float negLimit = -1.0 / m_amp2;
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
for(int i = start; i < end; i++) {
|
for(int i = start; i < end; i++) {
|
||||||
@ -1253,6 +1097,16 @@ void GLScope::paintGL()
|
|||||||
glEnd();
|
glEnd();
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
int start = (m_timeOfsProMill/1000.0) * m_displayTrace->size();
|
||||||
|
int end = std::min(start + m_displayTrace->size()/m_timeBase, m_displayTrace->size());
|
||||||
|
|
||||||
|
if (end - start < 2) {
|
||||||
|
start--;
|
||||||
|
}
|
||||||
|
|
||||||
|
float posLimit = 1.0 / m_amp2;
|
||||||
|
float negLimit = -1.0 / m_amp2;
|
||||||
|
|
||||||
GLfloat q3[2*(end - start)];
|
GLfloat q3[2*(end - start)];
|
||||||
|
|
||||||
for(int i = start; i < end; i++) {
|
for(int i = start; i < end; i++) {
|
||||||
@ -1265,21 +1119,24 @@ void GLScope::paintGL()
|
|||||||
q3[2*i] = i - start;
|
q3[2*i] = i - start;
|
||||||
q3[2*i+1] = v;
|
q3[2*i+1] = v;
|
||||||
}
|
}
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectX = m_glScopeRect2.x();
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, q3);
|
float rectY = m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0f;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
float rectW = m_glScopeRect2.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1);
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
float rectH = -(m_glScopeRect2.height() / 2.0f) * m_amp2;
|
||||||
#else
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
QVector4D color(1.0f, 1.0f, 0.25f, m_displayTraceIntensity / 100.0f);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, q3);
|
QMatrix4x4 mat;
|
||||||
glDrawArrays(GL_LINE_STRIP, 0, end - start);
|
mat.setToIdentity();
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
#endif
|
mat.scale(2.0f * rectW, -2.0f * rectH);
|
||||||
|
m_glShaderSimple.drawPolyline(mat, color, q3, end -start);
|
||||||
|
|
||||||
|
// glPushMatrix();
|
||||||
|
// glTranslatef(m_glScopeRect2.x(), m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0);
|
||||||
|
// glScalef(m_glScopeRect2.width() * (float)m_timeBase / (float)(m_displayTrace->size() - 1), -(m_glScopeRect2.height() / 2) * m_amp2, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//glDisable(GL_LINE_SMOOTH);
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Both displays or secondary display only
|
} // Both displays or secondary display only
|
||||||
@ -1529,20 +1386,8 @@ void GLScope::drawPowerOverlay()
|
|||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_powerOverlayTextureAllocated1 = true;
|
m_powerOverlayTextureAllocated1 = true;
|
||||||
|
|
||||||
float shiftX = m_glScopeRect1.width() - ((rect.width() + 4.0f) / width());
|
m_glShaderPowerOverlay.initTexture(m_powerOverlayPixmap1.toImage());
|
||||||
float shiftY = 6.0f / height();
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
|
|
||||||
glTranslatef(m_glScopeRect1.x() + shiftX, m_glScopeRect1.y(), 0);
|
|
||||||
glScalef(rect.width() / (float) width(), rect.height() / (float) height(), 1);
|
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_powerOverlayTexture1);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
#ifdef GL_DEPRECATED
|
#ifdef GL_DEPRECATED
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord2f(0, 1);
|
glTexCoord2f(0, 1);
|
||||||
@ -1568,28 +1413,43 @@ void GLScope::drawPowerOverlay()
|
|||||||
1, 0,
|
1, 0,
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
#ifdef GL_ANDROID
|
|
||||||
glEnableVertexAttribArray(GL_VERTEX_ARRAY);
|
float shiftX = m_glScopeRect1.width() - ((rect.width() + 4.0f) / width());
|
||||||
glEnableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
float rectX = m_glScopeRect1.x() + shiftX;
|
||||||
glVertexAttribPointer(GL_VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, vtx1);
|
float rectY = 0;
|
||||||
glVertexAttribPointer(GL_TEXTURE_COORD_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, tex1);
|
float rectW = rect.width() / (float) width();
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
float rectH = rect.height() / (float) height();
|
||||||
glDisableVertexAttribArray(GL_VERTEX_ARRAY);
|
|
||||||
glDisableVertexAttribArray(GL_TEXTURE_COORD_ARRAY);
|
QMatrix4x4 mat;
|
||||||
#else
|
mat.setToIdentity();
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
mat.translate(-1.0f + 2.0f * rectX, 1.0f - 2.0f * rectY);
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
mat.scale(2.0f * rectW, -2.0f * rectH);
|
||||||
glVertexPointer(2, GL_FLOAT, 0, vtx1);
|
m_glShaderPowerOverlay.drawSurface(mat, tex1, vtx1, 4);
|
||||||
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
// glPushMatrix();
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
//
|
||||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
// glTranslatef(m_glScopeRect1.x() + shiftX, m_glScopeRect1.y(), 0);
|
||||||
#endif
|
// glScalef(rect.width() / (float) width(), rect.height() / (float) height(), 1);
|
||||||
|
//
|
||||||
|
// glBindTexture(GL_TEXTURE_2D, m_powerOverlayTexture1);
|
||||||
|
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||||
|
// glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||||
|
// glEnable(GL_TEXTURE_2D);
|
||||||
|
//
|
||||||
|
// glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
|
// glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
// glVertexPointer(2, GL_FLOAT, 0, vtx1);
|
||||||
|
// glTexCoordPointer(2, GL_FLOAT, 0, tex1);
|
||||||
|
// glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
|
// glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
// glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
// glDisable(GL_TEXTURE_2D);
|
||||||
|
//
|
||||||
|
// glPopMatrix();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScope::applyConfig()
|
void GLScope::applyConfig()
|
||||||
@ -2016,6 +1876,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_left2ScaleTextureAllocated = true;
|
m_left2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderLeft2Scale.initTexture(m_left2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // Y2 scale
|
} // Y2 scale
|
||||||
{ // X2 scale
|
{ // X2 scale
|
||||||
if (m_mode == ModeIQPolar)
|
if (m_mode == ModeIQPolar)
|
||||||
@ -2063,6 +1926,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_bot2ScaleTextureAllocated = true;
|
m_bot2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderBottom2Scale.initTexture(m_bot2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // X2 scale
|
} // X2 scale
|
||||||
}
|
}
|
||||||
else // Horizontal
|
else // Horizontal
|
||||||
@ -2385,6 +2251,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_left2ScaleTextureAllocated = true;
|
m_left2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderLeft2Scale.initTexture(m_left2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // Y2 scale
|
} // Y2 scale
|
||||||
{ // X2 scale
|
{ // X2 scale
|
||||||
if (m_mode == ModeIQPolar)
|
if (m_mode == ModeIQPolar)
|
||||||
@ -2432,6 +2301,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_bot2ScaleTextureAllocated = true;
|
m_bot2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderBottom2Scale.initTexture(m_bot2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // X2 scale
|
} // X2 scale
|
||||||
}
|
}
|
||||||
} // Both displays
|
} // Both displays
|
||||||
@ -2618,6 +2490,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_left2ScaleTextureAllocated = true;
|
m_left2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderLeft2Scale.initTexture(m_left2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // Y2 scale
|
} // Y2 scale
|
||||||
{ // X1 scale
|
{ // X1 scale
|
||||||
m_x1Scale.setSize(scopeWidth);
|
m_x1Scale.setSize(scopeWidth);
|
||||||
@ -2800,6 +2675,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_left2ScaleTextureAllocated = true;
|
m_left2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderLeft2Scale.initTexture(m_left2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // Y2 scale
|
} // Y2 scale
|
||||||
{ // X2 scale
|
{ // X2 scale
|
||||||
if (m_mode == ModeIQPolar)
|
if (m_mode == ModeIQPolar)
|
||||||
@ -2847,6 +2725,9 @@ void GLScope::applyConfig()
|
|||||||
QGLContext::LinearFilteringBindOption |
|
QGLContext::LinearFilteringBindOption |
|
||||||
QGLContext::MipmapBindOption);
|
QGLContext::MipmapBindOption);
|
||||||
m_bot2ScaleTextureAllocated = true;
|
m_bot2ScaleTextureAllocated = true;
|
||||||
|
|
||||||
|
m_glShaderBottom2Scale.initTexture(m_bot2ScalePixmap.toImage());
|
||||||
|
|
||||||
} // X2 scale
|
} // X2 scale
|
||||||
} // Secondary display only
|
} // Secondary display only
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user