[Top][All Lists]

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

[Octave-bug-tracker] [bug #44111] Images not printed when there's a 3D a

From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #44111] Images not printed when there's a 3D axes in the figure
Date: Thu, 05 Feb 2015 09:55:44 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

Follow-up Comment #10, bug #44111 (project octave):

@Rik: you are right. gl2psEnable  doc says:

"The value of the offset is taken as the current value of the
corresponding OpenGL offset (set with glPolygonOffset)".

As I understand, PolygonOffset data, that we set in our gl-renderer, are not
written in the feedback buffer (see [1]) that gl2ps will parse/interpret/draw
*when we call gl2psEndPage()*, i.e. after all our drawing have been done. As a
consequence gl2ps has to force some additional informations to be written
"live" in the feedback buffer while we are "drawing". That is why we should
gl2psEnable/Disable each time we change the offset.

The above could be done through something like:

gl2ps_renderer::set_polygon_offset (bool on, float offset)
  if (on)
      opengl_renderer::set_polygon_offset (on, offset);
      gl2psEnable (GL2PS_POLYGON_OFFSET_FILL);
      gl2psDisable (GL2PS_POLYGON_OFFSET_FILL);
      opengl_renderer::set_polygon_offset (on, offset);

By looking at the gl2ps.c code I think it is how gl2psEnable was intended to
be used. Unfortunately, I think that gl2ps currently only stores the values of
the offset (factor/unit) that was in place the last time you called
"gl2psEnable (GL2PS_POLYGON_OFFSET_FILL);", before gl2psEndPage(). If you
think it is worth I can ask for details on gl2ps mailing list. Thoughts?

[1] http://bittar.free.fr/OpenGL/opengl/glPolygonOffset.html : glPolygonOffset
has no effect on depth coordinates placed in the feedback buffer. 


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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