May 17, 2011 in News
For a long time my main programming languages have been SuperCollider and Java but recently I’ve needed to use C++ for more and more things. For instance you can’t write UGens for SuperCollider in Java and some of the realtime graphics I’m using for projects are too demanding for it. Luckily there is a very easy way to start working with some really powerful C++ right away: Qt Frameworks. It is a powerful, cross platform library for creating complex application quickly and easily. It also comes with its own slick IDE, Qt Creator, which is also cross platform and MUCH easier to work with than xcode if you are on a Mac.
For all its perks, there is one major obstacle however: setting up projects. While it is much more straightforward to set up a project in Qt Creator than xcode, there are very few examples for things related to what I’m doing. Also since not many people use it yet for what I do, all the templates and examples of how to do things that exist are typically xcode related.
So after a great deal of quality time with google, and a lot of trial and error(s), I managed to make a couple of templates of my own that work (at least on my computer so far). The first is for making SuperCollider UGens. That one was actually not that hard and only took me about 6 hours of actively working to get it to work (because I’m basically flying around in the dark with this stuff still). At this point it works right for some but not others so hopefully I can debug that soon.
The second template is for Panda3D projects. I started looking at Panda for a) its speed, b) its simple yet powerful API, and c) its ability to import models from Blender via the .x export format. Graphics speed is a huge need for me right now as I’m aiming to put on a show in October involving 360 degree wrap around projection with as much of it done in realtime as possible.
Panda3D has a C++ core with the ability to work in either C++ or Python. I want my projects to compile down to a single binary file so I choose to work completely with C++. Unfortunately there are few examples for working without Python in it and only a couple of terminal commands given to show how to build them. After three days of hunting and beating my head against a wall I finally managed to make a Qt project that works, with two of those days spent just trying to figure out how to force everything to build in 32bit mode.
Overall this experience has been a good one, despite all the setbacks and hours of “what does that error mean?” I haven’t had this much trouble since first I started programming years ago. It is a great feeling though when something that has been eating your soul is finally fixed. With all of that done I can finally get to the fun part: actually doing something with it!