diff --git a/include/pangolin/gl/gl.hpp b/include/pangolin/gl/gl.hpp index d472d8468..59571c794 100644 --- a/include/pangolin/gl/gl.hpp +++ b/include/pangolin/gl/gl.hpp @@ -92,9 +92,9 @@ inline size_t GlDataTypeBytes(GLenum type) inline size_t GlFormatChannels(GLenum data_layout) { - if (data_layout == GL_BGR) return 3; - if (data_layout == GL_BGRA) return 4; - return format_channels[data_layout - GL_RED]; + if (data_layout == GL_BGR) return 3; + if (data_layout == GL_BGRA) return 4; + return format_channels[data_layout - GL_RED]; } //template