summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@falktx.com>2022-12-06 13:30:39 +0000
committerfalkTX <falktx@falktx.com>2022-12-06 13:30:39 +0000
commit4513fb84a4a7e506cf25e6b9d49b62f0147b38b6 (patch)
tree9dfe577ab0051c317d735f5dfa49861919b26cfe
parentf1c07986496bd7ac7d9fc78023614b95955e7e64 (diff)
Fix ZamKnob to match ImageKnob GL changes
Signed-off-by: falkTX <falktx@falktx.com>
-rw-r--r--widgets/ZamWidgets.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/ZamWidgets.hpp b/widgets/ZamWidgets.hpp
index c63e764..7f48e33 100644
--- a/widgets/ZamWidgets.hpp
+++ b/widgets/ZamWidgets.hpp
@@ -398,13 +398,13 @@ void ZamKnob::onDisplay()
const uint& v1(fIsImgVertical ? fImgLayerWidth : fImgLayerHeight);
const uint& v2(fIsImgVertical ? fImgLayerHeight : fImgLayerWidth);
- const uint layerDataSize = v1 * v2 * ((fImage.getFormat() == GL_BGRA || fImage.getFormat() == GL_RGBA) ? 4 : 3);
+ const uint layerDataSize = v1 * v2 * ((fImage.getFormat() == kImageFormatBGRA || fImage.getFormat() == kImageFormatRGBA) ? 4 : 3);
imageDataOffset = layerDataSize * uint(normValue * float(fImgLayerCount-1));
}
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
static_cast<GLsizei>(getWidth()), static_cast<GLsizei>(getHeight()), 0,
- fImage.getFormat(), GL_UNSIGNED_BYTE, fImage.getRawData() + imageDataOffset);
+ asOpenGLImageFormat(fImage.getFormat()), GL_UNSIGNED_BYTE, fImage.getRawData() + imageDataOffset);
fIsReady = true;
}