-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.7.0
-
None
hi,
i use OpenglWidget in a mixed qt widget and opengl program.
i am learning opengl and all is going well, the program work well and run fine with qt creator 4.6.2
Since the update for qt creator 4.7.0 i get a runtime problem.
I dont know if i call this a runtime something, but the programm compile fine and work well until the openglwidget get call.
As son as the initializeGL() get call the programm simply crash after the initializeOpenGLFunctions(); on anny gl call, and ask me for debugging with visual studio
where i get just this minimal info about this : d_1_0_Core is nullptr
Again, the program work simply fine with qt creator 4.6.2
Thx.
Here some sampple code:
Anyway, nothing crasy.
h::
#include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLWidget>
#include <QWidget>
// i declare the class like this
class OpenglWidget : public QOpenGLWidget, protected QOpenGLFunctions_3_3_Core
{
Q_OBJECT
public:
explicit OpenglWidget(QWidget *parent = 0);
etc...
cpp:
// setup the surface
OpenglWidget::OpenglWidget(QWidget *parent) :
QOpenGLWidget(parent)
{
QSurfaceFormat sformat;
sformat.setDepthBufferSize(32);
sformat.setSamples(4);
sformat.setVersion(3, 3);
sformat.setProfile(QSurfaceFormat::CoreProfile);
setFormat(sformat);
}
void OpenglWidget::initializeGL()
{
makeCurrent();
initializeOpenGLFunctions();
glEnable(GL_MULTISAMPLE); // fail on anny gl call no matter what call, always same error : d_1_0_Core is nullptr
glClearColor(0.18f, 0.18f, 0.18f, 1.0f);
}
- relates to
-
QTCREATORBUG-20808 Qt Creator forces Angle for user applications (was: Could not use QOpenGLFunctions_2_0 and greater)
-
- Closed
-