fixed 3dtexture usage on windows

This commit is contained in:
oy 2014-02-10 19:06:22 +01:00
parent 85f216d968
commit 5890072809

View file

@ -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