From 8c53bde0313422d9a909dcf05fa4e40940e8761f Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Tue, 27 Oct 2015 17:35:42 -0400 Subject: [PATCH] Fix bad waterfall texture offset Was offset by 1 pixel.. --- src/panel/WaterfallPanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panel/WaterfallPanel.cpp b/src/panel/WaterfallPanel.cpp index 9aad159..6ad0161 100644 --- a/src/panel/WaterfallPanel.cpp +++ b/src/panel/WaterfallPanel.cpp @@ -177,7 +177,7 @@ void WaterfallPanel::drawPanelContents() { float half_pixel = 1.0 / viewWidth; float half_texel = 1.0 / (float) half_fft_size; float vtexel = 1.0 / (float) waterfall_lines; - float vofs = (float) (waterfall_ofs[0] + 1) * vtexel; + float vofs = (float) (waterfall_ofs[0]) * vtexel; glBindTexture(GL_TEXTURE_2D, waterfall[0]); glBegin (GL_QUADS); @@ -191,7 +191,7 @@ void WaterfallPanel::drawPanelContents() { glVertex3f(-1.0, 1.0, 0.0); glEnd(); - vofs = (float) (waterfall_ofs[1] + 1) * vtexel; + vofs = (float) (waterfall_ofs[1]) * vtexel; glBindTexture(GL_TEXTURE_2D, waterfall[1]); glBegin(GL_QUADS); glTexCoord2f(0.0 + half_texel, 1.0 + vofs);