X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpixelformat.h;h=65331c99901fcd5aefee7b78e1fef5727579af9e;hb=24b24e2203c776aacd9744bb947f5cf47b03d328;hp=5a5302cd648fbe0a47f3d44e1450d2187b7a1a72;hpb=6065f6622cc275dc0b20baaf7c267e71169d18f3;p=libs%2Fgl.git diff --git a/source/core/pixelformat.h b/source/core/pixelformat.h index 5a5302cd..65331c99 100644 --- a/source/core/pixelformat.h +++ b/source/core/pixelformat.h @@ -3,7 +3,6 @@ #include #include -#include "gl.h" #include "datatype.h" namespace Msp { @@ -54,6 +53,7 @@ inadvisable for programs to rely on it. */ enum PixelFormat { + NO_PIXELFORMAT = 0, R8 = 0x4100|RED, R16F = 0x3200|RED, R32F = 0x3400|RED, @@ -85,7 +85,7 @@ void operator>>(const LexicalConverter &, PixelComponents &); void operator>>(const LexicalConverter &, PixelFormat &); PixelComponents components_from_graphics(Graphics::PixelFormat); -PixelFormat pixelformat_from_image(const Graphics::Image &); +PixelFormat pixelformat_from_image(const Graphics::Image &, bool = false); PixelFormat make_pixelformat(PixelComponents, DataType, bool = false); inline PixelComponents get_components(PixelFormat f) { return static_cast(f&0xFF); } @@ -98,8 +98,8 @@ inline unsigned get_pixel_size(PixelFormat f) { return get_component_count(f)*ge void require_pixelformat(PixelFormat); -GLenum get_gl_components(PixelComponents); -GLenum get_gl_pixelformat(PixelFormat); +unsigned get_gl_components(PixelComponents); +unsigned get_gl_pixelformat(PixelFormat); } // namespace GL } // namespace Msp