Qt 4.6+ Work On Pandora?


I'll try again :) :
LineOf7s (the first time) said:
If we're curious as to what's in the Angstrom repo already, is http://www.angstrom-...ution.org/repo/ the best place to look, or do informed people have a nicerer place to go?
 
Last edited by a moderator:
john4p said:
By the time you have your Pandora Qt 4.7 will fully work on it...

As will QT 5
 
Last edited by a moderator:
Someone summoned me? Sorry, my interwebs were cludged, so I was unable to respond to this thread in less than 5 minutes after it was created (like I usually do).

Trouble, you say? I'll give you trouble all right.

The status quo with Qt is as follows:
  • The Qt version in the repositories is 4.6.2-r17.6.5.
  • This means that you'll have access to the animation frameworks, the stability patches in 4.6.1,
  • But you will *not* have access to the Declarative API; that will be introduced in Qt 4.7 and is only available as a developers preview for Qt 4.6.1.
  • There are two versions: Qt embedded and Qt X11. The X11 version is installed by default, and the embedded version probably isn't.
  • The X11 version will probably (just guessing here) have access to the user-space X11 SGX driver, provided that the stars are aligned correctly, so you will be able to use all OpenGL ES 2.0 features through Qt via raw GL calls. I don't know whether OpenVG is available, but Cairo should be.
  • There is also a rasterization engine for OpenGL ES, so anything you draw in 2D will be drawn hardware-accelerated

So, your best bet for getting the most speed out of Qt is:
  • GUI applications (with widgets etc...):
    • Use Qt like normal; nothing to think about here. Just try to avoid using float-based colors (color.redF() etc) and matrix-based transforms.
  • Games:
    • Use a QGraphicsView to display your stuff.
    • Give it a QGLWidget for its viewport to get hardware-accelerated drawing.
    • If you need to scale anything, no problem; Qt won't use floats for linear scales.
    • If you want to rotate something, do so sparingly, since I don't know whether "qreal" is defined to be a "double" or a "float", and if it's a "double", rotations will be *slow* obviously.
    • As always, try to use the animation framework as much as possible since it does most things in an efficient, scene-graph-tree-optimized way.

Ideal (kinda) top widget for a game (hastily written from on top of my head):
Code:
class GameWindow : public QGraphicsView
{
public:
    explicit GameWindow(const QWidget *parent = 0);

protected:
    QGraphicsScene scene;
};

GameWindow::GameWindow(const QWidget *parent)
    : QGraphicsView(parent)
{
    setViewport(new QGLWidget(this)); //To get OpenGL acceleration
    setScene(scene); //To view scene contents
    setFixedSize(800, 480); //To fix size issues on platforms other than the Pandora

    scene.addPixmap(QPixmap(":/sprites/mysprite.png")); //Displays the pixmap "mysprite.png" that is stored as a QRC resource
}

void main(const int argc, const char *argv[])
{
    QApplication app(argc, argv);

    GameWindow window;
    window.showMaximized();

    app.exec();
}

Final flamebait: I think that Qt rendering will be much faster than SDL if you want to go beyond normal sprites. E.g. if you want things that are animated, change appearance, become transformed in various ways, etc, Qt will offer you *much* better drawing speeds than SDL ever will. And using a QGraphicsScene is much easier than having to blit manually anyways.
 
SDL versus QT .. don't go there; its too complicated to just sum up so easily. (ie: SDL with plkuggable drivers, so it runs fine on /deb/fb and X11 both; sure, you can sort of do it with rebuilds using QT Embedded etc, but lie I said.. just different. QT with hw will actually be faster for a lot of things, but like anythin else.. if you write very particular to the target toolkit and platform, it'll be faster than something not targetted, so SDL > QT, and QT > SDL :) SDL on /deb/fb versus X11 driver, versus using GLES. Using straiught /dev/fb, or trying to muck with the hw surfaces directly using mmap, or...

We've a lot of options; they're all good, and they're all fun to play with; as coders, we do things for fun or for work, but let us not put up the blinders and ignore alternatives :)

QT4.6 X11 is onboard and used by a number of things. See my shitty Kronos video from a month or two ago, thats a basic shimmy on top of QT :)

I forget if pyqt is on; I check for people, post, and then forget. But pyqt is going to float my boat on the pandora a lot I imagine :)

jeff
 
I didn't try a QGLWidget; I should try one of the demos, see how it performs ..

The real question is why didn't I put gcc onto my Pandora SD yet? :)

jeff
 
... and it -QT libraries- work or could work on WIZ??
 
dflemstr said:
[*]If you want to rotate something, do so sparingly, since I don't know whether "qreal" is defined to be a "double" or a "float", and if it's a "double", rotations will be *slow* obviously.
By 'accident' I ran into this thread and the QT documentation on the same day. In case anyone's still wondering:

QT 4.6 doc said:
Typedef for double on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, qreal is a typedef for float for performance reasons.

Complete list: http://doc.qt.nokia.com/4.6/qtglobal.html
 
Last edited by a moderator:
Back
Top