Mike Gorchak
|
Alpha blended line caused io-graphics to segfault
|
Mike Gorchak
10/13/2009 4:02 AM
post39746
|
Alpha blended line caused io-graphics to segfault
I can reproduce the problem on any graphics driver (including vesabios and svga) in QNX 6.4.1 and in any 32 bpp video
mode, but only with these alpha blending flags: Pg_BLEND_SRC_0 | Pg_BLEND_DST_S and only while drawing lines (some
diagonal lines only, not vertical, not horizontal).
Graphics context has all default values before the following code:
/* Set light gray fill color */
PgSetFillColor(PgRGB(160, 160, 160));
/* Draw the box */
PgDrawIRect(0, 0, 500, 500, Pg_DRAW_FILL);
/* Set white line color */
PgSetStrokeColor(PgRGB(255, 255, 255));
/* Set and enable alpha blending */
PgSetAlpha(Pg_BLEND_SRC_0 | Pg_BLEND_DST_S, NULL, NULL, 0, 0);
PgAlphaOn();
/* Draw the line over gray box */
PgDrawILine(242, 47, 237, 452);
/* Flush */
PgFlush();
PgWaitHWIdle();
This piece of code must draw completely invisible line over gray filled box to the current draw context. In 15/16 bpp
video modes all works fine, but in 32 bpp io-graphics is terminated with segmentation fault error.
|
|
|