summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qpaintervideosurface.cpp
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-05-28 10:50:31 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-05-28 12:08:27 +0200
commit75a27a1ab03801bf040c6f901d5dc3af2434b91e (patch)
tree423bfadd0a66ff292f71535045af91d404ece7a0 /src/multimediawidgets/qpaintervideosurface.cpp
parentcd9326944df68837ac7e701b0440378ef99892b0 (diff)
Remove deprecated gl funcs
glTexCoordPointer, glVertexPointer, glEnableClientState, glDisableClientState Change-Id: I9970a64131e9372b7db48895912b9f481e34bf1a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/multimediawidgets/qpaintervideosurface.cpp')
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index 5fe76d869..590864c7e 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -944,16 +944,17 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
glActiveTexture(GL_TEXTURE0);
}
- glVertexPointer(2, GL_FLOAT, 0, v_array);
- glTexCoordPointer(2, GL_FLOAT, 0, tx_array);
+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, v_array);
+ glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, tx_array);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(1);
+
glDisable(GL_FRAGMENT_PROGRAM_ARB);
painter->endNativePainting();