I'm starting a toy game project, and I'm using go (http://golang.org/)
I think go is an interesting language for games since it's similar in performance to C, yet very concise and has a high signal/noise ratio. It interops nicely with C. Since ogre does not have a "normal" C interface, I wrapped some of the basic logic myself, quick and dirty for experimentation's sake.
The experimental code:
https://github.com/galaktor/gogre3d
Not very clean or idiomatic, but it's worth looking at the code:
using gogre3d: https://github.com/galaktor/gogre3d/blo ... r/runit.go
go wrapper: https://github.com/galaktor/gogre3d/blo ... gogre3d.go
c wrapper: https://github.com/galaktor/gogre3d/blo ... /ogrec.cpp
Disclaimer: I'm not at all an expert C/C++ programmer, and I'm just learning go - don't expect any miracles here
For my purposes at the moment, manually maintaining a custom slim wrapper is sufficient. I am curious however if anybody else is interested in using ogre in go. We might be able to combine efforts and make it more comprehensive.
To wrap c++ for go, it's common to use SWIG. I know that SWIG has been used for other, now pretty much deprecated wrappers (OgreDotNet, PyOgre). I don't know SWIG very well, nor the gritty details of the Ogre code base, so it's hard for me to understand why SWIG was a problem. If anybody here can give me some better understanding of pros/cons of SWIG with ogre, I'd appreciate it! I'll play around a bit with it myself, but I won't spend much time on it just for myself. Maybe if there's more interest, and possibly some support.
So, bottom line: anybody else interested in getting ogre working in golang, and willing to help make it happen?
Sorry if this is the wrong spot for this post, I couldn't find a good place in the "Addons" forum...
gogre3d - using ogre3d in go
-
- Kobold
- Posts: 33
- Joined: Tue Nov 04, 2008 10:57 pm
- x 5
gogre3d - using ogre3d in go
gogre3d - ogre bindings for golang
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
-
- Ogre Magi
- Posts: 1172
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 76
Re: gogre3d - using ogre3d in go
C bindings for OGRE are in development not sure the extent of their completness
http://ogre3d.org/forums/viewtopic.php?f=3&t=63153
http://ogre3d.org/forums/viewtopic.php?f=3&t=63153
There are 10 types of people in the world: Those who understand binary, and those who don't...
-
- Kobold
- Posts: 33
- Joined: Tue Nov 04, 2008 10:57 pm
- x 5
Re: gogre3d - using ogre3d in go
I'll have a look at that C interface. It's almost guaranteed to be better than my dirty c-level access.
gogre3d - ogre bindings for golang
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
-
- Kobold
- Posts: 33
- Joined: Tue Nov 04, 2008 10:57 pm
- x 5
Re: gogre3d - using ogre3d in go
A few thoughts regarding that C interface come to mind - I'll try to contact the authors separately, but I might as well mention it here:
- does it compile to a single dll?
- what are the dependencies for building the wrapper? it shouldn't be more than the used ogre header files, yet from looking at CMakeLists.txt, it seems to be doing more
- can I link to it using just ogre_interface.h? that would be very convenient
- is it being used/maintained at all? Last checkin was March 2011...
gogre3d - ogre bindings for golang
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
https://github.com/galaktor/gogre3d
llcoi - Low level C Ogre3D Interface
https://bitbucket.org/galaktor/llcoi
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
Re: gogre3d - using ogre3d in go
Nice work, I totally missed that Kudos
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon