devdept
11-21-2007, 06:48 AM
Hi All,
I am struggling with the drawing of a 100x100 rectangle (as lines) that surround a 98x98 rectangle (filled).
I draw this in Ortho2D mode using mouse coordinates.
Guess what? Sometimes the inner rect overlaps to outer (wireframe) one.
How can I achieve a consistent raterization?
I did try what the RedBook suggests without success:
// An optimum compromise that allows all primitives to be specified
// at integer positions, while still ensuring predictable rasterization,
// is to translate x and y by 0.375
// gl.Translatef(0.375f, 0.375f, 0.0f);
Thanks in advance,
Alberto
I am struggling with the drawing of a 100x100 rectangle (as lines) that surround a 98x98 rectangle (filled).
I draw this in Ortho2D mode using mouse coordinates.
Guess what? Sometimes the inner rect overlaps to outer (wireframe) one.
How can I achieve a consistent raterization?
I did try what the RedBook suggests without success:
// An optimum compromise that allows all primitives to be specified
// at integer positions, while still ensuring predictable rasterization,
// is to translate x and y by 0.375
// gl.Translatef(0.375f, 0.375f, 0.0f);
Thanks in advance,
Alberto