← Back to team overview

kicad-developers team mailing list archive

Re: wxDC & wxGraphicsContext Test

 

> Hi Marco,
> > We have already a GAL, wxGC does this work: is an astraction layer nothing
> > more nothing less.

> This abstraction depends on wxWidgets and is maintained not by KiCad developers. What's needed is an abstraction for KiCad itself, that is *independent* of wxWidgets. Thus porting to other graphics backends is much easier. To a certain degree gr_basic covers already many functions, however it's not object oriented.

Keeping the same interface of wxGC could be a wrong choice, just to use others work if becomes avaiable ?

> > > Cairo and wxGC have approx. the same drawing speed; OpenGL is much
> > faster than both. 
> > 
> > wxGC is CAIRO on Linux, just remapped calls :)
> > We have to see if is possible enable OpenGL backend in cairo.
> I've changed my implementation a little bit, now I'm using ctime and calculate the frame rate. The results are now more realistic - I'm getting on my system for wxGC 0.55 frames/s, wx + Cairo 0.8 frames/s and OpenGL (wxGLCanvas) 50 frames/s.
> The direct calling of Cairo seems to be a slightly bit faster. In my opinion for the developer it's perhaps even easier to use Cairo directly - alsoit offers more functions than wxGC (which is basically a wrapper).
> 
> Yesterday I've compiled the benchmark for wxWidgets + Cairo under Windows- was pretty easy.

> OpenGL is the hottest candidate if it should be *fast*. Most KiCad graphic primitives are lines, then circles, arcs - circles are easy to draw (withgluDisc), arcs need perhaps our own implementation.
> In my opinion a pure OpenGL variant should be considered; already the 3D view of KiCad is faster than the wxGC main screen.

I could agree on this is why i was asking about the OpenGL backend...
And about printing routines how you which to manage them since for what i recall OpenGL can't print..
And how you want to manage "immediate" drawing ? (cursor, temporary track, etc etc)

--
Marco







References