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
1 answer

OpenGL Depth Buffer not using z value

I have a QtOpenglWidget with OpenGL 3.3 running and attempting to do instance rendering, but my z-buffer will not work Currently, I add the 3 test cubes in draw order of cube3, cube2, then cube1 and changing it shows it is just displaying the last…
FrickeFresh
  • 1,688
  • 1
  • 19
  • 31
0
votes
1 answer

Rendering to QOpenGLFramebufferObject without PaintGL call

I want to call the rendering routine out without calling PaintGL, the reason is that I'm trying to render a multipass effect using the modern routines of Qt OpenGL implemementation so the pseudo code should be something like: for i=0 i
Frank Escobar
  • 368
  • 4
  • 20
0
votes
2 answers

glGenTextures gives GL_INVALID_OPERATION despite valid OpenGL context

I get a GL_INVALID_OPERATION error when calling glGenTextures and I have no idea what could be responsible for it. I am using QtOpenGLWidget to retrieve the context and it looks valid at the time I call glGenTextures() (at least I have one since…
cmourglia
  • 2,423
  • 1
  • 17
  • 33
0
votes
1 answer

How to set a uniform variable on user input only?

I have a RenderWidget class inherited from QOpenGLWidget, which has the following two methods, among others: RenderWidget : public QOpenGLWidget, protected QOpenGLFunctions_4_3_Core { // ... public slots: void setSmthEnabled(bool enabled) { …
Sergey
  • 7,985
  • 4
  • 48
  • 80
0
votes
1 answer

Qt QOpenGLFunction_4_5_Compatibility vs QOpenGLExtraFunctions

i am currently using QOpenGLFunction_4_5_Compability in my GLWidget. Because QOpenGLFunctions doesn't contains glLoadIdentity, glOrtho, glGenBuffers, glBindBuffer and so on. Why some people using QOpenGLFunctions instead of…
user6794027
0
votes
1 answer

How to draw the off-screen data in the framebuffer object to the QGLWidget?

I use glGenFramebuffer, glBindFramebuffer and other related functions to create the Framebuffer Object(FBO) and I use the FBO to draw the off-screen data. Now my question is that I finish the mentioned steps inside QGLWidget and how can I draw the…
Hurricane
  • 31
  • 3
0
votes
0 answers

QOpenGLFramebufferObject's image not updating

The following is the code for my widget which subclasses QOpenGLWidget. What should be happening is that the framebuffer object flashes between white and black between each frame, but it only displays white, which tells me it's rendering once and…
rogueyoshi
  • 57
  • 8
0
votes
1 answer

maximum recursion depth exceeded while calling a Python object for continuous scene update

I am using opengl to render some graphics in my Python & QT application. I followed many tutorial to add the openGL to the application and all of them didn't have a continuous update to the scene. A simple example, I want to keep rotating the…
The Maestro
  • 659
  • 1
  • 5
  • 21
0
votes
1 answer

Qt window moves even when intercepting mouse events

I have a Qt OpenGL (with qt 5.5) Application in which you can click to drag objects in a 3D scene. This is implemented by having a subclass of QOpenGLWidget which overrides mousePressEvent, mouseReleaseEvent and mouseMoveEvent. However, when I…
Louen
  • 3,617
  • 1
  • 29
  • 49
0
votes
1 answer

Using QT5 with glLoadGen

I'm writing an interface to an 3D application with Qt5.4 on Windows 8.1 in C++. The application is using glLoadGen to load OpenGL functions. No the problem is, that both GlWidget and glLoadGen want to be included, before gl.h is included, but also…
JonathanK
  • 827
  • 1
  • 6
  • 23
0
votes
1 answer

Retrieve the texture coordinate under the mouse

I'm working with Qt 4.8 and its OpenGL module, with the fixed pipeline and I have a sphere that was cubemapped, with the tex coords for each cube face auto-generated by OpenGL via glTexGenf (R, S and T…
Adri C.S.
  • 2,909
  • 5
  • 36
  • 63
0
votes
1 answer

QtOpenGl: No such file or directory

I installed Deepin Linux few days back. I am trying to install OpenCv2.4.10 but during compilation I am getting this error: fatal error: QtOpenGL: No such file or directory #include ^ compilation…
yabhishek
  • 408
  • 4
  • 14
0
votes
2 answers

Qt OpenGL - Rotating with mouse drag

I was going through the Hello GL Example in the Qt documentation. They have some code which helps in rotation the scene with mouse drag. void GLWidget::mouseMoveEvent(QMouseEvent *event) { int dx = event->x() - lastPos.x(); int dy =…
Amit Tomar
  • 4,800
  • 6
  • 50
  • 83
0
votes
1 answer

OpenGL - Qt : translate instable with rotation and scaling

I have implemented a programm that translate, rotate and scle a 2D texture in openGL. Thes 3 transformation work well on there own, but when I throw the translation with the others, things get wacky. For the scaling, all seems well when the scale is…
Laetan
  • 879
  • 9
  • 26
0
votes
1 answer

OpenGL: Multiple Rending methods .. When to use which?

I am new to OpenGL, and I am following multiple tutorials, I noticed that there are multiple methods that are used to render objects, but I still don't get the difference between them and when to use each of them? for example .. I am following this…
fujy
  • 5,168
  • 5
  • 31
  • 50