/** Subclass of draw_stage */
struct stipple_stage {
struct draw_stage stage;
- float counter;
+ unsigned counter;
ushort pattern;
ushort factor;
bool rectangular;
static inline bool
-stipple_test(int counter, ushort pattern, ushort factor)
+stipple_test(unsigned counter, ushort pattern, ushort factor)
{
- int b = (counter / factor) & 0xf;
+ unsigned b = (counter / factor) & 0xf;
return !!((1 << b) & pattern);
}
/* XXX ToDo: instead of iterating pixel-by-pixel, use a look-up table.
*/
for (i = 0; i < intlength; i++) {
- bool result = stipple_test((int)stipple->counter + i,
+ bool result = stipple_test(stipple->counter + i,
stipple->pattern, stipple->factor);
if (result != state) {
/* changing from "off" to "on" or vice versa */
if (state && start < length)
emit_segment(stage, header, start / length, 1.0);
- stipple->counter += length;
+ stipple->counter += intlength;
}
spec/!opengl 1.1/draw-pixels samples=4: skip
spec/!opengl 1.1/draw-pixels samples=6: skip
spec/!opengl 1.1/draw-pixels samples=8: skip
-spec/!opengl 1.1/linestipple/line strip: fail
spec/!opengl 1.1/polygon-mode-facing: fail
spec/!opengl 1.1/polygon-mode-offset/config 3: expected white pixel on bottom edge: fail
spec/!opengl 1.1/polygon-mode-offset/config 3: expected white pixel on left edge: fail