@@ -49,6 +49,9 @@ TEST(TextureTest, ToImage)
4949 Q_ASSERT (surface.isValid ());
5050 context.makeCurrent (&surface);
5151
52+ QOpenGLExtraFunctions glF (&context);
53+ glF.initializeOpenGLFunctions ();
54+
5255 QOpenGLFramebufferObjectFormat format;
5356 format.setAttachment (QOpenGLFramebufferObject::CombinedDepthStencil);
5457
@@ -59,8 +62,8 @@ TEST(TextureTest, ToImage)
5962 QPainter painter (&device);
6063 painter.beginNativePainting ();
6164 painter.setRenderHint (QPainter::Antialiasing, false );
62- glClearColor (0 .0f , 0 .0f , 0 .0f , 0 .0f );
63- glClear (GL_COLOR_BUFFER_BIT);
65+ glF. glClearColor (0 .0f , 0 .0f , 0 .0f , 0 .0f );
66+ glF. glClear (GL_COLOR_BUFFER_BIT);
6467 painter.drawEllipse (0 , 0 , fbo.width (), fbo.height ());
6568 painter.endNativePainting ();
6669 painter.end ();
@@ -86,15 +89,18 @@ TEST(TextureTest, Release)
8689 Q_ASSERT (surface.isValid ());
8790 context.makeCurrent (&surface);
8891
92+ QOpenGLExtraFunctions glF (&context);
93+ glF.initializeOpenGLFunctions ();
94+
8995 QOpenGLFramebufferObject fbo (1 , 1 );
9096 GLuint handle = fbo.takeTexture ();
91- ASSERT_TRUE (glIsTexture (handle));
97+ ASSERT_TRUE (glF. glIsTexture (handle));
9298
9399 Texture tex (handle, fbo.width (), fbo.height ());
94- ASSERT_TRUE (glIsTexture (handle));
100+ ASSERT_TRUE (glF. glIsTexture (handle));
95101
96102 tex.release ();
97- ASSERT_FALSE (glIsTexture (handle));
103+ ASSERT_FALSE (glF. glIsTexture (handle));
98104 ASSERT_FALSE (tex.isValid ());
99105
100106 context.doneCurrent ();
0 commit comments