From ac8075f30e5abdbc2c026e3f78bf1e506d2398e2 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 4 Sep 2008 13:22:35 -0500 Subject: [PATCH] support 8bit bitmaps --- extra/graphics/bitmap/bitmap.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/graphics/bitmap/bitmap.factor b/extra/graphics/bitmap/bitmap.factor index 82fdc334cb..eff4542da4 100755 --- a/extra/graphics/bitmap/bitmap.factor +++ b/extra/graphics/bitmap/bitmap.factor @@ -20,7 +20,7 @@ TUPLE: bitmap magic size reserved offset header-length width { 32 [ "32bit" throw ] } { 24 [ ] } { 16 [ "16bit" throw ] } - { 8 [ "8bit" throw ] } + { 8 [ ] } { 4 [ "4bit" throw ] } { 2 [ "2bit" throw ] } { 1 [ "1bit" throw ] } @@ -110,6 +110,7 @@ M: bitmap draw-image ( bitmap -- ) bit-count>> { ! { 32 [ GL_BGRA GL_UNSIGNED_INT_8_8_8_8 ] } ! broken { 24 [ GL_BGR GL_UNSIGNED_BYTE ] } + { 8 [ GL_LUMINANCE GL_UNSIGNED_BYTE ] } } case ] keep array>> glDrawPixels ;