Skip to content

Game Development

What can we say - we like games. And you can use Qt to write some. Questions? Ask here.
862 Topics 4.0k Posts
  • Switch between MultiPointTouchAreas

    1
    0 Votes
    1 Posts
    649 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    S

    i managed to get an answer while googling, so in case anyone wonders in the future about this problem here is the solution: http://doc.qt.io/qt-5/coordsys.html

    basically QPainter has a setWindow() method that allows us to setup logical coordinates that get transformed to the physical coordinates (that one can change with the setViewport() method).

    anyway sorry for creating a thread about this.

  • QtSerialPort contribution

    5
    0 Votes
    5 Posts
    1k Views
    Y

    [quote author="kuzulis" date="1421696732"]There are already available responses, please read them. :)[/quote]
    Ok, thanx!

  • 0 Votes
    2 Posts
    1k Views
    A

    It doesn't. Intervals < 0 will be ignored.

  • Drawing graphic with random points

    1
    0 Votes
    1 Posts
    953 Views
    No one has replied
  • [Solved] Unreal Engine 4 with Qt Creator

    2
    0 Votes
    2 Posts
    6k Views
    V

    Hi,

    The answer is no. I think the UE4 framework is auto-sufficient to develop your game with C++11.

    You can see inside the MyQtProject.pro file, he removes Qt from dependencies.

    @CONFIG -= qt@

    The line above implies you cannot use Qt to access at the Qt framework and you can't use signal and slot mechanism.

    But, you can try out by yourself.

    Best regards,
    William.

  • How to mix qt3d with standard GUI

    4
    0 Votes
    4 Posts
    2k Views
    S

    Hi baordog, I am trying to do the same i.e. include my qt3d scene object in a GUI form. have yo figured out a way?

  • 0 Votes
    4 Posts
    5k Views
    8Observer88

    Hi! I use OpenGL ES too. Try "my example":https://github.com/8Observer8/TexturedTriangle

  • Qt3D Animations?

    4
    0 Votes
    4 Posts
    2k Views
    Z

    What do you require in a timeline? Right now, we rely upon the animation elements that ship with Qt Quick 2 but it would be good to know if you have specific needs for future versions of Qt3D.

  • 0 Votes
    9 Posts
    4k Views
    C

    Hello ,

    for my last question , i had to use glLoadMatrix function before drawing my cube: @glLoadMatrixf(matrix.constData());@

    @qDebug() << “Transformed pos =” << m * QVector3D( 1.0f, 1.0f, 1.0f );@ unfortunately,it still not giving me the coordinates of vertices. Don't know where is the problem. i had put that line in my paint function. is it correct??

    However , these last days i started to read about Modern openGL, in order to use the first solution given to me here, to get my new vertices' coordinates. My code is like that now:

    @
    void GLWidget::paintGL()
    {

    QMatrix4x4 matrixTransformation;
    matrixTransformation.rotate(alpha, 0,1,0);
    matrixTransformation.rotate(beta, 0, 1, 0);

    QVector3D cameraPosition = matrixTransformation * QVector3D(0,0,distance);
    QVector3D cameraUpDirection = matrixTransformation * QVector3D(0, 1, 0);

    vMatrix.lookAt(cameraPosition, QVector3D(), cameraUpDirection);
    // display the coordinates
    foreach(const QVector3D& p, cameraPosition) {
    qDebug() << "Rotated position =" << matrixTransformation * p;
    }
    shaderProgram.bind();
    shaderProgram.setUniformValue("mvpMatrix", pMatrix * vMatrix *mMatrix);
    shaderProgram.setUniformValue("color", QColor(Qt::white));
    shaderProgram.setAttributeArray("vertex", vertices.constData());
    shaderProgram.enableAttributeArray("vertex");
    glDrawArrays(GL_TRIANGLES, 0,vertices.size());
    shaderProgram.disableAttributeArray("vertex");
    shaderProgram.release();}@
    }
    an error appeared : error C2039: 'const_iterator' : is not a member of 'QVector3D'
    error C2039: 'i' : is not a member of 'QForeachContainer<QVector3D>'

    I had included <Vector > and <iterator> in my header but the error still there.

    Is the way i used correct to get the coordinates of vertices?? the error is from my foreach loop code, and is maybe about the declaration of QVector3D in a qvector3d.h of Qt. How to solve it??

    thanks and sorry for my questions which are maybe stupid, but i 'm still learning OpenGL.

  • Qt5 +Opengl Tutoriel

    4
    0 Votes
    4 Posts
    2k Views
    Z

    I'd also recommend grabbing yourself a copy of a good book. Perhaps the latest edition of the OpenGL SuperBible.

  • QGLTexture2D Texture not showing up

    1
    0 Votes
    1 Posts
    933 Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Decoding Audio with QtMultimedia

    1
    0 Votes
    1 Posts
    689 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    C

    Here is the solution to generate moc_glwidget.cpp:

    right click on the header file in solution explorer and select properties.
    In the properties dialog select under Item Type, custom build tool.
    Then in the command line part, you put this line:

    moc -o moc_glwidget.cpp glwidget.h

    I think my visual studio is working well with OpenGL, i will continue with more exercises.

    Thanks you for your help.

  • Qt 5 and opengl problem!

    8
    0 Votes
    8 Posts
    2k Views
    SGaistS

    Follow that fine wiki "entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows

  • How can I call PaintGL method

    4
    0 Votes
    4 Posts
    1k Views
    SGaistS

    Since the question is getting one the same road as "this":http://qt-project.org/forums/viewthread/49967/ one, let's stop here and only use one thread.

  • 0 Votes
    14 Posts
    4k Views
    S

    But, is there any update method in QGLView?

  • How to use updateGL method qith QGLView

    Locked
    2
    0 Votes
    2 Posts
    821 Views
    SGaistS

    Hi,

    Please don't post the same question on multiple sub-forum, one is enough.

    "Duplicate":http://qt-project.org/forums/viewthread/49967/

  • 0 Votes
    1 Posts
    579 Views
    No one has replied