I know there are a number of cinder users who have interest in linux. I for one am, although I would probably be using a version of Ubuntu that doesn't support X11 (because of unity). I'd also like get the apps I'm building to work in Android...
Have you considered using SDL for Windowing/OpenGL support? I was thinking to involve myself in a port using SDL 1.3 (thereby gaining support for both linux and android) later in the year, since there is some major refactoring planned for cinder in both the app and audio namespaces and it would make more sense to do a port after that began to take shape.
Here is a recent thread on the matter. Actually there we were only discussing which libraries to use..
Thank you. I didn't know that Ubuntu does not support x11 anymore. I'm using Fedora 16 with Gnome 3. Are you sure it does not work? There must be some compatibility mode, otherwise they lose a lot of applications.
I read that 1.3 is a completely new project not suitable for upgrading the old SDL 1.2 package. Because of this SDL 1.3 will be packaged as new independent package once upstream start
releasing versioned archives. But this hasn't happened yet, so it can take a while.
On the other hand, it seemed to me that the window and gl context management of cinder is done in quite low level on other operating systems. It is not built on glut, qt or sdl, because of this, I felt that x11/xgl would be the correct path to try. Maybe we should ask Andrew about this. They should have some control over the chosen libraries anyway if we would like to get the changes merged back to master.
Yea I think now is a good time to find out what works and what doesn't, find a good match of libraries to suit cinders needs, before the app rewrite happens. Then it's new features can be properly matched (things like multiple windows have been mentioned). In other words, excellent job! :)
I'm not sure of the exact state of windowing systems in linux at the moment, but they always seem to be changing, which is a bit different than OS X (I'm not sure about windows, I stay away...). I've read for one that alot of linux distros plan to replace X with Wayland in the near future. Perhaps a layer sitting one above the core windowing system would make for a longer lasting implementation.
A lot of the non-app code I wrote for the Cinder Android port will work in Linux (since Android runs on top of Linux). You should be able to use the ImageIO (optional FreeImage or stb_image backends), and Font/TextureFont (freetype backend) directly, maybe some other stuff too. I tried to use CINDER_LINUX defines for parts that weren't Android specific, let me know if it's useful to you.
I recently synced the Android port with Cinder master:
The point seems to be to achieve a hardware accelerated compositing desktop, but the tricky bit is that it won't work with closed source drivers, such as nVidia's. In that case there is an X fallback. I haven't spotted yet how GL is treated under Wayland if a driver IS available.
I agree that Wayland is not yet prime time, and while SDL 1.3 isn't either, it is closer. I also agree that X is currently the closest app layer in comparison to what cinder is using in OS X, but I wonder if this will change in the next year or so and if it will, is it worth the effort to write an implementation that would support future changes.
Something else prevalent in cinder's architecture is it's forward looking programming constructs, like for instance the version of C++ to come mapped to the std namespace while it is really using boost.
Rich, thanks for your comments. Don't worry, I didn't take it as a criticism of my work. If the community agrees that we should build the implementation based on SDL, I would be happy to put my efforts in that as well. On the other hand, both implementations can live next to each other, since windowing and opengl are only a couple of source files, and there are plenty of things besides these that need to be ported.
Actually I didn't like the apple developer tools either. The scons build system for cinder works in osx as well. You can give it a try if you prefer to work from the command line as I do.
Its wonderful to see this initiative from someone for a linux port, so thank you @gabor_papp ! As far as Wayland and the future of X my personal opinion is that we have a quite a long way before we see this transition happening in reality ..
There are still *many* issues that need to be resolved and the whole matter is not solely based on the support from Canonical and the Linux community ( i.e if proprietary vendors such as Nvidia dont come in the game then the transition will be really difficult I think...Here one of the articles that suggests Nvidia *won't* provide support for Wayland A bit outdated but the situation is still the same I believe) .
Personally I would vote for X / GLX. Even hardcore distributed-graphics frameworks go with X / GLX and they dont seem to plan any transition soon ( see Equalizer ).
This is really great guys - apologies for the delay in my reply.
Here's my take on Linux; I feel like it would take a fair amount of additional momentum to make an official Cinder release like the packaged releases we do for Mac and Windows, but I think we could definitely support Linux in a "from the source" kind of way. Ultimately if there's widespread enough interest we could of course do packaged releases as well, but for the time being this might be a nice middle ground.
Also, my own take on the X vs. Wayland debate is that (from what I've read) Wayland will have X-compatibility for the foreseeable future. So it seems like X is the natural lowest common denominator, and it's definitely more "Cindery" to support the native windowing technique rather than a wrapper like SDL.
Some of the work that has been done on the Android port I do think will be relevant; for example a wrapper around FreeImage would be relevant to both platforms, and even would be an appropriate CinderBlock for the other platforms.
Keep up the awesome work - I'm up for starting to roll in a pull request. I have no doubt there are issues in the existing code base that assume Cocoa vs. Windows inappropriately, so keep an eye out for that kind of stuff...
@andrewfb I think it's excellent to hear your take on this. How do you see the app namespace working for these new architectures?
By the way, Wayland will run X and X will run Wayland, and I think both use a compatibility layer.
After looking into this more that I agree that X is currently the best option for cinder in linux, although that'll probably change before not too long (maybe years, I know :). SDL was a suggestion that would abstract the cinder framework away from distros that plan to migrate to Wayland (most consider X to be bloated and difficult to maintain), although it seems like there is enough motivation from the this community that it won't be necessary.
I think I'd still like to have a go at making a wayland port once Ubuntu officially makes the switch. :) Don't yet know if that will be in April...
no, it's there: https://github.com/gaborpapp/cinder. when i started working on it i didn't make a branch, just forked cinder upstream. i'm planning to revise this and make a proper branch in the future, when i have some time for the linux port.
I restructured the linux port, actually deleted the old fork and forked it again with the proper branch structure. I also changed a bit the SConstruct file of the applications to support cinder blocks in a more elegant way. The linux branch still needs a lot of work, but at least it builds, and basicApp runs. Tested with gcc 4.6.3 on Fedora 16.
So I fired this up a few weeks ago, but decided I didn't have time to mess with it due to life-changing events and whatnot.
I recompiled it again today, and I'd like to comment on a few quirks I've discovered about running it on Ubuntu 12.04, using the default version of gcc, which is 4.6.3.
First, I had to edit the SConscript file to get the samples to compile. I kept getting errors about missing libraries. The curious thing is that all the necessary libraries are mentioned in the file already (of course) but I had to change the order. I edited the script so that X11, libz, and libcurl are at the end of the list of libraries to link, and then everything compiles happily.
I'm not nearly enough of a c++/linux guru to understand why that would be the case, especially since I presume that it works for you as-is.
The other quirk is that when the app windows first launch, all you see is a black screen. In the case of the BasicParticles app, you actually see the particles move across the window but then they get trapped in a thin sliver at the edge. Maximizing and then restoring the window to the original size fixes everything. You can then move the window and resize it as normal.
I'll dig into why that happens when I have time, but I figured I'd throw it out there to see if any of you who actually know what you're doing can diagnose the issue.
Thanks for the feedback! Unfortunately I hadn't had time to work on it recently, but i hope I can get back to it soon.
The linking order issue you are describing can happen if library A for example depends on library B, then library B has to be linked first, so the symbols are found when gcc examines the symbols of library A. It is a bit strange it hasn't happened for me. I will investigate the problem along with the other quirk you are mentioning.
On the other hand, it's good news it compiles on Ubuntu, as it was tested in Fedora only. I assume you tested the linux branch, which I try to update regularly merging the changes from the cinder/dev branch.
No problem. I'd love to see cinder working under linux, so I'd be happy to help however I can.
I am not, unfortunately, a c++ developer of any great skill. I've tinkered around with it, but I have zero experience wrapping libraries or working on anything but tiny projects. That being said, if I could help by debugging/porting samples I would be happy to do so.
Just wanted to stop in to say that I've recently switched to linux and I'm definitely interested in the development of the linux branch. Big thanks to Gabor Papp and anyone else involved in making that happen!
Leave a comment on seppukuzombie's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic