X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcore%2Fpixelformat.cpp;h=11eb40812ea631ff2421b88d55e39812d9ea09d5;hb=acaefb4c669f01855252818ef0a2958cbdababc3;hp=270f27f7dc2e4fe9e608471c37ebf015830a3f9a;hpb=6065f6622cc275dc0b20baaf7c267e71169d18f3;p=libs%2Fgl.git diff --git a/source/core/pixelformat.cpp b/source/core/pixelformat.cpp index 270f27f7..11eb4081 100644 --- a/source/core/pixelformat.cpp +++ b/source/core/pixelformat.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include "pixelformat.h" @@ -106,10 +105,10 @@ PixelComponents components_from_graphics(Graphics::PixelFormat pf) } } -PixelFormat pixelformat_from_image(const Graphics::Image &image) +PixelFormat pixelformat_from_image(const Graphics::Image &image, bool srgb) { PixelComponents comp = components_from_graphics(image.get_format()); - return make_pixelformat(comp, UNSIGNED_BYTE); + return make_pixelformat(comp, UNSIGNED_BYTE, srgb); } PixelFormat make_pixelformat(PixelComponents comp, DataType type, bool srgb) @@ -169,7 +168,7 @@ void require_pixelformat(PixelFormat pf) } } -GLenum get_gl_components(PixelComponents comp) +unsigned get_gl_components(PixelComponents comp) { switch(comp) { @@ -183,7 +182,7 @@ GLenum get_gl_components(PixelComponents comp) } } -GLenum get_gl_pixelformat(PixelFormat pf) +unsigned get_gl_pixelformat(PixelFormat pf) { switch(pf) {