It makes for much more readable code and less error prone code to always
use external packages from within a namespace.
Gadget/Steve
> does anyone know how to run this demo?
>
That demo is very old, and it uses mixed spaces and tabs for indentation... instead of fixing it I salvaged the relevant OpenGL parts and used them with my glutton library.
I have attached the result and you can get glutton from https://bitbucket.org/raz/glutton
> import _glcanvas
> ImportError: /usr/local/lib/python2.7/dist-packages/wx-2.9.3-gtk2/wx/
> _glcanvas.so: undefined symbol: _ZTI14wxEventFunctor
Things like this usually mean that the wx that was used at compile time
(C++ headers and libraries) is not the same one being used (via the
dynamic linker) at run time.
--
Robin Dunn
Software Craftsman
http://wxPython.org
glutton uses glcanvas, so you get the same error as before when you failed to import it.
Am I right to assume that you are trying to use wx binaries you compiled yourself? If so you probably didn't do something right there, or as Robin suggested you have some other wx binaries that are somehow getting in the way.
Hey! -- This looks very cool. Do you have a written description of it
anywhere? intent, use case examples, etc? At a glance, it kind of
looks like an OpenGL version of FloatCanvas -- which would be very
nice.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
> On Mon, Jan 16, 2012 at 12:55 AM, Toni Ruža <gmr...@gmail.com> wrote:
>> you can get glutton from
>> https://bitbucket.org/raz/glutton
>
> Hey! -- This looks very cool.
Thanks, I'm glad you like it.
> Do you have a written description of it
> anywhere? intent, use case examples, etc? At a glance, it kind of
> looks like an OpenGL version of FloatCanvas -- which would be very
> nice.
It was recently born out of my refactoring a mapping application I am making for a client and a desire to test out a particular initialization method idea (see how the Canvas mixins are initialized if you are interested).
It is usable as it is for it's basic purpose but many of the things I imagined for it are still missing. The most important of which are classes for managing the contents of a vbo, interruptible rendering, efficient ttf glyph renderer, tiled raster backgrounds, classes for basic shapes and a layered 2d scene graph. And of course, if it were to compete with FloatCanvas some coordinate system transformation code should be in there too.
There is no documentation yet, only the few use case examples (the test_* files). If you feel like playing with it I would be glad to answer questions and discuss the implementation.
Toni
It's included in the glutton repository or you can get it from https://bitbucket.org/raz/wxeventbinder
> can I run this in wx2.9 version? I could run this in wx2.8 version but
> wx2.9.
>
2.9 was used to make it. It should also work with 2.8 but I didn't test it.
-- Tim Roberts, ti...@probo.com Providenza & Boekelheide, Inc.
> Thanks, I'm glad you like it.
> It was recently born out of my refactoring a mapping application I am making
> for a client and a desire to test out a particular initialization method
> idea (see how the Canvas mixins are initialized if you are interested).
Mapping? you're kidding! We're working on a wxPython/ PyOpenGL based
mapping lib/application as well -- we really should talk. It's in a
bit of a mess now, but here is an older version:
https://bitbucket.org/dhelfman/maproom/wiki/Home
> It is usable as it is for it's basic purpose but many of the things I
> imagined for it are still missing. The most important of which are classes
> for managing the contents of a vbo, interruptible rendering, efficient ttf
> glyph renderer, tiled raster backgrounds, classes for basic shapes and a
> layered 2d scene graph.
All nice stuff to have, of course!
> And of course, if it were to compete with
> FloatCanvas some coordinate system transformation code should be in there
> too.
There is nothing now? How do you do mapping without any coordinate
transformation?
Anyway, the stuff is FloatCanvas is a bit too limited anyway. In
MapRoom, we are using pyproj for full map projection suport, and
GDAL/OGR for geo-spatial data set support.
We do have a tiled mapp implementation there, though it only points to
tiles that are self-generated so far.
> There is no documentation yet, only the few use case examples (the test_*
> files). If you feel like playing with it I would be glad to answer questions
> and discuss the implementation.
I'll try to take a look, yes. There could be a great opportunity for
collaboration here.
> Mapping? you're kidding! We're working on a wxPython/ PyOpenGL based
> mapping lib/application as well -- we really should talk. It's in a
> bit of a mess now, but here is an older version:
>
> https://bitbucket.org/dhelfman/maproom/wiki/Home
As it happens I just stumbled on to this recently and glanced at what it does and how it does it.
Didn't make it run though, just browsed the code a bit and made a mental note to come back to it someday.
>> It is usable as it is for it's basic purpose but many of the things I
>> imagined for it are still missing. The most important of which are classes
>> for managing the contents of a vbo, interruptible rendering, efficient ttf
>> glyph renderer, tiled raster backgrounds, classes for basic shapes and a
>> layered 2d scene graph.
>
> All nice stuff to have, of course!
>
>> And of course, if it were to compete with
>> FloatCanvas some coordinate system transformation code should be in there
>> too.
>
> There is nothing now? How do you do mapping without any coordinate
> transformation?
It's for land surveyors, the areas are small and they work in a state mandated Cartesian-like system. I'm just offsetting coordinates to avoid huge numbers that would mess with OpenGL's 32 bit float accuracy. Coordinates they use look like this:
D150 7466823.174 4958088.962 -2.371
D151 7466826.289 4958085.884 -2.230
D152 7466828.345 4958084.652 -2.111
Units are in meters and the first few digits of x and y have some special meaning about the placement of the coordinate system on the earth.
> Anyway, the stuff is FloatCanvas is a bit too limited anyway. In
> MapRoom, we are using pyproj for full map projection suport, and
> GDAL/OGR for geo-spatial data set support.
Just found out about pyproj recently, I will almost certainly want to use it too.
> We do have a tiled mapp implementation there, though it only points to
> tiles that are self-generated so far.
>
>> There is no documentation yet, only the few use case examples (the test_*
>> files). If you feel like playing with it I would be glad to answer questions
>> and discuss the implementation.
>
> I'll try to take a look, yes. There could be a great opportunity for
> collaboration here.
The projects are similar yet it seems we focused on different areas. The things I focused on are largely connected to making nice COGO automations and UI, easy print layout and dynamically generating the shape geometry based on the scale of the map, shape attributes and a topographic key.
It's a bit of a one-man-army situation here and I wouldn't mind collaboration at all... :)
Hopefully we can merge our efforts into something that is closer to the ambitious end result.
Toni