1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

New scope: polar display: optimization

This commit is contained in:
f4exb 2017-02-15 02:52:52 +01:00
parent 534b2ed0cf
commit 93871e8fb2

View File

@ -829,7 +829,13 @@ void GLScopeNG::paintGL()
GLfloat q3[2*(end - start)]; GLfloat q3[2*(end - start)];
const float *trace0 = (*m_traces)[0]; const float *trace0 = (*m_traces)[0];
//memcpy(q3, &(trace0[1]), (2*(end - start) - 1)*sizeof(float)); // copy X values memcpy(q3, &(trace0[1]), (2*(end - start) - 1)*sizeof(float)); // copy X values
// for(int i = start; i < end; i++)
// {
// float x = trace0[2*(i-start)+1];
// q3[2*(i-start)] = x;
// }
for (int i = 1; i < m_traces->size(); i++) for (int i = 1; i < m_traces->size(); i++)
{ {
@ -838,17 +844,7 @@ void GLScopeNG::paintGL()
for(int i = start; i < end; i++) for(int i = start; i < end; i++)
{ {
float x = trace0[2*(i-start)+1];
float y = trace[2*(i-start)+1]; float y = trace[2*(i-start)+1];
if(x > 1.0f)
x = 1.0f;
else if(x < -1.0f)
x = -1.0f;
if(y > 1.0f)
y = 1.0f;
else if(y < -1.0f)
y = -1.0f;
q3[2*(i-start)] = x;
q3[2*(i-start)+1] = y; q3[2*(i-start)+1] = y;
} }