octave-maintainers
[Top][All Lists]
Advanced

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

Re: Plotting in the GUI


From: Shai Ayal
Subject: Re: Plotting in the GUI
Date: Sat, 23 Apr 2011 00:14:01 +0300



On Fri, Apr 22, 2011 at 10:59 PM, Jacob Dawid <address@hidden> wrote:
Hello everybody,

in the last two weeks I have tried to integrate a plotting subsection into Quint. Qt offers a QGLWidget, which handles an OpenGL rendering context itself. Jordi told me in IRC that there has been lots of erffort put into a new fltk rendering backend, which uses OpenGL to plot and is very mighty as of now. What I am interested in is how that plotting backend works (in the sense of an abstract idea or structure) on a code level and where one needs to make cut in order to make use of it. Is it documented somewhere or is there an expert that can give me a rough overview of what's happening there? It's really difficult to grasp the whole from barely staring at thousands of lines of code.

Jacob


Hi Jacob.

There is an opengl-renderer already built into octave. The fltk backend is just a windowing  bit built around it.
The code for the fltk backend is in src/DLD_FUNCTIONS/__init_fltk__.cc

to actually plot:

{
#include "gl-render.h"
#include "graphics.h" 

// Setup OpenGL context 

opengl_renderer renderer;
renderer.draw (gh_manager::get_object (number)); // number is the figure number
}

That's it!

To setup the backend so that it's recognized by octave, look at __init_fltk__ function in that file

Shai


reply via email to

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