Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
IceT
IceT
Commits
d2e7ef44
Commit
d2e7ef44
authored
May 13, 2011
by
Kenneth Moreland
Browse files
Change BlankTiles test to check for corrected background color.
parent
d4260b94
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/BlankTiles.c
View file @
d2e7ef44
...
...
@@ -75,8 +75,8 @@ static int BlankTilesDoTest(void)
if
(
rank
==
0
)
{
/* printrank("Rank == 0, tile should have stuff in it.\n"); */
}
else
if
(
rank
<
tile_dim
*
tile_dim
)
{
IceT
UByte
*
cb
;
int
pixel
;
IceT
Float
*
cb
;
int
color_component
;
if
(
(
my_width
!=
icetImageGetWidth
(
image
))
||
(
my_height
!=
icetImageGetHeight
(
image
))
)
{
...
...
@@ -85,9 +85,11 @@ static int BlankTilesDoTest(void)
}
/* printrank("Checking returned image data.\n"); */
cb
=
icetImageGetColorub
(
image
);
for
(
pixel
=
0
;
pixel
<
my_width
*
my_height
*
4
;
pixel
++
)
{
if
(
cb
[
pixel
]
!=
0
)
{
cb
=
icetImageGetColorf
(
image
);
for
(
color_component
=
0
;
color_component
<
my_width
*
my_height
*
4
;
color_component
++
)
{
if
(
cb
[
color_component
]
!=
0
.
25
f
)
{
printrank
(
"Found bad pixel!!!!!!!!
\n
"
);
result
=
TEST_FAILED
;
break
;
...
...
@@ -106,13 +108,19 @@ static int BlankTilesRun()
int
result
=
TEST_PASSED
;
int
strategy_index
;
glClearColor
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
glClearColor
(
0
.
25
f
,
0
.
25
f
,
0
.
25
f
,
0
.
25
f
);
icetGLDrawCallback
(
draw
);
icetBoundingBoxd
(
-
0
.
5
,
0
.
5
,
-
0
.
5
,
0
.
5
,
-
0
.
5
,
0
.
5
);
icetSetColorFormat
(
ICET_IMAGE_COLOR_RGBA_UBYTE
);
icetSetDepthFormat
(
ICET_IMAGE_DEPTH_FLOAT
);
/* Turn on blending and colored background collection. Even though in
general this would not work unless you also ordered the compositing, we
just want to make sure we get the right color in empty tiles for this
test. */
icetSetColorFormat
(
ICET_IMAGE_COLOR_RGBA_FLOAT
);
icetSetDepthFormat
(
ICET_IMAGE_DEPTH_NONE
);
icetCompositeMode
(
ICET_COMPOSITE_MODE_BLEND
);
icetEnable
(
ICET_CORRECT_COLORED_BACKGROUND
);
for
(
strategy_index
=
0
;
strategy_index
<
STRATEGY_LIST_SIZE
;
strategy_index
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment