Abort animvpx playback if uploading the texture for a frame throws a GL error. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5074 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-03-24 00:40:27 +00:00
parent 7732db71af
commit 93d8d2dbdb

View file

@ -507,12 +507,14 @@ int32_t animvpx_render_frame(animvpx_codec_ctx *codec)
{
bglTexImage2D(GL_TEXTURE_2D, 0, fmt, codec->width,codec->height,
0, fmt, GL_UNSIGNED_BYTE, codec->pic);
if (bglGetError() != GL_NO_ERROR) return 1;
texuploaded = 1;
}
else
{
bglTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, codec->width,codec->height,
fmt, GL_UNSIGNED_BYTE, codec->pic);
if (bglGetError() != GL_NO_ERROR) return 1;
}
float vid_wbyh = ((float)codec->width)/codec->height;