Handbook
Glossary
(component-order>format) ( component-order component-type -- gl-format )
Vocabulary
opengl
.
textures
Inputs
component-order
an
object
component-type
an
object
Outputs
gl-format
an
object
Definition
USING:
combinators
images
kernel
opengl.gl
;
IN:
opengl.textures
:
(component-order>format)
( component-order component-type -- gl-format )
dup
unnormalized-integer-components?
[
swap
{
{
A
[
drop
GL_ALPHA_INTEGER_EXT
]
}
{
L
[
drop
GL_LUMINANCE_INTEGER_EXT
]
}
{
R
[
drop
GL_RED_INTEGER
]
}
{
LA
[
drop
GL_LUMINANCE_ALPHA_INTEGER_EXT
]
}
{
RG
[
drop
GL_RG_INTEGER
]
}
{
BGR
[
drop
GL_BGR_INTEGER
]
}
{
RGB
[
drop
GL_RGB_INTEGER
]
}
{
BGRA
[
drop
GL_BGRA_INTEGER
]
}
{
RGBA
[
drop
GL_RGBA_INTEGER
]
}
{
BGRX
[
drop
GL_BGRA_INTEGER
]
}
{
RGBX
[
drop
GL_RGBA_INTEGER
]
}
[
swap
unsupported-component-order
]
}
case
]
[
swap
{
{
A
[
drop
GL_ALPHA
]
}
{
L
[
drop
GL_LUMINANCE
]
}
{
R
[
drop
GL_RED
]
}
{
LA
[
drop
GL_LUMINANCE_ALPHA
]
}
{
RG
[
drop
GL_RG
]
}
{
BGR
[
reversed-type?
GL_RGB
GL_BGR
?
]
}
{
RGB
[
reversed-type?
GL_BGR
GL_RGB
?
]
}
{
BGRA
[
drop
GL_BGRA
]
}
{
RGBA
[
drop
GL_RGBA
]
}
{
ARGB
[
drop
GL_BGRA
]
}
{
ABGR
[
drop
GL_RGBA
]
}
{
BGRX
[
drop
GL_BGRA
]
}
{
RGBX
[
drop
GL_RGBA
]
}
{
XRGB
[
drop
GL_BGRA
]
}
{
XBGR
[
drop
GL_RGBA
]
}
{
INTENSITY
[
drop
GL_INTENSITY
]
}
{
DEPTH
[
drop
GL_DEPTH_COMPONENT
]
}
{
DEPTH-STENCIL
[
drop
GL_DEPTH_STENCIL
]
}
[
swap
unsupported-component-order
]
}
case
]
if
;