@@ -49,6 +49,9 @@ TEST(TextureTest, ToImage)
49
49
Q_ASSERT (surface.isValid ());
50
50
context.makeCurrent (&surface);
51
51
52
+ QOpenGLExtraFunctions glF (&context);
53
+ glF.initializeOpenGLFunctions ();
54
+
52
55
QOpenGLFramebufferObjectFormat format;
53
56
format.setAttachment (QOpenGLFramebufferObject::CombinedDepthStencil);
54
57
@@ -59,8 +62,8 @@ TEST(TextureTest, ToImage)
59
62
QPainter painter (&device);
60
63
painter.beginNativePainting ();
61
64
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);
64
67
painter.drawEllipse (0 , 0 , fbo.width (), fbo.height ());
65
68
painter.endNativePainting ();
66
69
painter.end ();
@@ -86,15 +89,18 @@ TEST(TextureTest, Release)
86
89
Q_ASSERT (surface.isValid ());
87
90
context.makeCurrent (&surface);
88
91
92
+ QOpenGLExtraFunctions glF (&context);
93
+ glF.initializeOpenGLFunctions ();
94
+
89
95
QOpenGLFramebufferObject fbo (1 , 1 );
90
96
GLuint handle = fbo.takeTexture ();
91
- ASSERT_TRUE (glIsTexture (handle));
97
+ ASSERT_TRUE (glF. glIsTexture (handle));
92
98
93
99
Texture tex (handle, fbo.width (), fbo.height ());
94
- ASSERT_TRUE (glIsTexture (handle));
100
+ ASSERT_TRUE (glF. glIsTexture (handle));
95
101
96
102
tex.release ();
97
- ASSERT_FALSE (glIsTexture (handle));
103
+ ASSERT_FALSE (glF. glIsTexture (handle));
98
104
ASSERT_FALSE (tex.isValid ());
99
105
100
106
context.doneCurrent ();
0 commit comments