From: Mikko Rasa Date: Mon, 1 Feb 2021 20:22:04 +0000 (+0200) Subject: Reorder some pixel format values X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=42293e1bd6f3d6297a1d0207ca69e7864a7d76e8;p=libs%2Fgl.git Reorder some pixel format values They're now rougly in order from most to least used by category --- diff --git a/source/pixelformat.cpp b/source/pixelformat.cpp index 94bf9716..87191c34 100644 --- a/source/pixelformat.cpp +++ b/source/pixelformat.cpp @@ -271,10 +271,10 @@ unsigned get_component_count(PixelComponents comp) { switch(comp) { - case STENCIL_INDEX: - case DEPTH_COMPONENT: case RED: case LUMINANCE: + case DEPTH_COMPONENT: + case STENCIL_INDEX: return 1; case RG: case LUMINANCE_ALPHA: diff --git a/source/pixelformat.h b/source/pixelformat.h index 96f859ca..213328a5 100644 --- a/source/pixelformat.h +++ b/source/pixelformat.h @@ -21,8 +21,6 @@ namespace GL { enum PixelComponents { - STENCIL_INDEX = GL_STENCIL_INDEX, - DEPTH_COMPONENT = GL_DEPTH_COMPONENT, RED = GL_RED, RG = GL_RG, RGB = GL_RGB, @@ -30,7 +28,9 @@ enum PixelComponents BGR = GL_BGR, BGRA = GL_BGRA, LUMINANCE = GL_LUMINANCE, - LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA + LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA, + DEPTH_COMPONENT = GL_DEPTH_COMPONENT, + STENCIL_INDEX = GL_STENCIL_INDEX }; enum PixelFormat