Files
MobileGL/MobileGL/MG_Util/Texture/TextureFormatProcessor.h
T
2026-06-26 23:33:46 +08:00

30 lines
1.2 KiB
C++

// MobileGL - MobileGL/MG_Util/Texture/TextureFormatProcessor.h
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#pragma once
#include <Includes.h>
namespace MobileGL {
enum class PixelFormatNormalizeOptionBit : Uint {
NoNorm16 = 1 << 0,
NoSnorm16 = 1 << 1,
NoRgb16 = 1 << 2,
NoSnorm8 = 1 << 3,
NoDepthComponent32 = 1 << 4,
NoRGBA8Snorm = 1 << 5,
None = 0,
};
namespace MG_Util::TextureFormatProcessor {
Flags<PixelFormatNormalizeOptionBit>
GetApplicablePixelFormatNormalizeOptions(GLenum internalFormat,
Flags<PixelFormatNormalizeOptionBit> options);
void NormalizePixelFormat(GLenum internalFormat, Flags<PixelFormatNormalizeOptionBit> options,
GLenum* outInternalFormat, GLenum* outFormat, GLenum* outType);
} // namespace MG_Util::TextureFormatProcessor
} // namespace MobileGL