Questions tagged [qopenglfunctions]

QOpenGLFunctions is a class from the Qt Toolkit which provides cross-platform access to the OpenGL ES 2.0 API.

Documentation can be found here (Qt5).

22 questions
4
votes
1 answer

QOpenGLWidget with QApplication?

We have a QWidget based application that was previously using a QWindow for OpenGL rendering. To fit that window in our application we had to use QWidget QWidget::createWindowContainer(QWindow); Previously we only used external to Qt OpenGL…
ComradeJoecool
  • 734
  • 6
  • 18
3
votes
1 answer

How to get homogeneous screen space coordinates in openGL

I'm studying opengl and I'v got i little 3d scene with some objects. In GLSL vertex shader I multiply vertexes on matixes like this: vertexPos= viewMatrix * worldMatrix * modelMatrix * gl_Vertex; gl_Position = vertexPos; vertexPos is a vec4 varying…
3dmodels
  • 103
  • 7
2
votes
0 answers

Get Metal drawing context in Qt 6

When using the Qt OpenGL back-end then it is possible to render custom OpenGL code during Qml scenegraph rendering using the QQuickWindow::beforeRenderPassRecording signal, as described in the Qt documentation:…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
2
votes
0 answers

QOpenGLFunctions.glDrawElements only works with VoidPtr(0)?

I have been trying to draw elements using Qt5's QOpenGLFunctions and QOpenGLExtraFunctions classes, and I've had quite a few issues with argument types (but I will leave other issues out of this particular question). This question pertains to the…
ades
  • 227
  • 2
  • 14
2
votes
0 answers

Texture is rendered blank but glGetTexImage works perfectly

I've written some code that adds a UI overlay to an existing OpenGL application. Unfortunately, I am not proficient in OpenGL but I do know that it somehow always manages to fail on some device. Some backstory: The general pipeline is: Application…
Stefan Fabian
  • 498
  • 4
  • 21
2
votes
2 answers

Depth testing doesn't work when using custom framebuffer

I'm stydying framebuffers and I've made a mirror in my scene. It works fine except the depth testing. Got stuck trying to make it work. (when rendering to default frame buffer - depth testing works fine). Would appreciate any help. Here is the code:…
1
vote
1 answer

Qt + OpenGL4 : glBindVertexArray() creates a GL_INVALID_OPERATION when drawing

As the title suggests, I'm trying to find the cause of a bug in my program. glBindVertexArray() creates a GL_INVALID_OPERATION when drawing a scene in my program, even though I have properly initialized it beforehand. The program uses Qt 5.15, with…
1
vote
0 answers

Porting to Qt5.6 or advanced causes application to use ANGLE instead of OpnelGL 3.x and causes black screen instead of rendering actual image

I have recently ported our application from Qt5.5 to Qt5.12.1. On i5 processor Windows 10 the application runs fine. However on i3 Windows 10 Pc's we get a nothing but a black screen. The application runs fine on i3 Windows 8 though. On further…
1
vote
0 answers

How to do (dynamic) offscreen render with QOffscreenSurface in Qt5 correctly?

I am try to do some offscreen rendering jobs in Qt5.3 and I want to use QOpenGLFramebufferObject::toImage to output each pictures(I want to output a few pictures when render() draws different things). Following the instructions of this, I succeeded…
MartinChan
  • 11
  • 1
  • 4
1
vote
2 answers

How I can get my total GPU memory using Qt's native OpenGL?

I'm trying to get the total amount of GPU memory from my video card using native Qt's OpenGL, I have tried hundred of methods, but none do work. This is what I have at the moment: QOpenGLContext context; context.create(); QOffscreenSurface…
Mr. Hello_world
  • 85
  • 2
  • 10
1
vote
0 answers

How to map a saved texture directly on a QuickItem & display it?

In my Qt app with C++, I am using a QQuickItem derived class to display textures which are produced on every frame render by running some filters on each frame render. this works fine. Next, I used the takeTexture method provided by…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
2 answers

How to use extension like glGenBuffersARB in Qt5?

I am trying desperately to understand the architecture of OpenGL support in Qt5. My current problem is this: I have some existing OpenGL code (desktop, not OpenGL ES) that uses some OpenGL extensions, including glGenBuffersARB. Outside Qt5 getting…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
1
vote
0 answers

how to draw shape from qt framebuffer object using Qpainter

I am new to QtOpengl, I am doing offscreen rendering and storing framebufferobject in QImage, this Qimage I am passing to QPainter to draw circle, but it is drawing 4 circles event for once drawImage qpainter call. 1: Please find the below code…
user3049522
  • 107
  • 1
  • 7
0
votes
0 answers

Do I have to use the OpenGL functions via the QOpenGLFunctions class in order to use "Dynamically Loading Graphics Drivers"?

Do I have to use the OpenGL functions via the QOpenGLFunctions class in order to use "Dynamically Loading Graphics Drivers"? Is QOpenGLFunctions_4_3_Compatibility OK? According to Dynamically Loading Graphics Drivers from Qt, "When a given…
James Xue
  • 1
  • 1
0
votes
0 answers

use a uniform buffer by Qt with OpenGL but it didn't work

I want to use uniform buffer for Matrices of model、view and projection in Qt.I chose QOpenGLExtraFunctions for calling glBindBufferRange function.But I found it no use.My floor.vert and object.vert shows 'model'、'projection' and 'view' were not…
s Fyantu
  • 11
  • 2
1
2