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
5
votes
2 answers

3D model (.3ds) in Qt OpenGL widget

I need to load a 3D model (.3ds file) in my QGLWidget (Qt OpenGL widget). I am looking for a cross-platform solution working under Linux, Windows and Mac. I have found some solutions on the web, but still have not been able to integrate any of them…
Mikael
  • 183
  • 3
  • 4
  • 11
4
votes
1 answer

QChart z-values not respected when using openGL acceleration?

I'm trying to do something almost exactly the same as the Qt5 callout example, but I've discovered that if you call setUseOpenGL(true) on the series, then the callout appears under the line instead of above it. This is true no matter what zValue is…
Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
3
votes
1 answer

Error while drawing item

I am running into an error with pyqtgraph. I am trying to plot a 3D scatterplot with OpenGL. However, when I run my code, I get a blank plot and this output: |==============================>> | Traceback (most recent call last): | File…
3
votes
1 answer

QT installation - OpenGL (No ANGLE)

I have installed the last version of QT but it seems that this one contains some DirectX calls, so I expect that the default installer use ANGLE ! I wish to install a 100% openGL version, but I can't find one ! Any idea ? Thx
CDZ
  • 813
  • 1
  • 11
  • 27
3
votes
1 answer

QOpenGLWidget's resizeGL is NOT the place to call glViewport?

I am experimenting with the new QOpenGLWidget class (note that this is not the QGLWidget class). I am drawing a triangle. I have a trivial vertex shader which receives coordinates in clip space, so no matrices or projections are involved. One of…
Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434
3
votes
0 answers

OpenSceneGraph integration in Qt MainWindow

I have the following code which is a modification of the code given by OpenSceneGraph (https://github.com/openscenegraph/osg/blob/master/examples/osgviewerQt/osgviewerQt.cpp) for integrating OSG with Qt: OSGViewer.h #ifndef OSGVIEWER_H #define…
Kostas
  • 270
  • 1
  • 3
  • 10
2
votes
1 answer

Qt: Semi-transparent window with Direct3D RHI on Windows

I'm trying to create a semi-transparent application window with Qt6 on Windows. For that, I set the background color of the Window element to "#88000000". This works as expected in Linux, but results in a fully opaque window on Windows. Digging…
Irigum
  • 175
  • 6
2
votes
2 answers

Where is Qt QOpenGLWidget?

I'm trying to write a C++ application that uses QOpenGLWidget, but Qt Creator gives a "'QOpenGLWidget' file not found" error on this line: #include The documentation says QOpenGLWidget was introduced in Qt 5.4, and I believe I am…
Tomasso
  • 693
  • 2
  • 9
  • 17
2
votes
1 answer

When I use setUseOpenGL(true), some properties of QChartSeries would be disabled

Firstly, my QT environment is 5.12.0 with MSVC 2017 64 bit, I used 5.10.0 with MSVC 2017 64 bit before but the result is same. For example, in QLineSeries, setPointsLabelVisible and setPointsVisible would be disabled. In QScatterSeries,…
Martzki
  • 41
  • 4
2
votes
2 answers

Opengl rendering quad

For some reason, the quad that I'm rendering doesn't show and it only renders a black screen. I've checked the code multiple times and couldn't find the problem maybe someone can see what I don't see! The purpose is to have a quad that follows the…
user3178756
  • 555
  • 1
  • 5
  • 17
2
votes
1 answer

OpenCV 2.4.13 for C++ compilation under ubuntu fails

I am trying to install openCV for C++ on ubuntu. I am using this document . But step of compilation fails. The log of make is as follow: $make [ 0%] Built target opencv_core_pch_dephelp [ 0%] Built target pch_Generate_opencv_core [ 3%] Built…
Feten Besbes
  • 186
  • 1
  • 10
2
votes
1 answer

How to create a texture with alpha in QOpenGLTexture?

I'm trying to generate a texture with QImage and QOpenGLTexture. I've set the QImage color format to RGBA8888, and set color with setPixel, but it seems like no matter how I change the alpha value, it remains to 255, and the transparency of the…
mtyong
  • 121
  • 1
  • 3
  • 13
2
votes
2 answers

OSG render scene into image

I trying to render an OSG scene into a image in my Qt program. Refer to the example of SnapImageDrawCallback(https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg45360.html). class SnapImageDrawCallback : public…
2
votes
0 answers

Qt QApplication framerate drop when maximizing window

We are using Qt for a visualization engine viewer, and we are having issues with the QApplication::processEvents() method. Since we needed to control the framerate (in a game loop fashion), we overrided the QApplication to define our own and our…
cmourglia
  • 2,423
  • 1
  • 17
  • 33
2
votes
1 answer

How to construct a cubemap texture using QOpenGLTexture?

I want to construct a cubemap texture using QOpenGLTexture using 6 images. I think I have placed them right. I am using the following code to construct the cubemap const QImage posx =…
1
2 3 4 5 6 7