Developing with GTK# + SharpDX + OpenTK

In this article we are going to show the reasons that led us to develop the new Wave Visual Editor on GTK# and the pros and cons of developing a cross-platform UI app with this technology.

When we began to develop the new Wave Visual Editor, we spent a great deal of time investigating different UI application frameworks. The researched technologies were Windows Form, WPF, GTK#, Cocoa# and Xwt.

Every technology has advantages and disadvantages, but we focussed in some important parameters:

  • Supported Platforms: how many platforms are supported? (Windows, MacOS and Linux were our target). There is always the question: Is it better to use a native technology or a cross-platform technology? Our experience is that you get better look and feel and performance using native technologies, but you need to invest a significant amount of time. In our case we have a particular application with a large amount of UI work on Windows, MacOSX and Linux, so we needed to multiply by 3 our development and maintenance time with native technologies.
  • Documentation and online resources: When starting a project with a specific technology it is very important to know it has a good, extensive and updated documentation provided by a company or by a great developers’ community. We have also require stability and if this technology was used on important applications before.
  • Integration with DirectX: In our case we use DirectX to render engine scenes on Windows, so it was very important for us to know if it was possible to integrate the 3D DirectX viewer panel with this technology and whether there was success documentation exsamples.
  • Integration with OpenGL: Wave Engine use OpenGL to render scenes on MacOSX and Linux, so it was also very important for us to know whether it was possible to integrate of the 3D OpenGL viewer panel with this technology and if it was fast.

After analyzing every technology, we decided to go for GTK# technology, because it was the best fit for our needs. GTK# is cross-platform and it is  surprisingly well finished. In this way we have saved considerable amounts of development and maintenancetime because most code is reusable.

Concerning to documentation, there is a weakness in this technology because although there is a good GTK+ documentation, the C# wrapper is obsolete and there are poor online resources. Therefore we spent large amounts of time investigating with this technology and learning some tricks.

Finally one of the cornerstones where we had to work was SharpDX (DirectX C# wrapper) and OpenTK (OpenGL c# wrapper) integrations. We found a Khronos Group article from April 2010 where they published a GTKSharp widget with OpenTK integration on Windows, MacOSX and Linux. Although the article was obsolete widget it offered a good base component on which to work from to get the SharpDX and OpenTK integration. We have found good results with high performance in every platform: Windows-SharpDX, MacOSX-OpenTK and Linux-OpenTK.

In summary we think that we made a great decision using this technology because aside from some little details, it has pushed us to achieve our goals during all cross-platform development processes.

We will continue revealing more WaveEngine 2.0 features in the upcomming days.

Stay tuned at @waveengineteam and

Published by

Jorge Canton

He is an engineer in computer science, #WaveEngine team member is a technology enthusiast determined to stay on the cutting edge of development. He is a very dynamic person who loves solving challenges, puzzles and riddles. He usually spends his free time with his family or playing videogames on his console or mobile phone and plays the piano to relax.

Leave a Reply

Your email address will not be published. Required fields are marked *