Stuck with this one : How the hell to transcribe this Panda3D Python code into C++ (btw this code is part of the manual…) ??
manager = FilterManager(base.win, base.cam)
tex = Texture()
quad = manager.renderSceneInto(colortex=tex)
Any hints highly appreciated
Yeah, I see what you mean. In the manual under: Common Image Filters for C++ there is a note at the top:
Note: Sorry, but the CommonFilters and FilterManager classes are implemented in Python and will not be of much use to C++ users.
My next step would be to look into the Panda folders for the .py file that has the FilterManager class and see what it it doing, maybe the parts of that have a direct translation into C++.
Don’t have time right now to look at it myself…
I’ll try and have a look.
Hey I’ve given a look at FilterManager.py.
This won’t be a piece of cake to have FilterManager ported to C++…
It’s a pity since I wrote my app in Python to get a feeling of what could be feasible in Panda3D, but with the clear intent to translate the code into C++.
Now it appears that I’m hiting a brick wall…
I tried my best to do my homework… here is a very first draft of converting FilterManager.py into its C++ equivalent.
The code “almost” ( ) compiles. But the quick and dirty way to translate without completely understanding is far from being satisfactory…
Could one of our Panda3D gurus give a look and alter it so that it can be beneficial to the whole community.
CODE DOWNLOAD :
mediafire.com/file/1gfumjjbt … anager.cpp