From 58900728094fccba319d6aa4ec85b69319f4d578 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 10 Feb 2014 19:06:22 +0100 Subject: [PATCH] fixed 3dtexture usage on windows --- src/engine/client/backend_sdl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 734d89ebc..02fbe17eb 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -7,6 +7,11 @@ #include "graphics_threaded.h" #include "backend_sdl.h" + +#if defined(CONF_FAMILY_WINDOWS) + PFNGLTEXIMAGE3DPROC glTexImage3D; +#endif + // ------------ CGraphicsBackend_Threaded void CGraphicsBackend_Threaded::ThreadFunc(void *pUser) @@ -603,6 +608,15 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Width, int *Height return -1; } + #if defined(CONF_FAMILY_WINDOWS) + glTexImage3D = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D"); + if(glTexImage3D == 0) + { + dbg_msg("gfx", "glTexImage3D not supported"); + return -1; + } + #endif + SDL_ShowCursor(0); // fetch gl contexts and release the context from this thread