Navigation

    Qt Forum

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

    • SOLVED QOpenGLWidget and Multiple Textures
      General and Desktop • opengl qopenglwidget image processin shaders glsl • • rtavakko  

      2
      0
      Votes
      2
      Posts
      802
      Views

      Alright after developing spine problems from leaning into my screen for a week and losing more hair than my GPU has cores, I sort of fixed the issue. So for some reason when I was reading data into my textures without setting the active texture back to the GL_TEXTURE0 default, things were going sideways. So basically I had something like: glActiveTexture(GL_TEXTURE0 + inputTextureUnit[vid]); glBindTexture(GL_TEXTURE_2D, inputTextureID[vid]); glTexImage2D(GL_TEXTURE_2D, 0, GL_internalFormat[vid], videoSpecs[vid].videoWidth, videoSpecs[vid].videoHeight, 0, GL_format[vid], GL_UNSIGNED_BYTE, (const void*)(frame)); But this was missing at the end: glBindTexture(GL_TEXTURE_2D, 0); glActiveTexture(GL_TEXTURE0); But I'm not 100% convinced that this is the cause because if I read still images, there is no issue. Its only when I read videos that I see the flickering and black texture issue. It seems like when other widgets start rendering and there is a texture active, they somehow corrupt it but I would certainly appreciate it if anyone has input on what actually might be happening.
    • UNSOLVED QOpenglWidget can not show texture when use glm::ortho,but it work well when I use glut
      General and Desktop • opengl qopenglwidget glsl • • luzhigang  

      1
      0
      Votes
      1
      Posts
      594
      Views

      No one has replied

    • UNSOLVED Recommended way(s) to pre-process certain files before building/running
      General and Desktop • opengl glsl preprocessor • • Ailurus  

      4
      0
      Votes
      4
      Posts
      1138
      Views

      Sorry for the slow reply. Thanks both for your responses! I've had a quick look at GLSL #include before — I'm not exactly sure how to use it (this is a start though) — but apart from that, I'd prefer a way to do this in Qt, possibly more customizable and also driver-independent (e.g. I'm not sure if all graphics drivers support this GLSL extension). In addition to that, it would be a good feature to share with my students who might use Qt also for later/future projects. I'm developing the software in an academic setting — when the (to be included) GLSL files have changed, things need to be (pre)processed again. Basically I wondered whether it's possible to automatically check .glsl files with a preprocessor for some tag (#pragma seems a good choice) and act on it, in this case use some sed/regex line to replace the mentioned file by the contents of that file. This could happen before every Build, or even before every Run (depending on how straightforward it is to save the copy-pasted version after Building and re-use it when Running, or just do this before every Run).
    • UNSOLVED How to figure out which GLSL (ESSL) version Qt uses on my PC?
      QML and Qt Quick • opengl canvas3d opengl es glsl glsl es • • Stefan Monov76  

      1
      0
      Votes
      1
      Posts
      722
      Views

      No one has replied

    • UNSOLVED QOpenGLWidget and Setviewport to QGraphicsView are not working with glsl
      Mobile and Embedded • qgraphicsitem qopenglwidget qglwidget glsl setviewport • • KimYuSung  

      1
      0
      Votes
      1
      Posts
      1755
      Views

      No one has replied

    • Building Qt against specific OpenGL library
      Installation and Deployment • opengl glsl mesa • • Mamegohan  

      1
      0
      Votes
      1
      Posts
      628
      Views

      No one has replied