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
This commit is contained in:
reimar 2005-08-16 19:07:07 +00:00
parent dfa61db50a
commit c157ebb6c9
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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??