Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0d7ba553e5ba
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 119371cf57eb
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 23, 2020

  1. Copy the full SHA
    119371c View commit details
Showing with 16 additions and 16 deletions.
  1. +16 −16 glscopeclient/WaveformArea_rendering.cpp
32 changes: 16 additions & 16 deletions glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -93,6 +93,8 @@ bool WaveformArea::PrepareGeometry()
}
*/

bool fft = IsFFT();

//Calculate X/Y coordinate of each sample point
//TODO: some of this can probably move to GPU too?
m_traceBuffer.resize(count*2);
@@ -102,8 +104,17 @@ bool WaveformArea::PrepareGeometry()
#pragma omp parallel for num_threads(8)
for(size_t j=0; j<count; j++)
{
m_traceBuffer[j*2] = data.GetSampleStart(j) * xscale + m_xoff;
m_traceBuffer[j*2 + 1] = (m_pixelsPerVolt * (data[j] + offset)) + m_height/2;
m_traceBuffer[j*2] = data.GetSampleStart(j) * xscale + m_xoff;

float y;
if(fft)
{

}
else
y = (m_pixelsPerVolt * (data[j] + offset)) + m_height/2;

m_traceBuffer[j*2 + 1] = y;
}

double dt = GetTime() - start;
@@ -226,12 +237,15 @@ bool WaveformArea::on_render(const Glib::RefPtr<Gdk::GLContext>& /*context*/)
//Final compositing of data being drawn to the screen
m_windowFramebuffer.Bind(GL_FRAMEBUFFER);
RenderCairoUnderlays();
glEnable(GL_SCISSOR_TEST);
glScissor(0, 0, m_plotRight, m_height);
if(IsEye())
RenderEye();
else if(IsWaterfall())
RenderWaterfall();
else if(m_geometryOK)
RenderTraceColorCorrection();
glDisable(GL_SCISSOR_TEST);
RenderCairoOverlays();

//Sanity check
@@ -274,14 +288,7 @@ void WaveformArea::RenderEye()
m_eyeProgram.SetUniform(m_eyeTexture, "fbtex", 0);
m_eyeProgram.SetUniform(m_eyeColorRamp[m_parent->GetEyeColor()], "ramp", 1);

//Only look at stuff inside the plot area
glEnable(GL_SCISSOR_TEST);
glScissor(0, 0, m_plotRight, m_height);

glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

glDisable(GL_SCISSOR_TEST);
glActiveTexture(GL_TEXTURE0);
}

void WaveformArea::RenderWaterfall()
@@ -317,14 +324,7 @@ void WaveformArea::RenderWaterfall()
m_eyeProgram.SetUniform(m_eyeTexture, "fbtex", 0);
m_eyeProgram.SetUniform(m_eyeColorRamp[m_parent->GetEyeColor()], "ramp", 1);

//Only look at stuff inside the plot area
glEnable(GL_SCISSOR_TEST);
glScissor(0, 0, m_plotRight, m_height);

glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

glDisable(GL_SCISSOR_TEST);
glActiveTexture(GL_TEXTURE0);
}

void WaveformArea::RenderPersistenceOverlay()