X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpixelformat.cpp;h=6be6d7c97b36e00882022eae4b28ad314e3fc593;hb=24b24e2203c776aacd9744bb947f5cf47b03d328;hp=270f27f7dc2e4fe9e608471c37ebf015830a3f9a;hpb=6065f6622cc275dc0b20baaf7c267e71169d18f3;p=libs%2Fgl.git diff --git a/source/core/pixelformat.cpp b/source/core/pixelformat.cpp index 270f27f7..6be6d7c9 100644 --- a/source/core/pixelformat.cpp +++ b/source/core/pixelformat.cpp @@ -106,10 +106,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 +169,7 @@ void require_pixelformat(PixelFormat pf) } } -GLenum get_gl_components(PixelComponents comp) +unsigned get_gl_components(PixelComponents comp) { switch(comp) { @@ -183,7 +183,7 @@ GLenum get_gl_components(PixelComponents comp) } } -GLenum get_gl_pixelformat(PixelFormat pf) +unsigned get_gl_pixelformat(PixelFormat pf) { switch(pf) {