X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpixelformat.cpp;h=cd3bb2aa78e30709293dd8dfb13f4d42cd4c481d;hp=ee3cad099dd989bb87ff6932866c675d24815165;hb=f1b12c992db974c679d85ae6ec22cd318199d0d5;hpb=67538c60b8baa6816b8ae2d343ae62d881e6c58d diff --git a/source/pixelformat.cpp b/source/pixelformat.cpp index ee3cad09..cd3bb2aa 100644 --- a/source/pixelformat.cpp +++ b/source/pixelformat.cpp @@ -10,20 +10,10 @@ namespace GL { void operator>>(const LexicalConverter &conv, PixelFormat &fmt) { - if(conv.get()=="COLOR_INDEX") - fmt = COLOR_INDEX; - else if(conv.get()=="STENCIL_INDEX") + if(conv.get()=="STENCIL_INDEX") fmt = STENCIL_INDEX; else if(conv.get()=="DEPTH_COMPONENT") fmt = DEPTH_COMPONENT; - else if(conv.get()=="RED") - fmt = RED; - else if(conv.get()=="GREEN") - fmt = GREEN; - else if(conv.get()=="BLUE") - fmt = BLUE; - else if(conv.get()=="ALPHA") - fmt = ALPHA; else if(conv.get()=="RGB") fmt = RGB; else if(conv.get()=="RGBA") @@ -52,7 +42,6 @@ PixelFormat pixelformat_from_graphics(Graphics::PixelFormat pf) { switch(pf) { - case Graphics::COLOR_INDEX: return COLOR_INDEX; case Graphics::LUMINANCE: return LUMINANCE; case Graphics::LUMINANCE_ALPHA: return LUMINANCE_ALPHA; case Graphics::RGB: return RGB; @@ -125,12 +114,8 @@ unsigned get_component_count(PixelFormat pf) { switch(get_base_pixelformat(pf)) { - case COLOR_INDEX: case STENCIL_INDEX: case DEPTH_COMPONENT: - case RED: - case GREEN: - case BLUE: case LUMINANCE: case SLUMINANCE: return 1;