[Scummvm-tracker] [ScummVM :: Bugs] #15272: TINYGL: triangle fan produces less triangles than expected?

ScummVM :: Bugs trac at scummvm.org
Sat Nov 16 08:18:36 UTC 2024


#15272: TINYGL: triangle fan produces less triangles than expected?
------------------------+-----------------------
Reporter:  neuromancer  |       Owner:  (none)
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  Graphics
 Version:               |  Resolution:
Keywords:  tinygl       |        Game:
------------------------+-----------------------
Comment (by neuromancer):

 I started to dig into this issue. On thing that is happening is that the
 -infinity value (e.g. -2147483648 or 0x80000000) is introduced here:

 {{{
 void GLContext::gl_transform_to_viewport(GLVertex *v) {
         float winv;

         // coordinates
         winv = (float)(1.0 / v->pc.W);
         v->zp.x = (int)(v->pc.X * winv * viewport.scale.X +
 viewport.trans.X);
         v->zp.y = (int)(v->pc.Y * winv * viewport.scale.Y +
 viewport.trans.Y);
         v->zp.z = (int)(v->pc.Z * winv * viewport.scale.Z +
 viewport.trans.Z);
 }}}

 Either v->pc.W is very close (or equal) to zero, or the computation of the
 zbuffer components results in very large numbers that gets casted into
 -infinity.

 I'm not sure if this is the cause or a symptom of a larger problem.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15272#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list