From 93d8d2dbdb1e46eb6af77530ce712a2d85953d47 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 24 Mar 2015 00:40:27 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/animvpx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/polymer/eduke32/source/animvpx.c b/polymer/eduke32/source/animvpx.c index 55d89440d..acb6458e0 100644 --- a/polymer/eduke32/source/animvpx.c +++ b/polymer/eduke32/source/animvpx.c @@ -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;