images: fix some tests that broke due to an additional slot in image

Philipp Brüschweiler 2010-07-31 20:34:15 +02:00
parent 35c6d0b02f
commit 0e7dc91478
33 changed files with 20 additions and 14 deletions

View File

@ -3,7 +3,7 @@
USING: images tools.test kernel accessors ; USING: images tools.test kernel accessors ;
IN: images.tests IN: images.tests
[ B{ 57 57 57 255 } ] [ 1 1 T{ image f { 2 3 } RGBA ubyte-components f B{ [ B{ 57 57 57 255 } ] [ 1 1 T{ image f { 2 3 } RGBA ubyte-components f f B{
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
@ -19,7 +19,7 @@ IN: images.tests
57 57 57 255 57 57 57 255
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
} ] [ B{ 57 57 57 255 } 1 1 T{ image f { 2 3 } RGBA ubyte-components f B{ } ] [ B{ 57 57 57 255 } 1 1 T{ image f { 2 3 } RGBA ubyte-components f f B{
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

View File

@ -10,12 +10,12 @@ IN: images.tesselation
[ [
{ {
{ {
T{ image f { 2 2 } L ubyte-components f B{ 1 2 5 6 } } T{ image f { 2 2 } L ubyte-components f f B{ 1 2 5 6 } }
T{ image f { 2 2 } L ubyte-components f B{ 3 4 7 8 } } T{ image f { 2 2 } L ubyte-components f f B{ 3 4 7 8 } }
} }
{ {
T{ image f { 2 2 } L ubyte-components f B{ 9 10 13 14 } } T{ image f { 2 2 } L ubyte-components f f B{ 9 10 13 14 } }
T{ image f { 2 2 } L ubyte-components f B{ 11 12 15 16 } } T{ image f { 2 2 } L ubyte-components f f B{ 11 12 15 16 } }
} }
} }
] [ ] [
@ -30,12 +30,12 @@ IN: images.tesselation
[ [
{ {
{ {
T{ image f { 2 2 } L ubyte-components f B{ 1 2 4 5 } } T{ image f { 2 2 } L ubyte-components f f B{ 1 2 4 5 } }
T{ image f { 1 2 } L ubyte-components f B{ 3 6 } } T{ image f { 1 2 } L ubyte-components f f B{ 3 6 } }
} }
{ {
T{ image f { 2 1 } L ubyte-components f B{ 7 8 } } T{ image f { 2 1 } L ubyte-components f f B{ 7 8 } }
T{ image f { 1 1 } L ubyte-components f B{ 9 } } T{ image f { 1 1 } L ubyte-components f f B{ 9 } }
} }
} }
] [ ] [

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -88,12 +88,18 @@ TUPLE: vbo
index-buffer index-count vertex-format texture bump ka ; index-buffer index-count vertex-format texture bump ka ;
: white-image ( -- image ) : white-image ( -- image )
{ 1 1 } BGR ubyte-components f <image>
B{ 255 255 255 } image boa ; { 1 1 } >>dim
BGR >>component-order
ubyte-components >>component-type
B{ 255 255 255 } >>bitmap ;
: up-image ( -- image ) : up-image ( -- image )
{ 1 1 } BGR ubyte-components f <image>
B{ 0 0 0 } image boa ; { 1 1 } >>dim
BGR >>component-order
ubyte-components >>component-type
B{ 0 0 0 } >>bitmap ;
: make-texture ( pathname alt -- texture ) : make-texture ( pathname alt -- texture )
swap [ nip load-image ] [ ] if* swap [ nip load-image ] [ ] if*