summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-16 19:07:07 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-16 19:07:07 +0000
commitc157ebb6c9845ca55c2891d03c5d09f69f2b2399 (patch)
tree32335da5b03ec5c7eb110c65815cf2afc61993fa
parentdfa61db50a0f8b4720cbdb21714bb992d511efa5 (diff)
downloadmpv-c157ebb6c9845ca55c2891d03c5d09f69f2b2399.tar.bz2
mpv-c157ebb6c9845ca55c2891d03c5d09f69f2b2399.tar.xz
Our buffer usage actually fits better to GL_DYNAMIC_DRAW than GL_STREAM_DRAW.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16238 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/gl_common.h3
-rw-r--r--libvo/vo_gl.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index e4b8a7606c..32b8ea8a27 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -26,6 +26,9 @@
#ifndef GL_STREAM_DRAW
#define GL_STREAM_DRAW 0x88E0
#endif
+#ifndef GL_DYNAMIC_DRAW
+#define GL_DYNAMIC_DRAW 0x88E8
+#endif
#ifndef GL_WRITE_ONLY
#define GL_WRITE_ONLY 0x88B9
#endif
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 09dc5f02d3..9203dee5cf 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -439,7 +439,7 @@ static uint32_t get_image(mp_image_t *mpi) {
mpi->stride[0] = mpi->width * mpi->bpp / 8;
if (mpi->stride[0] * mpi->h > gl_buffersize) {
BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->h,
- NULL, GL_STREAM_DRAW);
+ NULL, GL_DYNAMIC_DRAW);
gl_buffersize = mpi->stride[0] * mpi->h;
}
UnmapBuffer(GL_PIXEL_UNPACK_BUFFER); // HACK, needed for some MPEG4 files??