octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44735] OpenGL based figure has incorrect elem


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44735] OpenGL based figure has incorrect element / object depth
Date: Sun, 05 Apr 2015 17:10:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

URL:
  <http://savannah.gnu.org/bugs/?44735>

                 Summary: OpenGL based figure has incorrect element / object
depth
                 Project: GNU Octave
            Submitted by: sebald
            Submitted on: Sun 05 Apr 2015 05:10:57 PM GMT
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

For this demo using the command "patch":


graphics_toolkit qt
demo ("patch", 4)
print patch4.pdf


I'm seeing a blue hexadecagon fill drawn to the right having a
closer-to-the-viewer depth and therefore overlaps the green octagon fill drawn
to the left.  Both shapes have a black line outlining the fill, but the line
for the green octagon is completely visible so appears to have a closer depth
than the blue hexadecagon.  This is similar for both FLTK and Qt, but for
gnuplot terminal the border of the green octagon is also behind the blue
hexadecagon.

There is nothing in the demo code controlling the shape boundary separate from
fill,


%!demo
%! %% Specify vertices and faces separately
%! clf;
%! t1 = (1/16:1/8:1)' * 2*pi;
%! t2 = ((1/16:1/16:1)' + 1/32) * 2*pi;
%! x1 = sin (t1) - 0.8;
%! y1 = cos (t1);
%! x2 = sin (t2) + 0.8;
%! y2 = cos (t2);
%! vert = [x1, y1; x2, y2];
%! fac = [1:8,NaN(1,8);9:24];
%! patch ('Faces',fac, 'Vertices',vert, ...
%!        'FaceVertexCData',[0, 1, 0; 0, 0, 1], 'FaceColor', 'flat');


so I assume the expectation is that the outline of the green octagon should
also have a more-far-away view and be hidden by the blue hexadecagon and its
outline.

In gl-render.cc is this note:



          // NOTE: Push filled part of patch backwards to avoid Z-fighting
with
          // tesselator outline.  A value of 1.0 seems to work fine.  Value
          // can't be too large or the patch will be pushed below the axes
          // planes at +2.5.


which may be a good place to start.  If the fills are all pushed backward,
then perhaps all outlines appear more forward.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44735>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]