disappearing skidmarks : hints
Christos Dimitrakakis <[email protected]> Mon, 19 Jan 2009 11:06:37 +0100
| Newsgroups | gmane.games.torcs.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have now added two callbacks, as Paolo Leoncini suggested, for
skidamarks. Namely:
int grSkidmarksPredrawCallback(ssgEntity *obj)
{
~ glDepthMask(GL_FALSE);
~ glPolygonOffset(-15, -20);
~ glEnable(GL_POLYGON_OFFSET_FILL);
}
int grSkidmarksPostdrawCallback(ssgEntity *obj)
{
~ glDisable(GL_POLYGON_OFFSET_FILL);
~ glDepthMask(GL_TRUE);
}
This however, is not sufficient to prevent skids from flickering on and
off depending on the viewing angle.
I noticed this:
When the skidmarks are not visible on a portion of the track, the part
of the car's shadow which has soft alpha blending disappears as well (so
it does not appear blurry any more).
So my guess is that this has something to do with thresholding, but I
have no other clues.
Any ideas?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJdFCtyBv6kELa61sRAozRAJ90ETKXeswsqb/dV2X40gSa7FxCJACeJX2B
58zw6c9l2FUy2BqkwWQWnd0=
=kxsv
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword