/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
****************************************************************************/

#pragma once

#ifdef _MSC_VER
  #pragma warning( push )
  #pragma warning( disable : 4100 4512 4996 )
#else
  #pragma GCC system_header
  #undef None
  #undef PropertyNotify
#endif

#include <fbxsdk.h>

#ifdef _MSC_VER
  #pragma warning( pop )
#endif

// remove some FBX definitions
#undef isnan
#undef snprintf

#include <glmString.h>
#include <glmArray.h>

namespace glm
{
	namespace crowdio
	{
		struct FbxBakerVertexCacheData
		{
			glm::Array<FbxCache*>	_cachesForThisCharacter;
			FbxNode*				_rootNode;
			glm::Array<FbxNode*>	_nodeCopies;
			GlmString				_fbxFilePath;
			double					_frameRate;
			int						_currentCacheFrame;
		};
	}
}

// 
// When linking an executable with FBX SDK static library under UNIX platforms, linker may pop the following warning :
// 
//   .../fbxsdk-2015.1/lib/gcc4/x64/libfbxsdk.a(fbxutils.o): In function `fbxsdk_2015_1::FbxPathUtils::GenerateFileName(char const*, char const*)':
//   (.text+0x4c8): warning: the use of `tempnam' is dangerous, better use `mkstemp'
// 
// The only way to disable this linker warning is to edit 'libc' warning table :
// 
//   objdump -s -j .gnu.warning.tempnam /lib64/libc-2.12.so   ................................. Print section in libc corresponding to 'tempnam' warning
//   cp /lib64/libc-2.12.so /lib64/libc-2.12.no.warning.tempnam.so   .......................... Backup current libc
//   objcopy --remove-section=.gnu.warning.tempnam /lib64/libc-2.12.no.warning.tempnam.so   ... Remove 'tempnam' warning section from 'libc' copy
//   objdump -s -j .gnu.warning.tempnam /lib64/libc-2.12.no.warning.tempnam.so   .............. Check that 'tempnam' warning section was properly removed from 'libc' copy
//   ln -sf /lib64/libc-2.12.no.warning.tempnam.so /lib64/libc.so.6   ......................... Promote 'libc' copy as current 'libc' version to use
//   ll /lib64/libc*   ........................................................................ Check that 'libc' copy and original version are available, and 'libc' symlink is using 'libc' copy
// 
// For more information, refer to :
// 
//   https://sourceware.org/bugzilla/show_bug.cgi?id=12017
//   http://forum.osdev.org/viewtopic.php?p=20043&sid=617788b035beab646d2c291190721b40#p20043
//   http://linux.die.net/man/1/objdump
//   http://linux.die.net/man/1/objcopy
//   
