Hi,
some updates :)
On Wed, 2011-02-09 at 18:26 +0800, Gerrit Voß wrote:
> Hi,
>
> > >
> > > There is some manual post-processing that has to be done after running
> > > gen_bindings.py. I think there are three cases where Py++ generates code
> > > contrary to what it is supposed to do. The other case has to do with
> > > Py++ not currently understanding that OSG::GLUTWindowBase and
> > > OSG::PassiveWindowBase
> > > have OSG::Window as a base class. I haven't figured out the cause for
> > > that problem.
> > ok, I'm not that far yet,
ok, that comes from the fact that these derive from NativeWindow
(typedef to the platform dependent os window) and not from Window
directly any more.
Looking at pyplusplus I don't see good/easy way to convince pyplusplus
to write out that typedef instead of the os window, but I haven't looked
to hard. I changed the gen code so that it patches the corresponding
files after generating the code and included the os windows (at least
win32 and x) into the generation process.
Something like:
for nativeWinDep in ["GLUTWindow", "PassiveWindow"]:
nativeWinDepIn = pj(output_dir, "generated", nativeWinDep +
"Base.pypp.cpp")
_inFileContent = open(nativeWinDepIn, "r").read();
_inFileContent = _inFileContent.replace("XWindow","NativeWindow")
open(nativeWinDepIn, "w").write(_inFileContent)
I found that one can get rid of the
ContainerMixinHeadStageDrawableDesc.pypp.cpp (should not expose
createAspectCopy())
problem modifying the pure virtual members of FieldContainer immediately
after the ModuleBuilder is created and before anything else:
# take the pure virtual functions out immediately otherwise they show
# up in random places.
cls = osg["FieldContainer"]
for pvf in ["createAspectCopy", "shallowCopy",
"shallowCopyDependent", "shallowCopyLocal",
"execSyncV"]:
cls[pvf].ignore = True
cls[pvf].set_virtuality(pd.VIRTUALITY_TYPES.NOT_VIRTUAL)
# ------------ Helper methods and data -------------------- #
# Map from template alias name to real decl wrapper type
print "Building template alias map..."
template_alias_db = {}
osg_typedef_db = {}
The Color3f.pypp.cpp problem I haven't seen yet.
In general I managed to integrate things into the cmake build process.
The biggest change was to build an individual wrapping lib for each
OpenSG lib. For that I had to split gen_bindings.py into the structural
part and the lib dependent parts.
So far it seems to work (except that container.dump() throws an
exception on Windows).
Currently only the generation part is within the main repository, the
created bindings live in the AddOns tree.
kind regards
gerrit
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core