diff --git a/Externals/Cg/cg.h b/Externals/Cg/cg.h index 63235f90ac..68cf2ea4c8 100644 --- a/Externals/Cg/cg.h +++ b/Externals/Cg/cg.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * @@ -74,15 +74,18 @@ # endif #endif /* _WIN32 */ -/* Set up for either Win32 import/export/lib. */ +/* Set up CG_API for Win32 dllexport or gcc visibility */ + #ifndef CG_API -# ifdef _WIN32 -# ifdef CG_EXPORTS +# ifdef CG_EXPORTS +# ifdef _WIN32 # define CG_API __declspec(dllexport) -# elif defined (CG_LIB) -# define CG_API +# elif defined(__GNUC__) && __GNUC__>=4 +# define CG_API __attribute__ ((visibility("default"))) +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# define CG_API __global # else -# define CG_API __declspec(dllimport) +# define CG_API # endif # else # define CG_API diff --git a/Externals/Cg/cgD3D9.h b/Externals/Cg/cgD3D9.h index 71618debc4..e5ebc86e2d 100644 --- a/Externals/Cg/cgD3D9.h +++ b/Externals/Cg/cgD3D9.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2009, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * diff --git a/Externals/Cg/cgGL.h b/Externals/Cg/cgGL.h index 8d7d78b13f..46c3a4f6f0 100644 --- a/Externals/Cg/cgGL.h +++ b/Externals/Cg/cgGL.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * @@ -71,13 +71,15 @@ /* Set up for either Win32 import/export/lib. */ #ifndef CGGL_API -# ifdef _WIN32 -# ifdef CGGL_EXPORTS +# ifdef CGGL_EXPORTS +# ifdef _WIN32 # define CGGL_API __declspec(dllexport) -# elif defined (CG_LIB) -# define CGGL_API +# elif defined(__GNUC__) && __GNUC__>=4 +# define CGGL_API __attribute__ ((visibility("default"))) +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# define CGGL_API __global # else -# define CGGL_API __declspec(dllimport) +# define CGGL_API # endif # else # define CGGL_API diff --git a/Externals/Cg/cgGL_profiles.h b/Externals/Cg/cgGL_profiles.h index 3a1aa9d615..5e1b89ffbf 100644 --- a/Externals/Cg/cgGL_profiles.h +++ b/Externals/Cg/cgGL_profiles.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * diff --git a/Externals/Cg/cg_bindlocations.h b/Externals/Cg/cg_bindlocations.h index 96ae8e24b5..66653dbc1c 100644 --- a/Externals/Cg/cg_bindlocations.h +++ b/Externals/Cg/cg_bindlocations.h @@ -2,7 +2,7 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * diff --git a/Externals/Cg/cg_datatypes.h b/Externals/Cg/cg_datatypes.h index c26eced597..32e670ca72 100644 --- a/Externals/Cg/cg_datatypes.h +++ b/Externals/Cg/cg_datatypes.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * @@ -67,6 +67,10 @@ * */ +/* + * ADD NEW DATA TYPES TO THE END OF THIS MACRO LIST! + * + */ CG_DATATYPE_MACRO(Half,half,CG_HALF,CG_HALF,0,1,CG_PARAMETERCLASS_SCALAR) @@ -188,4 +192,5 @@ CG_DATATYPE_MACRO(SamplerCUBEARRAY,samplerCUBEARRAY,CG_SAMPLERCUBEARRAY,CG_SAMPL CG_DATATYPE_MACRO(VertexShader, vertexshader, CG_VERTEXSHADER_TYPE, CG_VERTEXSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(PixelShader, pixelshader, CG_PIXELSHADER_TYPE, CG_PIXELSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(Sampler, sampler, CG_SAMPLER, CG_SAMPLER, 0, 0, CG_PARAMETERCLASS_SAMPLER) +CG_DATATYPE_MACRO(SamplerBUF,samplerBUF,CG_SAMPLERBUF,CG_SAMPLERBUF,0,0,CG_PARAMETERCLASS_SAMPLER) #undef CG_DATATYPE_MACRO diff --git a/Externals/Cg/cg_enums.h b/Externals/Cg/cg_enums.h index 9585f9d73d..8ba08c29c9 100644 --- a/Externals/Cg/cg_enums.h +++ b/Externals/Cg/cg_enums.h @@ -1,7 +1,7 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * diff --git a/Externals/Cg/cg_errors.h b/Externals/Cg/cg_errors.h index 8f5fe67ef6..eaa4416ead 100644 --- a/Externals/Cg/cg_errors.h +++ b/Externals/Cg/cg_errors.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * * diff --git a/Externals/Cg/cg_profiles.h b/Externals/Cg/cg_profiles.h index bdf41fe260..597f3f3b04 100644 --- a/Externals/Cg/cg_profiles.h +++ b/Externals/Cg/cg_profiles.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2002-2007, NVIDIA Corporation. + * Copyright (c) 2002-2008, NVIDIA Corporation. * * *