Questions tagged [qopenglwidget]

44 questions
1
vote
0 answers

Child class of QOpenGLWidget with shared context

I have a QOpenGLWidget class: #ifndef GLWIDGET_H #define GLWIDGET_H #include #include #include #include #include #include…
pazduha
  • 147
  • 3
  • 17
0
votes
1 answer

Upgrade QT from 5.12 to 6.5, QSGSimpleMaterial and openGL gets removed

I upgraded qt5.12.0 to qt6.5.2, and trying to get code compiled in the new version of qt. In our code we use QSGSimpleMaterial and QSGSimpleMaterialShader, and qt openGL: #include "arcnode.h" #include // QSGSimpleMaterial: No…
Fei Su
  • 1
  • 3
0
votes
0 answers

High CPU usage when using QOpenGLWidget to draw YUV data

I implemented a glRender class which subclassed QOpenGLWidget to display YUV data from a H264 decoder (1920x1080@60fps). The problem is that the OpenGL drawing process takes about 60% of processing power of a single core (observed from output of…
Edmond
  • 143
  • 1
  • 10
0
votes
0 answers

A runtime warning if QOpenGLWidget is added via Qt Designer

I have added a QOpenGLWidget object on the main window and this makes the console have a lot of messages such as QOpenGLContext::makeCurrent() called with non-opengl surface 0x2623b7b7460 QRhiGles2: Failed to make context current. Expect bad things…
0
votes
0 answers

QOpenGLWidget crashed when the graphics card is disabled

I run the qt official example "2dpainting" in "C:\Qt\Examples\Qt-5.12.2\opengl\2dpainting". When I set the graphics card (Intel(R) UHD Graphics, it is the graphics card that example is using) is disabled, the example crashed. BUT, at the same time,…
James Xue
  • 1
  • 1
0
votes
0 answers

Must makeCurrent and doneCurrent that come from QOpenGLWidget be used in pairs

I found some examples using makeCurrent and doneCurrent in pairs, such as in Qt example of "X:\Qt\Examples\Qt-5.12.2\opengl\qopenglwidget\glwdiget.cpp", they are called in GLWidget::~GLWidget(). So, Must makeCurrent and doneCurrent that come from…
James Xue
  • 1
  • 1
0
votes
1 answer

How to properly use QOpenGLBuffer.PixelPackBuffer with PyQt5

I am trying to read the color buffer content of the default framebuffer in PyQt5 using pixel buffer object given by the Qt OpenGL framework. It looks like the reading is unsuccessful because the end image always contains all zeros. There's very…
MarsaPalas
  • 375
  • 1
  • 6
  • 19
0
votes
1 answer

QOpenGLWidget not rendring on macos Ventura 13

I'm using qt 6.4 to create a application rendering yuv image with QOpenGLWidget. The code worked properly on windows 10, but didn't rendering anything on my macbook pro (intel chip, Ventura 13.1), and didn't report any error. Here is my code: in…
lsz
  • 13
  • 2
0
votes
0 answers

How to draw a 3d square in Qt?

I've been trying to draw a simple 3d square but I'm getting nothing. From my understanding I'm setting it up correctly. There's a context, vao and vbo with vertex data allocated to it, and the shader is properly linked. My guess is that I'm…
symanoz
  • 51
  • 4
0
votes
0 answers

Window becomes black when there are multi QOpenGLWIdget

I am developing application with QT5.11 and VTK8.2. There are 2 sub windows in the qmdiarea. Each of the windows has a QOpenGLWidget. First it behaves very well. enter image description here When I try to scroll the mdi area, one of the window…
carl
  • 1
  • 1
0
votes
1 answer

QOpenGLWidget swapBuffers happening without redrawing the scene

I am porting code from QGLWidget to QOpenGLWidget and I encounter a different behavior: using QOpenGLWidget some swapBuffers() occur in some window events (like Enter or Leave events), but paintGL() is not called, which ends up showing the wrong…
0
votes
1 answer

Why does QMediaPlayer::setVideoOutput() cause QOpenGLWidget not to play video

Environment OS: Ubuntu 20.04LTS Qt-Version: 5.12.8 Target I have two Forms in my system,the first is QOpenGLWidget(override) to play video, and the Second with some QVideoWidget(override) -s to play video in video-recorder. Problem When the first…
0
votes
0 answers

Qt5: Drawing some graphics on top of QOpenGLWidget

I'm building an app which uses Qt5 that aims to display a video from a digital camera (using Gstramer pipeline). Then with the help of QPainter I'm drawing some graphics on top of it (some text shapes, and icons). The thing is that the video refresh…
Omer
  • 456
  • 1
  • 3
  • 19
0
votes
1 answer

How to grab MainWindow instead of centralWidget?

When I want to grab the whole window, I can only grab what is drawed with OpenGL in centralWidget. QPixmap my_pixmap = QPixmap::grabWidget(ui->OpenGLWidget, 0, 0, frameto264.iWidth, frameto264.iHeigth); What I have draw with QT, like QPixmap or…
0
votes
0 answers

can't glactive multi textures in Qt's paintGL?

I'm working on my ssr demo so I need to store some rendering data to textures for post-process.But when I use these textures,it seems like in paintGL only one texture-unit can be actived: //I did a small test //enable texture unit …
laser_zd
  • 11
  • 2