diff options
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index f40f13e719..5087997b11 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -688,14 +688,14 @@ static uint32_t get_image(mp_image_t *mpi) { return VO_FALSE; } if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE; - if (!gl_buffer) - GenBuffers(1, &gl_buffer); - BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); if (ati_hack) { int s = 1; while (s < mpi->width) s *= 2; mpi->width = s; } + if (!gl_buffer) + GenBuffers(1, &gl_buffer); + BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); mpi->stride[0] = mpi->width * mpi->bpp / 8; if (mpi->stride[0] * mpi->height > gl_buffersize) { BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height, |