From 93871e8fb29cbb8a1029998f45ccf88e588643d5 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 15 Feb 2017 02:52:52 +0100 Subject: [PATCH] New scope: polar display: optimization --- sdrbase/gui/glscopeng.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/sdrbase/gui/glscopeng.cpp b/sdrbase/gui/glscopeng.cpp index ee7dabbdc..0b43d791f 100644 --- a/sdrbase/gui/glscopeng.cpp +++ b/sdrbase/gui/glscopeng.cpp @@ -829,7 +829,13 @@ void GLScopeNG::paintGL() GLfloat q3[2*(end - start)]; 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++) { @@ -838,17 +844,7 @@ void GLScopeNG::paintGL() for(int i = start; i < end; i++) { - float x = trace0[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; }