]> gitweb.factorcode.org Git - factor.git/blob - basis/opengl/textures/textures-tests.factor
895298fe545f8e739458095002332514e3fb22c3
[factor.git] / basis / opengl / textures / textures-tests.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test opengl.gl opengl.textures opengl.textures.private
4 images kernel namespaces accessors sequences literals ;
5 IN: opengl.textures.tests
6
7 [
8     {
9         { { 0 0 } { 10 0 } }
10         { { 0 20 } { 10 20 } }
11     }
12 ] [
13     {
14         { { 10 20 } { 30 20 } }
15         { { 10 30 } { 30 300 } }
16     }
17     [ [ image new swap >>dim ] map ] map image-locs
18 ] unit-test
19
20 ${ GL_RGBA8 GL_RGBA GL_UNSIGNED_BYTE }
21 [ RGBA ubyte-components (image-format) ] unit-test
22
23 ${ GL_RGBA8 GL_BGRA GL_UNSIGNED_BYTE }
24 [ BGRA ubyte-components (image-format) ] unit-test
25
26 ${ GL_RGBA8 GL_BGRA GL_UNSIGNED_INT_8_8_8_8_REV }
27 [ ARGB ubyte-components (image-format) ] unit-test
28
29 ${ GL_RGBA32F GL_RGBA GL_FLOAT }
30 [ RGBA float-components (image-format) ] unit-test
31
32 ${ GL_RGBA32UI GL_BGRA_INTEGER GL_UNSIGNED_INT }
33 [ BGRA uint-integer-components (image-format) ] unit-test
34
35 ${ GL_RGB9_E5 GL_RGB GL_UNSIGNED_INT_5_9_9_9_REV }
36 [ BGR u-9-9-9-e5-components (image-format) ] unit-test
37
38 ${ GL_R11F_G11F_B10F GL_RGB GL_UNSIGNED_INT_10F_11F_11F_REV }
39 [ BGR float-11-11-10-components (image-format) ] unit-test