summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}