Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. opengl
    Log in to post

    • UNSOLVED How to obtain zero copy rendering in QT display with gstreamer
      Game Development • qtcreator opengl qtmultimedia gstreamer qt-gstreamer • • nishithaa  

      2
      0
      Votes
      2
      Posts
      130
      Views

      @nishithaa I have tried to do this for years to make a VR video player using Qt and I'm finally close to achieving it but without gstreamer. I don't know if gstreamer is a requirement to you but I use libvlc 4, based on this example : https://github.com/videolan/vlc/tree/master/doc/libvlc/QtGL . It compiles and runs well but I don't want to use QOpenGLWidget (I use QWindows with manually-managed QOpenGLContexts) and somehow I can't make it to work in this setup.
    • UNSOLVED qt creator Cmake how include libs ?
      General and Desktop • opengl cmake lib • • timob256  

      2
      0
      Votes
      2
      Posts
      92
      Views

      If it's a library that uses CMake, it's usually pretty straightforward. For glfw, which is one you appear to be using, see its CMake documentation
    • UNSOLVED How to include freeglut in a QWidget?
      General and Desktop • opengl qwidget freeglut • • timob256  

      1
      0
      Votes
      1
      Posts
      80
      Views

      No one has replied

    • UNSOLVED Use multipel QOpenGLWidget or multiple viewport?
      General and Desktop • opengl • • Yixun  

      1
      0
      Votes
      1
      Posts
      77
      Views

      No one has replied

    • UNSOLVED error: opengl32.lib: No such file or directory
      General and Desktop • opengl plotting • • HimanshuKaushik  

      2
      0
      Votes
      2
      Posts
      91
      Views

      @HimanshuKaushik said in error: opengl32.lib: No such file or directory: Please suggest how do I build it in RHEL environment Don't link against opengl32.lib then - it's a windows library.
    • UNSOLVED QOpenGLWidget with shared context
      General and Desktop • opengl qwidget qopenglwidget qopenglcontext • • rtavakko  

      3
      0
      Votes
      3
      Posts
      168
      Views

      @Chris-Kawa That would work for multiple QOpenGLWidgets in the same application. My use case involves sharing the context of one QOpenGLWidget with that of a QOffscreenSurface
    • UNSOLVED QOpenGLWidget black screen as a newly created class
      General and Desktop • opengl desktop openglwidget • • ElonWu  

      2
      0
      Votes
      2
      Posts
      124
      Views

      It's been solved by create a process and launch the QOpenGLWidget's .exe file.
    • UNSOLVED Fragment shader seems to fail to compile but the problematic fragment shader code is not mine
      General and Desktop • opengl • • andyP  

      3
      0
      Votes
      3
      Posts
      291
      Views

      Hi, Which version of Qt are you using ? Do you have the same issue if you run Qt's OpenGL examples ?
    • SOLVED QWebEngineView crashing when ran
      QtWebEngine • opengl qwebengineview • • TheLumbee  

      2
      0
      Votes
      2
      Posts
      850
      Views

      Issue is resolved. I had updated my GPU drivers and after restart, it began to work.
    • UNSOLVED Scenegraph with OpenGL : Unwanted rendering
      QML and Qt Quick • opengl vtk qquickwindow scengraph synchronization • • julienchz  

      6
      0
      Votes
      6
      Posts
      241
      Views

      @JoeCFD I was working on other stuffs but now I remember why I can't override QQuickItem update() method... it is a non-virtual slot, so it can't solve my rendering issues. I am still looking for a solution ...
    • SOLVED Building Qt6.2 for QNX on windows host - can't find opengl
      Qt 6 • opengl qt6 configure • • Rich v  

      2
      0
      Votes
      2
      Posts
      312
      Views

      @Rich-v Closing this. Qt support confirmed they do not support windows hosts building 6.2 for QNX.
    • UNSOLVED Bad performance on Embedded device when rotating qml scene
      Mobile and Embedded • opengl beaglebone rotation linuxfb • • HSK_Developer  

      1
      0
      Votes
      1
      Posts
      173
      Views

      No one has replied

    • UNSOLVED Squares instead of letters when using QPainter::renderText on a texture placed in QOpenGLWidget
      General and Desktop • opengl qt 6 openglwidget • • harlamer  

      2
      0
      Votes
      2
      Posts
      124
      Views

      @harlamer Without a minimal compilable example that demonstrates the problem there's not much we can do. We do not know what platform, what font, what texture and texture setup, how the painter has been set up, what "displayed correctly" means, etc.
    • UNSOLVED QWindow OpenGL Tearing
      General and Desktop • opengl qwindow vsync qsurfaceformat glitch • • rtavakko  

      5
      0
      Votes
      5
      Posts
      235
      Views

      It should be supported indeed. Did you try with a more recent release of Qt ? Like 5.15 or even 6.2 ?
    • UNSOLVED Strange issue with QXcbIntegration: Cannot create platform OpenGL context, neither GLX or EGL are enabled
      Mobile and Embedded • opengl qt quick cross compile raspberrypi qt512.11 • • andy0206  

      13
      0
      Votes
      13
      Posts
      3337
      Views

      @SGaist Ok, thank you. I'll give it a go
    • UNSOLVED How to implement QOpenGLBuffer ::PixelPackBuffer
      General and Desktop • opengl pixel buffer pbo • • Carlos Roberto  

      2
      0
      Votes
      2
      Posts
      287
      Views

      I don't have an exact answer, but do you need any of that PBO stuff? You have a QImage and you want a QOpenGLTexture, so you can just do that directly: https://doc.qt.io/qt-5/qopengltexture.html#QOpenGLTexture-1 The texture object can be made directly from a QImage, with no extra steps. @Carlos-Roberto said in How to implement QOpenGLBuffer ::PixelPackBuffer: Is this possible to keep a Offscreen render in memory and pass it as texture on a future shader call? Sure. Render to your QOpenGLFramebufferObject, release it, and it has a texture() method so you can use it as a texture in a render somewhere else.
    • SOLVED access to qquickframebufferobject renderer instance
      QML and Qt Quick • opengl qquickitem qquickframebuf • • MintogoDeveloper  

      2
      0
      Votes
      2
      Posts
      176
      Views

      I resolve it!
    • UNSOLVED Raspberry Pi 3 and Qt6: ERROR: The OpenGL functionality tests failed!
      Mobile and Embedded • opengl qt6 build from sour raspberrypi3 • • raphasauer  

      1
      0
      Votes
      1
      Posts
      282
      Views

      No one has replied

    • UNSOLVED QGraphicsView vs QScrollArea for lots of primitive geometry rendering
      General and Desktop • opengl qgraphicsview qscrollarea • • SandSnip3r  

      1
      0
      Votes
      1
      Posts
      180
      Views

      No one has replied

    • UNSOLVED Can QT 5.12.x and above version support OpenGL sparse texture feature - ARB_sparse_texture - call glTexPageCommitmentARB()?
      General and Desktop • opengl • • jianlu  

      1
      0
      Votes
      1
      Posts
      152
      Views

      No one has replied

    • SOLVED QWindow on a non-GUI thread
      General and Desktop • opengl qwindow threaded • • rtavakko  

      11
      0
      Votes
      11
      Posts
      645
      Views

      @wrosecrans Yes, I'm rendering using a QOffscreenSurface on a separate thread then displaying the frame on a QWindow on the GUI thread, but it makes sense to have all of the video rendering on the same thread so we're not interfering with the GUI thread. I've successfully tested this concept with GLFW-based OpenGL windows and QT UI. I doubt Vulkan will be any different since from what I understand the render window will still need to sit on the GUI thread.
    • SOLVED Dynamic Textures in Qt3D with C++
      Game Development • opengl qt3d graphics qt5.15.0 • • Jakob Weiss  

      2
      0
      Votes
      2
      Posts
      583
      Views

      Ok, I figured out how to use updateData properly. Leaving this here for posterity. For my use case, I needed to upload a grayscale 3D texture but this should be the same for any texture type: using namespace Qt3DRender; QTexture * tex = new QTexture3D; tex->setSize(vol.width(), vol.height(), vol.depth()); tex->setFormat(QTexture3D::TextureFormat::R8_UNorm); tex->setLayers(1); tex->setGenerateMipMaps(false); QTextureWrapMode wm(QTextureWrapMode::ClampToBorder); tex->setWrapMode(wm); data->setFormat(QOpenGLTexture::TextureFormat::R8_UNorm); data->setWidth(vol.width()); data->setHeight(vol.height()); data->setDepth(vol.depth()); data->setMipLevels(1); data->setLayers(1); data->setPixelFormat(QOpenGLTexture::PixelFormat::Red); data->setPixelType(QOpenGLTexture::PixelType::UInt8); QByteArray qba; qba.setRawData((const char *)vol.dataUint8(), static_cast<int>(vol.byteSize())); data->setData(qba, 1); QTextureDataUpdate update; update.setX(0); update.setY(0); update.setData(data); tex->updateData(update); Qt3DRender::QParameter p(); p.setName("volume"); // the uniform name in the shader p.setValue(QVariant::fromValue(tex)); QMaterial * mat = ...; // queried from the qml mat->addParameter(p); The Qt3D test for texture update was pretty helpful in figuring this out.
    • UNSOLVED Qt6 opengl/gpu assisted QGraphicsView drawing workflow
      General and Desktop • opengl qgraphicsview vulkan • • Dariusz  

      4
      0
      Votes
      4
      Posts
      396
      Views

      Are you thinking of the new RHI abstraction layer ?
    • UNSOLVED QQuickFramebufferObject with external OpenGL in Qt6
      QML and Qt Quick • opengl qt6 fbo • • mnesarco  

      4
      0
      Votes
      4
      Posts
      444
      Views

      Hi this might be due to the new Qt RHI, an abstraction over OpenGL, Vulkan, Metal, DirectX (might have forgotten some or mentioned some that shouldn't be). Qt Quick will no longer be speaking directly to OpenGL but there will be an abstraction on top of it to ensure compatility with other graphical stacks. You will get more info about this by googling around or watching this webinar : https://www.youtube.com/watch?v=eInD6H4XrpM
    • SOLVED Retrive QML's QOpenGL context
      QML and Qt Quick • opengl context-sharing • • ebatsin  

      2
      0
      Votes
      2
      Posts
      328
      Views

      @ebatsin is your QQuickItem in a QQuickWindow? I guess it is the case if you are not using a QQuickWidget. Calling QQuickWindow::openglContext() on your item's window should give you what you need.
    • UNSOLVED Is there a way to refresh some part of QGraphicsScene
      General and Desktop • opengl qgraphicsscene • • aminM  

      1
      0
      Votes
      1
      Posts
      246
      Views

      No one has replied

    • UNSOLVED QtQuick3D:How to customize geometry data and update it in real time?
      QML and Qt Quick • opengl render quick3d • • FinchX  

      5
      0
      Votes
      5
      Posts
      570
      Views

      @oria66 see https://github.com/qt/qtquick3d/blob/14b434d12786ab1b6b90dabb38b0fe4001e54c6a/tests/auto/quick3d/qquick3dgeometry/tst_qquick3dgeometry.cpp
    • SOLVED QOpenGLWidget::update() stops working after a while
      General and Desktop • opengl qopenglwidget qt 5.14 • • Ulysse  

      4
      0
      Votes
      4
      Posts
      498
      Views

      You should not call GUI function from a different thread. Signal and slots is the way to go.
    • SOLVED Where is surface "shininess" specified in these shaders?
      General and Desktop • opengl datavisualizati glshaders • • Tom asso  

      3
      0
      Votes
      3
      Posts
      227
      Views

      Yup, looks like you've spotted it -- in particular, the specular term is materialSpecularColor * lightStrength * pow(cosAlpha, 10) That's the part that will contribute to the shininess of the material. And, materialSpecularColor comes from highp vec3 materialSpecularColor = lightColor.rgb; which is to say that the materialSpecularColor in that shader is not really a property of the material since the value is just from the lighting. Not really the clearest name if you are trying to pick it apart. This type of look is traditionally used for a plastic type material which has white highlights for white lights regardless of the color of the material. If you want something a bit more metallic looking, you can multiply the lightcolor.rgb by some actual material color. This lighting model is a bit of an old school aphysical hack, so you may want to look into to more modern physically based lighting models if you are looking for more realism. But the classic specular + diffuse model is way simpler to understand even if it isn't super accurate to the real world.
    • SOLVED application can't be displayed on embedded platform
      Mobile and Embedded • qml opengl cross compile embedded qt quick 2d ren • • Kechieh_wang  

      8
      0
      Votes
      8
      Posts
      489
      Views

      @sierdzio Ok, i see, I'm using open source. Maybe I need to change a deviece or try to use qwidget. Thanks for your patience.
    • UNSOLVED Rendering issue in QOpenGLWindow
      General and Desktop • opengl • • Julius Aetherwing  

      3
      0
      Votes
      3
      Posts
      259
      Views

      @Julius-Aetherwing Sorry, I'm not familiar with OpenGL, too. But you can find some example code in Qt install dir, something like "C:\Qt\Examples\Qt-5.12.6\opengl" The docs of the examples can be found in All Qt Examples
    • SOLVED Poor quality colored emojis, how to fix that?
      QML and Qt Quick • opengl rendering emoji low quality colored • • jeanmilost  

      8
      0
      Votes
      8
      Posts
      1046
      Views

      @fcarney said in Poor quality colored emojis, how to fix that?: font.hintingPreference: Font.PreferNoHinting Wow excellent! This resolved my issue. Thank you very much
    • UNSOLVED Problem with glBindTexture
      General and Desktop • opengl qopengl qopengltexture bind • • FrankE  

      2
      0
      Votes
      2
      Posts
      599
      Views

      That's becoming even more weird: GLFunctions::gl30()->glGenTextures(1, &texHandle); returns 2 in texHandle. but for using it in the shader it works for a value of 1 in the bindTexture GLFunctions::gl30()->glBindTexture(GL_TEXTURE_2D, texHandle-1); This is driving me nuts.
    • UNSOLVED How to display gpumat image in opengl widget
      General and Desktop • opengl qt 5.14 opencv cpp cuda nvidia • • Imran B  

      4
      0
      Votes
      4
      Posts
      485
      Views

      What processing are you doing with OpenCV ?
    • UNSOLVED From QWidget + QPainter to QOpenGLWidget + QPainter
      General and Desktop • opengl qt 5.6 • • Ulysse  

      4
      0
      Votes
      4
      Posts
      489
      Views

      For those who end up looking here : It seems that this is a Qt 5.6 bug, it works fine in Qt 5.14 Edit : The bug itself may be related to the use of QSurfaceFormat::setDefaultFormat after application startup : Qt 5.14 warned me about a piece of code I was not aware saying that it could cause context sharing issues. Having it removed seems to have solved the bug when i got back to Qt 5.6
    • SOLVED Qt5 opengl widget givng error openglfunctions line 656
      General and Desktop • opengl widget opengl es 3.0 • • gtx0908  

      5
      0
      Votes
      5
      Posts
      444
      Views

      @Chris-Kawa ah ok that worked and learned something new thanks
    • UNSOLVED Adding a QOpenGLWidget to a QWindow greatly impacts its performance
      General and Desktop • opengl performance 5.12.7 • • Makutik  

      3
      0
      Votes
      3
      Posts
      673
      Views

      Thanks, so that is what "OpenGL-based composing" does under the hood! Is there any way to synchronize/batch my QGraphicsView updates, so that there is less of a performance impact? Or would it be preferable to switch the QGraphicsView-based widgets over to render their scene via OpenGL?
    • UNSOLVED QOpenGLWidget VSync
      General and Desktop • opengl qopenglcontext vsync framerate • • rtavakko  

      24
      0
      Votes
      24
      Posts
      2959
      Views

      @mcleary @Patterson Its been a long time since this thread was started but I think it makes sense to post the updates here. I put together a basic project with native OpenGL and also using Qt's QOffscreenSurface and QWindow classes. The github repository can be found here: https://github.com/rtavakko/VSync In this setup there is a single renderer that render to an FBO texture using its own thread and 3 display windows that share the GUI thread with all of them sharing OpenGL contexts together. On my machine I see a clear lag with VSync on when there are 2 or more display windows. Turning VSync off clears the lag. The calcualted FPS values do not indicate any issues in either case which doesn't help but I see a clear difference when I start the application with say 2 displays and then close one of them. I have my internal laptop display and an RCA RT1970 (both running at 1920x1080 - 60Hz) and both connected to my integrated Intel HD 530 GPU. My discrete GPU is an NVIDIA GeForce GTX 950M and I'm running Qt 5.12.0 MSVC2017 64 bit. I'll dig in further myself also with other machines but if anyone has any ideas on what could be causing this, it would really help debug further. Cheers!
    • UNSOLVED How to draw image faster
      General and Desktop • opengl windows 10 qt5.9 • • yijia  

      2
      0
      Votes
      2
      Posts
      359
      Views

      @yijia Maybe with different QLabel and QPixmap or QPicture https://doc.qt.io/qt-5/qlabel.html#pixmap-prop https://doc.qt.io/qt-5/qlabel.html#setPicture