]> git.tdb.fi Git - libs/gl.git/commitdiff
Reorder some pixel format values
authorMikko Rasa <tdb@tdb.fi>
Mon, 1 Feb 2021 20:22:04 +0000 (22:22 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 1 Feb 2021 20:25:37 +0000 (22:25 +0200)
They're now rougly in order from most to least used by category

source/pixelformat.cpp
source/pixelformat.h

index 94bf9716660d8c56054ce55fa7809e519695ca3f..87191c3423122aefde6b7e38110daae5d28cb4d0 100644 (file)
@@ -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:
index 96f859cae47ad0b46ad1b5f6b06d4b137057f30e..213328a5578f393acd616eb092a5a55322dc0d07 100644 (file)
@@ -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