Tuesday, August 27, 2013

VMWare Player and 3D HW support on Linux

There are issues with HW acceleration in VMWare player on linux. Despite Player has 3d support option it doesn't work on most of Linux machines. Problem is related to TF2-S3TC Texture Support in DRI and is described in details here. So if in your country you are allowed to use this extension then you need to enable it in you system. You can do it manually but e.g. in Ubuntu you can install driconf application and change configuration from Gui:

sudo apt-get install driconf

And change change "Enable S3TC texture compression..." in "Image Quality" tab like on following image:

Some of host 3d drivers are blacklisted in VMWare. To ignore this limit just add:

mks.gl.allowBlacklistedDrivers = "TRUE"

To your *.vmx file.

Now you should be able to run your VM guest OS with HW 3d support on Linux host.

Saturday, April 27, 2013

QPlatformInputContext and virtual keyboard mockup


Imagine that you're developer preferring Qt, and:
  • you convinced your manager to try out Qt/Qt Quick as UI framework for your custom device (cash machine, POS, ticket machine etc.) to port some old app. 
  • it lacks hardware and software keyboard (the original application's hardcoded its keyboard inside so you can't reuse it).
  • main Qt5 modules are working on the target device (QtCore, QtGui, QtQuick) 
  • you have to provide demo of Qt Quick features on such device (animations, transitions, particles).  
  • deadline is yesterday.
  • you know that if you provide some forms with text input fields and virtual keyboard along with animations and other fireworks then the status of the meeting will change from demo/POC to pre-alpha presentation :)
Animations, particles, transitions are very easy to implement (you could also take sources of Qt Cinematic Experience and change according to needs). The only question is - how fast one will be able to implement mockup of virtual keyboard and reuse it in Qt Quick text editors? Of course Qt handles some standard input systems like Maliit or IBus but they have some dependencies (ex. D-Bus, python). Assuming that our platform doesn't have Maliit or IBus services installed, the only way to achieve the goal is to write some virtual keyboard from scratch. Q Platform Abstraction is the best way to resolve our problem. It's not  officially documented yet but it's self-explanatory API simplifies adding some platform specific features to Qt. Following steps will show how to create custom virtual keyboard that will work with all standard Qt editors (Qt Quick and QtWidgets).

Monday, March 18, 2013

Simple QML vs EFL comparison


Recently I found this blog post about complete minesweeper clone - elemines - based on Enlightenment Foundation Libraries. As EFL are designed to efficiently work even on PDAs, I came up with an idea to implement similar clone in plain QML/Javascript (QmlMiner) and perform simple comparative analysis. I wondered how the QML version would compare with the EFL one.
Following areas were analyzed:
  1. Developer experience
  2. Source code size and used languages
  3. Memory consumption
  4. Startup time
The comparison was concluded with a limited performance check.
You can look at it from many angles. Just note that I was comparing virtual-machine-based  runtime (Qt4/QML - QtQuick 1.1, JavaScript) with EFL app that is coded in C and compiled into a native binary to see how much advantage the low-level C programming has over more modern technology such as QML.