opengl32: glBindTexture() and glDeleteTextures() require an active GL context
Bruno Jesus
00cpxxx at gmail.com
Sat Jun 21 13:36:58 CDT 2014
Very similar to bug 36506 but for other functions.
Fixes bug http://bugs.winehq.org/show_bug.cgi?id=34847
-------------- next part --------------
diff --git a/dlls/opengl32/opengl_norm.c b/dlls/opengl32/opengl_norm.c
index 78a72ef..6408745 100644
--- a/dlls/opengl32/opengl_norm.c
+++ b/dlls/opengl32/opengl_norm.c
@@ -61,6 +61,7 @@ void WINAPI glBegin( GLenum mode ) {
*/
void WINAPI glBindTexture( GLenum target, GLuint texture ) {
const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;
+ if (!funcs) return; /* called without an active gl context */
TRACE("(%d, %d)\n", target, texture );
funcs->gl.p_glBindTexture( target, texture );
}
@@ -547,6 +548,7 @@ void WINAPI glDeleteLists( GLuint list, GLsizei range ) {
*/
void WINAPI glDeleteTextures( GLsizei n, const GLuint* textures ) {
const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;
+ if (!funcs) return; /* called without an active gl context */
TRACE("(%d, %p)\n", n, textures );
funcs->gl.p_glDeleteTextures( n, textures );
}
More information about the wine-patches
mailing list