Skip to content

Game Development

What can we say - we like games. And you can use Qt to write some. Questions? Ask here.
871 Topics 4.1k Posts
  • What is the best way to load and display .blend files with QT

    Unsolved
    5
    0 Votes
    5 Posts
    911 Views
    W
    @AI_Messiah There isn't any simple/supported way to do that. The intended workflow from Blender is to bake your textures to images, and export as something other than .blend for import into other applications. If you want to use Blender procedural textures in your own renderer, you'll either need to use a ton of Blender code in your app, or study their behavior and try to reimplement them from scratch.
  • Has QT QPixmap / QImage / bindTexture limitations that prevent loading / rendering?

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    SGaistS
    I thought that this image only failed on your system. Does it have any other properties beside the size that makes it different from your other images ? Would it be possible for you to create a minimal compilable example using it ?
  • Where can I find how to use QMesh and QScene in QML

    Unsolved
    1
    0 Votes
    1 Posts
    293 Views
    No one has replied
  • Is QML compatible with C++ OpenGL can I manipulate it with C++ for off screen rendering

    Unsolved
    2
    0 Votes
    2 Posts
    449 Views
    sierdzioS
    In Qt 5, QML is implemented using OpenGL. Can't get more "compatible" than that ;-) Check out QQuickItem documentation for more info. In Qt 6 it is different, because implementation is independent of the 3D API (it uses OpenGL, DirectX, Metal etc. depending on platform). For offscreen rendering, run your app with offscreen platform plugin: yourApp.exe -platform=offscreen
  • Are QMesh and QScene compatible with OpenGL and how do I use them with C++

    Unsolved
    2
    0 Votes
    2 Posts
    449 Views
    A
    Another thing is how would I use physics like gravity, center of mass and collision detection and other stuff
  • How do I add Vertex Induces to this OpenGL code

    Unsolved
    1
    0 Votes
    1 Posts
    668 Views
    No one has replied
  • How do I create an instance of QPaintedTextureImage

    Unsolved
    2
    0 Votes
    2 Posts
    395 Views
    SGaistS
    Hi, As the class documentation states, the QPaintedTextureImage must be attached to a texture. The paint method provides you the QPainter instance you have to use.
  • Where can I find a good QT OpenGL tutorial

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    8Observer88
    You do not need special Qt OpenGL tutorials. Just use a few simple Qt OpenGL examples from Qt Examples https://doc.qt.io/qt-5/examples-widgets-opengl.html and use general OpenGL tutorials like: https://learnopengl.com http://opengl-tutorial.org http://ogldev.org https://open.gl https://thebookofshaders.com My simple examples in Qt OpenGL: Triangle: https://rextester.com/ZTRI45421 Texture: https://rextester.com/BJW63108 3D cube: https://rextester.com/IPI73465 Snake 2D: https://rextester.com/MMC15477 (I translated this example to Qt OpenGL 3.3 from the Python OpenGL 1.1 tutorial: https://noobtuts.com/python/snake-game)
  • Converting From Hexadecimal to QString

    Unsolved
    4
    0 Votes
    4 Posts
    756 Views
    kshegunovK
    What's the point of c here?
  • Can someone help me with this OpenGL code

    Unsolved
    2
    0 Votes
    2 Posts
    661 Views
    kshegunovK
    @AI_Messiah said in Can someone help me with this OpenGL code: I get these errors when I try to run it. These are link errors, you don't even get to the point of running anything. Firstly do switch to QOpenGLWidget instead of the deprecated class you use.
  • how would I feed a QImage continuously into my QOpenGLTexture

    Unsolved
    1
    0 Votes
    1 Posts
    310 Views
    No one has replied
  • Deploying Qt3D application using MinGW 32. Unable to find renderer plugin for opengl

    Solved
    7
    1 Votes
    7 Posts
    2k Views
    8Observer88
    I built Qt to static release and compressed EXE using UPX. My EXE has only 7 MBytes. But I use pure OpenGL without Qt3D. [image: 11f5b800-9f03-4290-b879-d8ff5d9f1765.png] Cube_OpenGLES20_Qt5Cpp.zip [image: e9d00bd8-a9e0-4354-8cba-32b4be6583cc.png]
  • 0 Votes
    2 Posts
    807 Views
    SGaistS
    Hi, Before searching too far, you should add all the error checks that are missing to ensure that what you load and and build passes correctly (shaders, etc.)
  • How to deactivate an MousepressEvent temporary ?

    Unsolved
    3
    0 Votes
    3 Posts
    571 Views
    D
    Thanks thats what I needed
  • 1 Votes
    1 Posts
    1k Views
    No one has replied
  • How to convert Box2D coordinates to QGraphicsView coordinates ?

    Unsolved
    2
    0 Votes
    2 Posts
    525 Views
    8Observer88
    You can use your own ratio (for example 1:50) but Box2D has these limits: Box2D has been tuned to work well with moving shapes between 0.1 and 10 meters. So this means objects between soup cans and buses in size should work well. Static shapes may be up to 50 meters long without trouble. I got it from documentation. 1:30 means that your objects must be from 3 pixels to 300 pixels. If you use 1:50 - your objects must be from 5 pixels to 500 pixels.
  • QOpenGLExtraFunctions is missing glGetTexImage

    Solved
    2
    0 Votes
    2 Posts
    733 Views
    Christian EhrlicherC
    You're most likely looking for QAbstractOpenGLFunctions.
  • Scrolling Map / Moving camera

    Unsolved
    3
    0 Votes
    3 Posts
    698 Views
    8Observer88
    You can use OpenGL in Qt. Qt supports all what you need, for example, you do not need GLM for matrices, you need to use QMatrix4x4. This method allow to set a camera position: https://doc.qt.io/qt-5/qmatrix4x4.html#lookAt I will send you my short examples for beginning in OpenGL: Triangle: https://rextester.com/ZTRI45421 Texture: https://rextester.com/BJW63108 Picking Triangle by Mouse: https://rextester.com/BBX4107 Cube in 3D: https://rextester.com/IPI73465 You can find a lot of very good tutorials about OpenGL and use them in Qt, for example: https://learnopengl.com http://opengl-tutorial.org http://ogldev.org https://open.gl https://thebookofshaders.com
  • Example of similar game to FlappyBird written in Qt/C++

    Unsolved
    3
    5 Votes
    3 Posts
    843 Views
    No one has replied
  • Exporting for console

    Unsolved
    3
    0 Votes
    3 Posts
    532 Views
    L
    Thank You!