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

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

[Octave-bug-tracker] [bug #52940] Regression with "PaperPosition" and pr


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52940] Regression with "PaperPosition" and printing
Date: Mon, 22 Jan 2018 12:38:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #8, bug #52940 (project octave):

I've a feeling that QOpenGLWidget isn't designed to be a free substitution for
QGLWidget.  Here are some discussions with much more info than I care to know
right now:

https://stackoverflow.com/questions/21722852/difference-in-opengl-speed-between-qt-4-5-and-opengl-api

But it does sound from the comment here:

https://stackoverflow.com/questions/9796444/using-opengl-on-qt-without-the-wrappers

that it is possible to use direct OpenGL functions even in the QOpenGLWidget
context:

"
The QopenGL widget gives you the context, you then simply override the
initialiseGL, paintGL methods and you can use raw openGL calls directly.

The Qt wrappers around PBO and VBOs are convenient to save doing all the
manual DLL loading on Windows but aren't really necessary
"

The comment above refers to these functions from this link:


http://doc.qt.io/qt-5/qopenglwidget.html

Protected Functions
  virtual void  initializeGL()
  virtual void  paintGL()
  virtual void  resizeGL(int w, int h)


I see in GLCanvas.cc the implementation of paintGL():


  void
  GLCanvas::paintGL (void)
  {
    canvasPaintEvent ();
  }


but I don't see a GLCanvas::initializeGL() or a GLCanvas::resizeGL().  Perhaps
that's what is missing.  After all, the page size changes, etc. to create the
PDF file are a new OpenGL context for which sizing is important.  It could be
that with the QGLWidget (which also has those virtual methods) it is a matter
of luck that no initializeGL() or resizeGL() is needed...and that on the first
draw under QOpenGLWidget the comes out correct by chance (at least for me). 
It might be that when the OpenGL system switches back to on-screen context
that some important re-initialization/re-size is missing.  Furthermore,
hopefully with an appropriate GLCanvas::initializeGL() and
GLCanvas::resizeGL(), the on-screen contortions of resize and redraw at the
larger setup go away during the "print" command.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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