DLL Crash on creating texture