diff --git a/basis/images/images.factor b/basis/images/images.factor index f74233c515..ecf3de26e8 100755 --- a/basis/images/images.factor +++ b/basis/images/images.factor @@ -4,7 +4,8 @@ USING: combinators kernel accessors sequences math arrays ; IN: images SINGLETONS: - L LA BGR RGB BGRA RGBA ABGR ARGB RGBX XRGB BGRX XBGR + A L LA BGR RGB BGRA RGBA ABGR ARGB RGBX XRGB BGRX XBGR + INTENSITY DEPTH R RG ubyte-components ushort-components half-components float-components byte-integer-components ubyte-integer-components @@ -12,7 +13,8 @@ SINGLETONS: int-integer-components uint-integer-components ; UNION: component-order - L LA BGR RGB BGRA RGBA ABGR ARGB RGBX XRGB BGRX XBGR ; + A L LA BGR RGB BGRA RGBA ABGR ARGB RGBX XRGB BGRX XBGR + INTENSITY DEPTH R RG ; UNION: component-type ubyte-components ushort-components @@ -26,7 +28,7 @@ UNION: unnormalized-integer-components short-integer-components ushort-integer-components int-integer-components uint-integer-components ; -UNION: alpha-channel BGRA RGBA ABGR ARGB ; +UNION: alpha-channel BGRA RGBA ABGR ARGB LA A INTENSITY ; TUPLE: image dim component-order component-type upside-down? bitmap ; @@ -56,6 +58,7 @@ DEFER: bytes-per-pixel : component-count ( component-order -- n ) { + { A [ 1 ] } { L [ 1 ] } { LA [ 2 ] } { BGR [ 3 ] } @@ -68,6 +71,10 @@ DEFER: bytes-per-pixel { XRGB [ 4 ] } { BGRX [ 4 ] } { XBGR [ 4 ] } + { INTENSITY [ 1 ] } + { DEPTH [ 1 ] } + { R [ 1 ] } + { RG [ 2 ] } } case ; : pixel@ ( x y image -- start end bitmap ) diff --git a/basis/opengl/gl/gl.factor b/basis/opengl/gl/gl.factor index fb3b10354b..382ff06dd4 100644 --- a/basis/opengl/gl/gl.factor +++ b/basis/opengl/gl/gl.factor @@ -1906,6 +1906,17 @@ CONSTANT: GL_MIN_PROGRAM_TEXEL_OFFSET_EXT HEX: 8904 CONSTANT: GL_MAX_PROGRAM_TEXEL_OFFSET_EXT HEX: 8905 +! GL_ARB_texture_rectangle + + +CONSTANT: GL_TEXTURE_RECTANGLE_ARB HEX: 84F5 +CONSTANT: GL_TEXTURE_BINDING_RECTANGLE_ARB HEX: 84F6 +CONSTANT: GL_PROXY_TEXTURE_RECTANGLE_ARB HEX: 84F7 +CONSTANT: GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB HEX: 84F8 +CONSTANT: GL_SAMPLER_2D_RECT_ARB HEX: 8B63 +CONSTANT: GL_SAMPLER_2D_RECT_SHADOW_ARB HEX: 8B64 + + ! GL_EXT_geometry_shader4