From 42293e1bd6f3d6297a1d0207ca69e7864a7d76e8 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 1 Feb 2021 22:22:04 +0200 Subject: [PATCH] Reorder some pixel format values They're now rougly in order from most to least used by category --- source/pixelformat.cpp | 4 ++-- source/pixelformat.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 -- 2.43.0