mirror of
https://github.com/mpv-player/mpv
synced 2025-02-23 08:26:56 +00:00
Move at-hack code a bit up for further changes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27215 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d34eccfec3
commit
fcf655c887
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user