Kevin Altis wrote:
So, what's wrong with wxOGL and wxCanvas for the object canvas? It would be
nice to have the reasons stated clearly, so we can use that as part of our
design guidelines for a new object canvas.
Bad APIs, missing functionality, too slow? I haven't used either, so I don't
know the issues or why Chris ended up writing his own object canvas.
Honestly, I didn't look nearly as hard at wxOGL as I should have. At
first glance, it looked very much designed for drawing the kind of
things you'd need for a CASE tool, which is what, it was designed for.
It didn't look to me that it would be suitable as a general purpose
drawing framework, but that may just be function of the examples I had
seen. I really didn't look very hard. On the other hand, drawing in
Floating Point coordinates is critical for my purposes, so I think it
would fail in that regard anyway. In addition to floating point
coordinates one of my uses is for drawing map stuff, in latitude,
longitude coordinates, which requires a transformation (projection) from
a sphere to a flat surface.
As for wxCanvas (are you talking about Klass' canvas?), it simply wasn't
ready when I started my project. I have intended to keep an eye on it,
as it looks like Klass has done some fabulous work. One issue I had is
that for my purpose, I generally need to represent data as a picture,
rather than drawing a picture for its own sake. These are similar, but
there are differences in the details of what features you need. For
example, when specifying the line width with which to draw a polygon, I
usually want to specify the width in pixels, and have the width not
change when zooming. This is because when zoomed out you need the line
to be fat enough to see, but when zoomed in, you want to be able to see
more detail, and thus need a thinner line. When drawing a picture,
rather than data, you want the line widths to scale with everything else
when zooming in and out. Klass' original motivation for the canvas was a
drawing tool, so that's how it works. We discussed supporting both
approaches, and there were some difficulties, mostly around how you
would compute bounding boxes accurately, etc. I don't know if he ended
up supporting constant line widths or not.
Another issue for me is that neither option was exactly what I needed,
and both are in C++, so I would need to use C++ to add to them to fit my
needs, and I'm not a C++ programmer. In the long run, I'm hoping to get
one of my colleagues working on a C++ canvas, which might follow my
Python code, but might also be based on either xwOGL or wxCanvas. I'm
not sure when, if ever that will happen, however, I'm still trying to
sell wxWindows/wxPython to my group.
By the way, I have not followed wxCanvas development for a while: is it
ready to be wrapped for wxPython?
I'd love to hear what uses people have found for wxOGL, and what their
experiences are.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov