My biggest problem with Adobe Flash was that it was a closed, properiaty specification. This means that Adobe controlled what devices get support and which ones do not, which meant that Linux mostly ignored. While there was a version for 32-bit Linux, it had many problems concerning sound output and performance. Also there was no 64-bit version, so I had to run a 32-bit version of Firefox.
However that is about to change with the Open Screen project. Adobe wants to push Flash to every device possible and they realized that a closed system will not be able to do the. And so they are lifting many licensing restrictions, releasing API’s and documentation. Technorati has more details on this.
I think that this is a great move, because I really like the possibilities of Flash. It has shown it’s power as a portable framework for games, applications and animations. It is quite fast (compared to Java), easy to use and easy to develop with. Now that it might become more open, it will become possible to enjoy it’s power on non-Windows based work.
I spent the better part of Friday trying to use Irrlicht to draw 3D scenes in a Qt widget. The code that was sent to me worked perfectly with Qt 4.3, but crashed with a landslide of errors when I compiled Qt 4.4-rc1:
Linux 2.6.18-8.1.3.el5 #1 SMP Mon Apr 30 14:15:37 EDT 2007 i686
Creating X window…
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: GLXBadDrawable
Could not make context current.
XErrorEvent: BadDrawable (invalid Pixmap or Window parameter)
XErrorEvent: BadWindow (invalid Window parameter)
XErrorEvent: BadDrawable (invalid Pixmap or Window parameter)
XErrorEvent: BadDrawable (invalid Pixmap or Window parameter)
Using renderer: OpenGL
Segmentation fault
The code used tried to draw to an existing QWidget by passing the window id (QWidget::winId()) to irrlicht (supported in latest SVN) and creating a context around it. However Qt 4.4 started returning invalid window id’s for some reason. After a bit of hacking, I managed to get the code working perfectly with a QGLWidget, but that had a lot of extraneous features that I did not need (they are provided by irrlicht) and compability with DirectX was in question. After a bit of investigation of the difference between QWidgets and QGLWidgets, I found the following piece of code in the constructor of QGLWidget:
setAttribute(Qt::WA_PaintOnScreen)
This attribute is supposed to allow other libraries to draw into the QWidget, but seemingly it is no longer turned on by default in Qt 4.4. So I tried to put it into the constructor of my irrlichted QWidget and everything worked!
So if you are trying to draw using an exernal library into a QWidget, make sure that WA_PaintOnScreen is turned on by placing the above mentioned code into the constructor.