X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpixelformat.h;h=14ca580e5fc7e9cbdb22ebc9f5ce6f2725312f0b;hp=b69ad499c59c6f77ad3ae737e9c257601544996a;hb=0807680edd94a7f14560831db4dd52e4e48d0d19;hpb=49323eea600fb989d4181ccfd437ee12722ae733 diff --git a/source/pixelformat.h b/source/pixelformat.h index b69ad499..14ca580e 100644 --- a/source/pixelformat.h +++ b/source/pixelformat.h @@ -6,6 +6,7 @@ #include "gl.h" #include #include +#include #include #include #include @@ -21,8 +22,16 @@ enum PixelFormat DEPTH_COMPONENT16 = GL_DEPTH_COMPONENT16, DEPTH_COMPONENT24 = GL_DEPTH_COMPONENT24, DEPTH_COMPONENT32 = GL_DEPTH_COMPONENT32, + RED = GL_RED, + RG = GL_RG, RGB = GL_RGB, RGBA = GL_RGBA, + R8 = GL_R8, + R16F = GL_R16F, + R32F = GL_R32F, + RG8 = GL_RG8, + RG16F = GL_RG16F, + RG32F = GL_RG32F, RGB8 = GL_RGB8, RGB16F = GL_RGB16F, RGB32F = GL_RGB32F, @@ -37,13 +46,10 @@ enum PixelFormat BGRA = GL_BGRA, LUMINANCE = GL_LUMINANCE, LUMINANCE8 = GL_LUMINANCE8, - // TODO Remove LUMINANCE(_ALPHA) float formats once ARB_texture_rg becomes supported - LUMINANCE16F = GL_LUMINANCE16F_ARB, - LUMINANCE32F = GL_LUMINANCE32F_ARB, LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA, LUMINANCE8_ALPHA8 = GL_LUMINANCE8_ALPHA8, - LUMINANCE_ALPHA16F = GL_LUMINANCE_ALPHA16F_ARB, - LUMINANCE_ALPHA32F = GL_LUMINANCE_ALPHA32F_ARB, + + // Deprecated SLUMINANCE = GL_SLUMINANCE, SLUMINANCE8 = GL_SLUMINANCE8, SLUMINANCE_ALPHA = GL_SLUMINANCE_ALPHA, @@ -59,7 +65,8 @@ PixelFormat pixelformat_from_graphics(Graphics::PixelFormat); PixelFormat storage_pixelformat_from_graphics(Graphics::PixelFormat, bool = false); PixelFormat get_base_pixelformat(PixelFormat); -PixelFormat get_sized_pixelformat(PixelFormat); +PixelFormat get_unsized_pixelformat(PixelFormat); +PixelFormat get_sized_pixelformat(PixelFormat, unsigned = 1); PixelFormat get_srgb_pixelformat(PixelFormat); unsigned get_component_count(PixelFormat); unsigned get_component_size(PixelFormat);