save error state before we reset it on texture creation
This commit is contained in:
parent
79fe86062f
commit
93c240d31f
1 changed files with 5 additions and 1 deletions
|
@ -137,6 +137,8 @@ DWORD WINAPI render_main(void)
|
|||
if (gotOpenglV3)
|
||||
scaleProgram = OpenGL_BuildProgramFromFile(ddraw->shader);
|
||||
|
||||
BOOL GotError = FALSE;
|
||||
|
||||
// primary surface texture
|
||||
GLenum surfaceFormat = GL_LUMINANCE;
|
||||
GLuint surfaceTexIds[TEXTURE_COUNT];
|
||||
|
@ -150,6 +152,8 @@ DWORD WINAPI render_main(void)
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
GotError = GotError || glGetError() != GL_NO_ERROR;
|
||||
|
||||
while (glGetError() != GL_NO_ERROR);
|
||||
|
||||
if (paletteConvProgram)
|
||||
|
@ -440,7 +444,7 @@ DWORD WINAPI render_main(void)
|
|||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
}
|
||||
|
||||
BOOL useOpenGL = !(ddraw->autorenderer && (!paletteConvProgram || glGetError() != GL_NO_ERROR));
|
||||
BOOL useOpenGL = !(ddraw->autorenderer && (!paletteConvProgram || GotError || glGetError() != GL_NO_ERROR));
|
||||
|
||||
if (!paletteConvProgram)
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue