diff --git a/basis/opengl/textures/textures.factor b/basis/opengl/textures/textures.factor index 79af9be48b..48cdafb837 100644 --- a/basis/opengl/textures/textures.factor +++ b/basis/opengl/textures/textures.factor @@ -11,14 +11,16 @@ IN: opengl.textures TUPLE: texture loc dim texture-coords texture display-list disposed ; -format ( component-order -- format type ) +M: RGB component-order>format drop GL_RGB GL_UNSIGNED_BYTE ; +M: BGR component-order>format drop GL_BGR GL_UNSIGNED_BYTE ; M: RGBA component-order>format drop GL_RGBA GL_UNSIGNED_BYTE ; M: ARGB component-order>format drop GL_BGRA_EXT GL_UNSIGNED_INT_8_8_8_8_REV ; M: BGRA component-order>format drop GL_BGRA_EXT GL_UNSIGNED_BYTE ; +> first2 GL_RGBA GL_UNSIGNED_BYTE ] - [ bitmap>> ] bi glDrawPixels ; + [ dim>> first2 ] [ component-order>> component-order>format ] [ bitmap>> ] tri + glDrawPixels ; M: image-gadget draw-gadget* ( gadget -- ) image>> draw-image ;