Questions tagged [qtopengl]

The QtOpenGL module offers classes that provide a C++ interface to OpenGL in Qt applications.

OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms.

Note: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.

The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents.

Reference: http://qt-project.org/doc/qt-4.8/qtopengl.html

98 questions
0
votes
0 answers

How to create a QImage from a OpenGL texture in Qt?

How can I create a QImage from a OpenGL 2d texture in Qt? I have the texture_id which is GLuint of the texture and I know its size. I am even able to render the texture on a QQuickItem. I don't want to render it but I need to download the data on to…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

QgraphicsView slow line render

I have been trying to make a line viewer in PyQt5, the main process is to load a geopackage file using geopandas and adding it to a QGrapihcsView scene. The QGrapichsView class is a zoom and pan capable. For this example I used a generic line…
MBV
  • 591
  • 3
  • 17
0
votes
1 answer

How to make WA_TranslucentBackground work on Windows without using FramelessWindowHint?

Im using setAttribute(Qt::WA_TranslucentBackground); to make my QMainWindow background transparent, however, this attribute only work if: I also set: setWindowFlag(Qt::FramelessWindowHint); or, have at least one QOpenGLWidget in my GUI. I have no…
Cesar
  • 41
  • 2
  • 5
  • 16
0
votes
0 answers

OpenGL with SRgb color space no longer works in Qt6.4+

I have an OpenGL application with a QWidget-based (no QtQuick/QML) Qt UI that I ported from Qt5 to Qt6. Most of it works fine, except that with Qt 6.4 and the Qt 6.5 beta (Qt up to 6.3 works fine!), the QSurfaceFormat color space setting no longer…
Joe
  • 6,497
  • 4
  • 29
  • 55
0
votes
2 answers

How to create a OpenGL widget in Qt and VIsual Studio?

I'm trying to create a OpenGL widget using Qt 6.4 and VStudio 2022, i have enable the Qt OpenGL widget under the modules, but i still getting a lot of compile errors: LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl…
Cesar
  • 41
  • 2
  • 5
  • 16
0
votes
0 answers

Is there a way to batch render textures in Qt?

I have been trying to batch render two different pictures. I have 2 different QOpenGLTexture objects I want to draw in a single draw call with batch rendering but am struggling. Both texture objects have id's but only the last texture objects…
symanoz
  • 51
  • 4
0
votes
0 answers

Why OpenGL 3D texture sampling to wrong color?

I have some trouble when using 3D-LUT in GLSL shader, so I'm trying to test a minimal 3D-LUT, which is of size 2x2x2, totally 8 colors. My pixel data is static const unsigned char lutData222[] = { 0, 0, 0, 255, 0, 0, 0,255, 0, …
Sang
  • 141
  • 11
0
votes
1 answer

How to send data from another thread to QOpenGLWidget object in GUI thread?

I have a GUI thread where the QOpenGLWidget object is created. I use another thread to process data and generate RGBA values for an image. I cannot call the QOpenGLWidget object in the data processing thread. How can I send data from the data…
kevin lee
  • 13
  • 6
0
votes
1 answer

pyinstaller fails to find QtOpenGl for QtWebEngineWidgets.QWebEngineView (used to display PDFs)

My code is running fine in Pycharm. It properly displays PDFs. When I make the pyinstaller version, it will fail and give this message 'Library not loaded: @rpath/QtOpenGL.framework/Versions/A/QtOpenGL'. I use pyinstaller from my non-virtual…
0
votes
1 answer

How to create QOffscreenSurface with alpha?

Found an example of offscreen rendering in QT (there is a working code in Update 1). But was unable to make it support alpha, see the code below: QSurfaceFormat surfaceFormat; …
Dmitriano
  • 1,878
  • 13
  • 29
0
votes
1 answer

Calling glActiveTexture(GL_TEXTURE1) before update() on a QOpenGLWidget causes textures to appear black

When inheriting from QOpenGLWidget and QOpenGLFunctions_4_5_Core, if I call glActiveTexture(GL_TEXTURE1) (or any other non-zero number) before calling update() textures appear completely black on the screen. Relevant code snippets: void…
Lucas
  • 55
  • 1
  • 5
0
votes
1 answer

How to vizualize Images from different threads in real time?

I have 4 camera objects. Each camera Object refreshes frames independently. I would like to visualize these frames on my videowall class. Basicly, my videowall is just a gridlayout child with draw Widget methods. Each camera object has imageHolder…
hagor
  • 304
  • 1
  • 15
0
votes
0 answers

glDrawElements works under Linux but not under Windows

I simply want to render a quad. I'm using QtOpengWindows for my rendering class and here is the code for rendering a quad: QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); float x0 = -(float)150.f, y0 = -(float)150.f; float x1 = …
user3178756
  • 555
  • 1
  • 5
  • 17
0
votes
1 answer

Create Cubemap from QOpenGLFramebuffer

I want to implement cubemap convolution for IBL using a Qt widget. When implementing conversion from an equirectangular map to a cubemap I ran into an error I do not understand: Here is how I create my renderbuffer: QOpenGLFramebufferObjectFormat…
vakyas
  • 25
  • 1
  • 7
0
votes
1 answer

glTexSubImage3D vs QOpenGLTexture setData

To my understanding QOpenGLTexture::setData is equivalent to glTexImage3D in case of texture array or 3D texture. Now if I want to use PBO to update the texture at runtime, I need to use glTexSubImage3D instead of glTexImage3D, what is the…
user3178756
  • 555
  • 1
  • 5
  • 17