Brahma on Mono!

Brahma now runs on Mono! Here is a screenshot of the Mandelbrot sample running under Mono (on Windows, at the moment). I’m trying to get it working on Linux, but I haven’t been able to get MonoDevelop up on my PCLinuxOS, so I’m stuck with an empty X11Context implementation.

Any help working with Mono on Linux would be appreciated, please give me a holler.

Yippeeeee!

Mandelbrot-Mono-Windows

11 comments to Brahma on Mono!

  • Wow, this is absolutely fantastic news!

    I’m sorry to hear you can’t get MonoDevelop running… if you mail the MonoDevelop list or go into #monodevelop on GIMPNet IRC I may be able to help you get it going (I’ll be away at PDC next week though, so the mailing list may be best).

    You might find http://sourceforge.net/projects/glwidget/ useful to interoperate with GTK# — it work on both Windows and Linux (Banshee has a version with some patches to fix it for Linux). Also AFAIK OpenTK has a Winforms GL widget that also works on both Windows and Linux.

  • Thanks, I’ve been trying hard to make this happen.

    I’ll definitely go over to the list and ask around. I’m getting Fedora 9, in the hopes that I can install the rpm (which seems to be the latest). I also managed to get things working on Ubuntu (Hardy Heron), but for some reason the C# 3.0 features were disabled, and I got compile errors about constructs like collection initializers and lambda expressions.

    At the moment, Brahma works well with Windows Forms. Brahma providers also allow you to pass in an existing rendering context, so it’s possible to initialize OpenGL by yourself on a GTK# control, and then use that context with Brahma. I’m writing my own platform-independent abstraction since most other abstractions (including OpenTk) deal with rendering to screen, and have controls rather than a non-visual context.

  • Very interesting work, indeed!

    I’m quite sure that both WinForms and GTK allow you to hide a window, so it should be simple to get something up and running using an existing abstraction. I’m planning to add off-screen rendering to OpenTK at some point, but I don’t feel like fighting with X11 right now O)

    Regarding your dev environment, I’d suggest setting up a couple of Virtual Machines. I typically run Windows VMs on Linux hosts, placing projects on shared folders. This way I can code on Visual Studio and test on both operating systems without wasting time.

    I’m also looking forward to Monodevelop 2 (graphical debugger and xbuild at last) which should help move most coding to the linux side.

  • Thanks, Stephen. I’ve actually got the Windows part running, and running quite well at the moment, and since I have a bunch of holidays here (its Diwali – festival time), I’m trying to get the X11 context up, too. I actually tried two abstractions, Glfw and OpenTk, but wasn’t fully satisfied with the way things worked when done. :) I even went over to the OpenTk forum and asked (http://www.opentk.com/node/496), but I got no reply so I decided to take matters into my own hands.

    I had the same thought about virtual machines, but I realized that I have next to no experience coding for Linux, and therefore I’d need a lot of tracing code to figure out what went wrong when running binaries. I’m trying to get the 2.0 beta of MonoDevelop up on my machine so I get all of those features, and I’m going to give it a shot with Fedora since Monodevelop seems to have an rpm.

  • Great work – I know we’d be VERY interested in testing this out at work.

    Have you considered the question of how to do it without X11, and without a GUI? Fr’example, running on a Tesla card without X running?

  • Nope, I never considered that possibility because I’ve never worked with a Tesla box before, leave alone on Linux :) – side question: Without X, can we even initialize OpenGL?

    At this point, I have a static class called Platform that examines the current environment and finds out what Brahma is running on. The enum returned is then sent to a factory that returns a context appropriate to the platform. All of this lies in the Brahma.Platform project. – Good idea?

    I went over to your homepage, and you seem to have a lot of *nix knowlege. I’d be most grateful for any help offered in trying to get Brahma run on as many platforms as possible.

  • Can you init OpenGL without X? You know, I’m not too sure. I imagine there must be SOMETHING – there always is with Linux.

    Failing that, there’s CUDA, which you previously expressed an interest in supporting. I’m looking into arranging access for you to one of our CUDA-capable Tesla machines. Worst-case scenario, you can make CUDA work without X, but not OpenGL.

  • Ananth,

    Can you e-mail me on the address that your comment system is asking me to fill in? This is getting a lot more complicated than it should be at my end, so I could do with communicating in a more direct manner.

  • VERY interesting stuff. Is there a way to get the latest version of Brahma? The sourceforge still points to 0.3, and not 2.0. I would like to give it a shot on my MacBookPro (Nvidia 8600M GT inside), using Mono and MonoDevelop.

  • Ok, the 0.3 version IS Brahma 2. I guess I oughta update the version numbers, but my reasoning was that the first “version” of Brahma used a different method (decompiling IL) as opposed to Brahma 2 (LINQ and expression trees). And since I never really released the first version … anyway, the short of it is; go ahead and check out the latest version from SVN. :)

    PS: I would be most thankful for any help for getting Brahma to run on other platforms. I tried working with Mono on Linux but just couldn’t get it to work.

  • Judicator

    I’m a linux addict and .net platform addict. I haven’t seen the Brahma source code but one thing is clear :
    1 – It is possible to run opengl without X ….. however it needs a lot of programming where just running X may be sufficient. By the way watch out with the MESA driver witch simulate accelerator cards with the processor. you need to see on the xorg side or x11r6 side.
    2 – I haven’t seen the library that needs Brahma, but if it uses opengl may I suggest to look by how to implement opengl with linux …….. the API is surely different.
    3 – Instead of trying to use MonoDevelop I would suggest you to use sharpdevelop 3 witch include mono support (with gtk).
    4 – There is a lot of differences between windows and linux. One of them, witch impacts you, is the graphic managment. You have two main layers : the graphic layer and the windows managment layer. The graphic layer is the one that represents your graphic card (xorg or the old x11r6 …… mainly known as X11 or X) and the windows manager layer is the one that is in charge of the interface (where gtk runs on witch can be Gnome or KDE or xfce). So, basicaly for having an opengl thing with gtk you need to manage with both.

    Hope that this information helps.

    From my side I’ll try to make run the brahma on linux asap.

    Best regards.

Discuss

 

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Twitter Updates