Launch the debugger when an error message is printed, only in debug builds
Fix texture struct problems