I recently built python binding for CEGUI from pyogre CVS version of pycegui with OpenGL renderer. It works.
But there was a little problem with it.
gcc_xml which is used by Pyste produces following error:
[color=660000][font=Courier]In file included from include/cegui/CEGUIRenderer.h:32, from include/cegui/CEGUISystem.h:32, from include/cegui/CEGUIWindow.h:36, from include/cegui/elements/CEGUIButtonBase.h:30: include/cegui/CEGUIColourRect.h:41: error: syntax error before `__attribute__' In file included from include/cegui/CEGUISystem.h:32, from include/cegui/CEGUIWindow.h:36, from include/cegui/elements/CEGUIButtonBase.h:30: include/cegui/CEGUIRenderer.h:91: error: type specifier omitted for parameter ` QuadSplitMode' include/cegui/CEGUIRenderer.h:91: error: syntax error before `)' token[/font][/color]
It points to following line:
[color=006600][font=Courier]enum CEGUIBASE_API QuadSplitMode [/font][/color]
I wrote simple python script that replaced all occurencies of declarations of that kind to:
[color=006600][font=Courier]
enum
#ifndef __PYSTE__
CEGUIBASE_API
#endif
QuadSplitMode
[/font][/color]
and defined symbol __PYSTE__ for gcc_xml run.
And it worked. Perhaps you could integrate that fix to CEGUI source (Python script that makes changes is attached to this message).
Or is there some other way to workaround this problem that I am not aware of?
To those who interrested in python binding of CEGUI I can tell that it's complete and works pretty well, although it doesn't have pythonic feel
Of course there were some causalities in API. I lost unicode support and subscribeEvent now is xxsubscribeEvent
Python binding
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Python binding
Cool, glad you got pycegui working, I'll have to try this myself sometime, hehe
The enum issue is really my fault, those 'CEGUIBASE_API' things should not have been put on the enums in the first place . I'll use a global search/replace and remove them all tomorrow, this should allow things to proceed properly
CE.
The enum issue is really my fault, those 'CEGUIBASE_API' things should not have been put on the enums in the first place . I'll use a global search/replace and remove them all tomorrow, this should allow things to proceed properly
CE.
Re: Python binding
Wow, looks like we went after the same thing today (I'm one of the PyOgre developers). I just updated the PyCEGUI bindings to work with the Ogre renderer (http://www.cegui.org.uk/modules/newbb/v ... 07&forum=4). If you have it working with OpenGL in python I'd LOVE to see your codebase to get it working with OpenGL for the next release.
Mind sending me a patch or a set of files to use to get this working under OpenGL for Python? (clay AT bitshifters DOT org). It doesn't have to be complete or clean, just so I can see what you did. I'm not familiar with using OpenGL under python.
Which version of CEGUI did you use? 0.2.0 or CVS?
This would save me a ton of work later.
Thanks!
Clay
Mind sending me a patch or a set of files to use to get this working under OpenGL for Python? (clay AT bitshifters DOT org). It doesn't have to be complete or clean, just so I can see what you did. I'm not familiar with using OpenGL under python.
Which version of CEGUI did you use? 0.2.0 or CVS?
This would save me a ton of work later.
Thanks!
Clay
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Python binding
Just a note to say the issue with the enums has been fixed in CVS for both 0.2.0 and HEAD.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Python binding
Whats the status on this?
Seems two people had CEGUI bindings done back in February!? One OpenGL, one Ogre.
Where have these two projects gone since then?
It would be handy to have for implementing the "preview" button in Centipede's pyGTK-based skin editor.
Seems two people had CEGUI bindings done back in February!? One OpenGL, one Ogre.
Where have these two projects gone since then?
It would be handy to have for implementing the "preview" button in Centipede's pyGTK-based skin editor.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Python binding
I've not heard anything on either of these. I think the one being done by Clay was being switched from Boost:: Python to SWIG, but that's the only news I have
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 8 guests