Tobias Bohnen avatar Tobias Bohnen committed 733c9ba

* replaced CompilerIncludeCallback and ErrorCallback with events
* moved string <-> enum methods to CgEnums class
* added Cg.SupportedProfiles property
* added new advanced example

Comments (0)

Files changed (14)

     /// </summary>
     public static class Cg
     {
+        #region Fields
+
+        private static readonly object PadLock = new object();
+
+        #endregion Fields
+
         #region Constructors
 
         static Cg()
         /// <summary>
         ///    
         /// </summary>
-        // typedef void (*CGerrorCallbackFunc)(void);
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate void CgErrorCallbackFuncDelegate();
-
-        /// <summary>
-        ///    
-        /// </summary>
         // typedef void (*CGerrorHandlerFunc)(CGcontext context, CGerror err, void *data);
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         public delegate void CgErrorHandlerFuncDelegate(IntPtr context, ErrorType err, IntPtr data);
 
-        /// <summary>
-        /// 
-        /// </summary>
-        // typedef void (*CGIncludeCallbackFunc)( CGcontext context, const char *filename );
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate void CgIncludeCallbackFunc(IntPtr context, string filename);
+        #endregion Delegates
 
-        /// <summary>
-        /// 
-        /// </summary>
-        // typedef CGbool (*CGstatecallback)(CGstateassignment);
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate bool CgStateCallbackDelegate(IntPtr cGstateassignment);
+        #region Events
 
-        #endregion Delegates
+        public static event EventHandler<ErrorEventArgs> Error
+        {
+            add
+            {
+                lock (PadLock)
+                {
+                    if (error == null)
+                    {
+                        CgNativeMethods.cgSetErrorCallback(OnError);
+                    }
+
+                    error += value;
+                }
+            }
+
+            remove
+            {
+                lock (PadLock)
+                {
+                    error -= value;
+
+                    if (error == null)
+                    {
+                        CgNativeMethods.cgSetErrorCallback(null);
+                    }
+                }
+            }
+        }
+
+        private static event EventHandler<ErrorEventArgs> error;
+
+        #endregion Events
 
         #region Properties
 
             set;
         }
 
-        public static CgErrorCallbackFuncDelegate ErrorCallback
-        {
-            get
-            {
-                return CgNativeMethods.cgGetErrorCallback();
-            }
-
-            set
-            {
-                CgNativeMethods.cgSetErrorCallback(value);
-            }
-        }
-
         public static LockingPolicy LockingPolicy
         {
             get
             }
         }
 
+        public static IEnumerable<ProfileType> SupportedProfiles
+        {
+            get
+            {
+                int count = Cg.SupportedProfilesCount;
+                for (int i = 0; i < count; i++)
+                {
+                    yield return Cg.GetSupportedProfile(i);
+                }
+            }
+        }
+
         public static int SupportedProfilesCount
         {
             get
 
         #region Public Static Methods
 
-        public static Behavior GetBehavior(string behaviorString)
-        {
-            return CgNativeMethods.cgGetBehavior(behaviorString);
-        }
-
-        public static string GetBehaviorString(Behavior behavior)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetBehaviorString(behavior));
-        }
-
-        public static Domain GetDomain(string domainString)
-        {
-            return CgNativeMethods.cgGetDomain(domainString);
-        }
-
-        public static string GetDomainString(Domain domain)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetDomainString(domain));
-        }
-
-        public static int GetEnum(string enumString)
-        {
-            return CgNativeMethods.cgGetEnum(enumString);
-        }
-
-        public static string GetEnumString(int @enum)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetEnumString(@enum));
-        }
-
         public static ErrorType GetError()
         {
             return CgNativeMethods.cgGetError();
             return CgNativeMethods.cgGetErrorHandler(data);
         }
 
-        public static string GetErrorString(ErrorType error)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetErrorString(error));
-        }
-
         public static ErrorType GetFirstError()
         {
             return CgNativeMethods.cgGetFirstError();
             return CgNativeMethods.cgGetMatrixSize(type, out nrows, out ncols);
         }
 
-        public static int GetNumParentTypes(ParameterType type)
-        {
-            return CgNativeMethods.cgGetNumParentTypes(type);
-        }
-
-        public static ParameterClass GetParameterClassEnum(string pString)
-        {
-            return CgNativeMethods.cgGetParameterClassEnum(pString);
-        }
-
-        public static string GetParameterClassString(ParameterClass pc)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetParameterClassString(pc));
-        }
-
         public static ParameterType GetParentType(ParameterType type, int index)
         {
             return CgNativeMethods.cgGetParentType(type, index);
         }
 
-        public static ProfileType GetProfile(string profile)
+        public static int GetParentTypesCount(ParameterType type)
         {
-            return CgNativeMethods.cgGetProfile(profile);
+            return CgNativeMethods.cgGetNumParentTypes(type);
         }
 
         public static Domain GetProfileDomain(ProfileType profile)
             return CgNativeMethods.cgGetProfileProperty(profile, query);
         }
 
-        public static string GetProfileString(ProfileType profile)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetProfileString(profile));
-        }
-
         public static int GetProgramBufferMaxIndex(ProfileType profile)
         {
             return CgNativeMethods.cgGetProgramBufferMaxIndex(profile);
             return CgNativeMethods.cgGetProgramBufferMaxSize(profile);
         }
 
-        public static ResourceType GetResource(string resourceName)
-        {
-            return CgNativeMethods.cgGetResource(resourceName);
-        }
-
-        public static string GetResourceString(ResourceType resource)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetResourceString(resource));
-        }
-
-        public static string GetString(CgAll sname)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetString(sname));
-        }
-
         public static ProfileType GetSupportedProfile(int index)
         {
             return CgNativeMethods.cgGetSupportedProfile(index);
         }
 
-        public static ParameterType GetType(string typeString)
-        {
-            return CgNativeMethods.cgGetType(typeString);
-        }
-
-        public static ParameterType GetTypeBase(ParameterType type)
-        {
-            return CgNativeMethods.cgGetTypeBase(type);
-        }
-
-        public static ParameterClass GetTypeClass(ParameterType type)
-        {
-            return CgNativeMethods.cgGetTypeClass(type);
-        }
-
         public static bool GetTypeSizes(ParameterType type, out int nrows, out int ncols)
         {
             return CgNativeMethods.cgGetTypeSizes(type, out nrows, out ncols);
         }
 
-        public static string GetTypeString(ParameterType type)
-        {
-            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetTypeString(type));
-        }
-
         public static bool IsInterfaceType(ParameterType type)
         {
             return CgNativeMethods.cgIsInterfaceType(type);
             var lines = new List<string>();
             var buffer = new List<byte>();
 
-            for (;;)
+            for (; ; )
             {
                 byte* b = *byteArray;
-                for (;;)
+                for (; ; )
                 {
                     if (b == null || *b == '\0')
                     {
 
         #endregion Internal Static Methods
 
+        #region Private Static Methods
+
+        private static void OnError()
+        {
+            if (error != null)
+            {
+                error(null, new ErrorEventArgs(Cg.GetError()));
+            }
+        }
+
+        #endregion Private Static Methods
+
         #endregion Methods
     }
 }
  */
 namespace CgNet
 {
+    using System.Runtime.InteropServices;
+
     #region Enumerations
 
     public enum AutoCompileMode
     }
 
     #endregion Enumerations
+
+    public static class CgEnums
+    {
+        #region Methods
+
+        #region Public Static Methods
+
+        public static Behavior GetBehavior(string behaviorString)
+        {
+            return CgNativeMethods.cgGetBehavior(behaviorString);
+        }
+
+        public static string GetBehaviorString(Behavior behavior)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetBehaviorString(behavior));
+        }
+
+        public static Domain GetDomain(string domainString)
+        {
+            return CgNativeMethods.cgGetDomain(domainString);
+        }
+
+        public static string GetDomainString(Domain domain)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetDomainString(domain));
+        }
+
+        public static int GetEnum(string enumString)
+        {
+            return CgNativeMethods.cgGetEnum(enumString);
+        }
+
+        public static string GetEnumString(int @enum)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetEnumString(@enum));
+        }
+
+        public static string GetErrorString(ErrorType error)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetErrorString(error));
+        }
+
+        public static ParameterClass GetParameterClassEnum(string pString)
+        {
+            return CgNativeMethods.cgGetParameterClassEnum(pString);
+        }
+
+        public static string GetParameterClassString(ParameterClass pc)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetParameterClassString(pc));
+        }
+
+        public static ProfileType GetProfile(string profile)
+        {
+            return CgNativeMethods.cgGetProfile(profile);
+        }
+
+        public static string GetProfileString(ProfileType profile)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetProfileString(profile));
+        }
+
+        public static ResourceType GetResource(string resourceName)
+        {
+            return CgNativeMethods.cgGetResource(resourceName);
+        }
+
+        public static string GetResourceString(ResourceType resource)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetResourceString(resource));
+        }
+
+        public static string GetString(CgAll sname)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetString(sname));
+        }
+
+        public static ParameterType GetType(string typeString)
+        {
+            return CgNativeMethods.cgGetType(typeString);
+        }
+
+        public static ParameterType GetTypeBase(ParameterType type)
+        {
+            return CgNativeMethods.cgGetTypeBase(type);
+        }
+
+        public static ParameterClass GetTypeClass(ParameterType type)
+        {
+            return CgNativeMethods.cgGetTypeClass(type);
+        }
+
+        public static string GetTypeString(ParameterType type)
+        {
+            return Marshal.PtrToStringAnsi(CgNativeMethods.cgGetTypeString(type));
+        }
+
+        #endregion Public Static Methods
+
+        #endregion Methods
+    }
 }

CgNet/CgNativeMethods.cs

 
         #endregion Fields
 
+        #region Delegates
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        public delegate void CgIncludeCallbackFunc(IntPtr context, string filename);
+
+        /// <summary>
+        ///    
+        /// </summary>
+        // typedef void (*CGerrorCallbackFunc)(void);
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void CgErrorCallbackFuncDelegate();
+
+        #endregion Delegates
+
         #region Methods
 
-        #region Internal Static Methods
+        #region Public Static Methods
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgAddStateEnumerant(IntPtr state, string name, int value);
+        public static extern void cgAddStateEnumerant(IntPtr state, string name, int value);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [return: MarshalAs(UnmanagedType.Bool)]
-        internal static extern bool cgCallStateResetCallback(IntPtr stateassignment);
+        public static extern bool cgCallStateResetCallback(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [return: MarshalAs(UnmanagedType.Bool)]
-        internal static extern bool cgCallStateSetCallback(IntPtr stateassignment);
+        public static extern bool cgCallStateSetCallback(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [return: MarshalAs(UnmanagedType.Bool)]
-        internal static extern bool cgCallStateValidateCallback(IntPtr stateassignment);
+        public static extern bool cgCallStateValidateCallback(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCombinePrograms(int n, IntPtr[] progs);
+        public static extern IntPtr cgCombinePrograms(int n, IntPtr[] progs);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCombinePrograms2(IntPtr exe1, IntPtr exe2);
+        public static extern IntPtr cgCombinePrograms2(IntPtr exe1, IntPtr exe2);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCombinePrograms3(IntPtr exe1, IntPtr exe2, IntPtr exe3);
+        public static extern IntPtr cgCombinePrograms3(IntPtr exe1, IntPtr exe2, IntPtr exe3);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCombinePrograms4(IntPtr exe1, IntPtr exe2, IntPtr exe3, IntPtr exe4);
+        public static extern IntPtr cgCombinePrograms4(IntPtr exe1, IntPtr exe2, IntPtr exe3, IntPtr exe4);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCombinePrograms5(IntPtr exe1, IntPtr exe2, IntPtr exe3, IntPtr exe4, IntPtr exe5);
+        public static extern IntPtr cgCombinePrograms5(IntPtr exe1, IntPtr exe2, IntPtr exe3, IntPtr exe4, IntPtr exe5);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgCompileProgram(IntPtr prog);
+        public static extern void cgCompileProgram(IntPtr prog);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgConnectParameter(IntPtr from, IntPtr to);
+        public static extern void cgConnectParameter(IntPtr from, IntPtr to);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCopyEffect(IntPtr effect);
+        public static extern IntPtr cgCopyEffect(IntPtr effect);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCopyProgram(IntPtr program);
+        public static extern IntPtr cgCopyProgram(IntPtr program);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateArraySamplerState(IntPtr context, string name, ParameterType type, int nelems);
+        public static extern IntPtr cgCreateArraySamplerState(IntPtr context, string name, ParameterType type, int nelems);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateArrayState(IntPtr context, string name, ParameterType type, int nelems);
+        public static extern IntPtr cgCreateArrayState(IntPtr context, string name, ParameterType type, int nelems);
 
         // CG_API CGbuffer CGENTRY cgCreateBuffer(CGcontext context, int size, const void *data, CGbufferusage bufferUsage);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateBuffer(IntPtr context, int size, IntPtr data, BufferUsage bufferUsage);
+        public static extern IntPtr cgCreateBuffer(IntPtr context, int size, IntPtr data, BufferUsage bufferUsage);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateContext();
+        public static extern IntPtr cgCreateContext();
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffect(IntPtr context, string code, string[] args);
+        public static extern IntPtr cgCreateEffect(IntPtr context, string code, string[] args);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffectAnnotation(IntPtr effect, string name, ParameterType type);
+        public static extern IntPtr cgCreateEffectAnnotation(IntPtr effect, string name, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffectFromFile(IntPtr context, string filename, string[] args);
+        public static extern IntPtr cgCreateEffectFromFile(IntPtr context, string filename, string[] args);
 
         //CG_API CGparameter CGENTRY cgCreateEffectParameter(CGeffect effect, const char *name, CGtype type);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffectParameter(IntPtr context, string name, ParameterType type);
+        public static extern IntPtr cgCreateEffectParameter(IntPtr context, string name, ParameterType type);
 
         //CG_API CGparameter CGENTRY cgCreateEffectParameterArray(CGeffect effect, const char *name, CGtype type, int length);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffectParameterArray(IntPtr effect, string name, ParameterType type, int length);
+        public static extern IntPtr cgCreateEffectParameterArray(IntPtr effect, string name, ParameterType type, int length);
 
         //CG_API CGparameter CGENTRY cgCreateEffectParameterMultiDimArray(CGeffect effect, const char *name, CGtype type, int dim, const int *lengths);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateEffectParameterMultiDimArray(IntPtr effect, string name, ParameterType type, int dim, int[] lengths);
+        public static extern IntPtr cgCreateEffectParameterMultiDimArray(IntPtr effect, string name, ParameterType type, int dim, int[] lengths);
 
         //CG_API CGobj CGENTRY cgCreateObj(CGcontext context, CGenum program_type, const char *source, CGprofile profile, const char **args);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateObj(IntPtr context, ProgramType programType, string source, ProfileType profile, string[] args);
+        public static extern IntPtr cgCreateObj(IntPtr context, ProgramType programType, string source, ProfileType profile, string[] args);
 
         //CG_API CGobj CGENTRY cgCreateObjFromFile(CGcontext context, CGenum program_type, const char *source_file, CGprofile profile, const char **args);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateObjFromFile(IntPtr context, ProgramType programType, string sourceFile, ProfileType profile, string[] args);
+        public static extern IntPtr cgCreateObjFromFile(IntPtr context, ProgramType programType, string sourceFile, ProfileType profile, string[] args);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateParameter(IntPtr context, ParameterType type);
+        public static extern IntPtr cgCreateParameter(IntPtr context, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateParameterAnnotation(IntPtr param, string name, ParameterType type);
+        public static extern IntPtr cgCreateParameterAnnotation(IntPtr param, string name, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateParameterArray(IntPtr context, ParameterType type, int length);
+        public static extern IntPtr cgCreateParameterArray(IntPtr context, ParameterType type, int length);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateParameterMultiDimArray(IntPtr context, ParameterType type, int dim, [In] int[] lengths);
+        public static extern IntPtr cgCreateParameterMultiDimArray(IntPtr context, ParameterType type, int dim, [In] int[] lengths);
 
         //CG_API CGpass CGENTRY cgCreatePass(CGtechnique tech, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreatePass(IntPtr tech, string name);
+        public static extern IntPtr cgCreatePass(IntPtr tech, string name);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreatePassAnnotation(IntPtr pass, string name, ParameterType type);
+        public static extern IntPtr cgCreatePassAnnotation(IntPtr pass, string name, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateProgram(IntPtr context, ProgramType type, string source, ProfileType profile, string entry, string[] args);
+        public static extern IntPtr cgCreateProgram(IntPtr context, ProgramType type, string source, ProfileType profile, string entry, string[] args);
 
         // CG_API CGannotation CGENTRY cgCreateProgramAnnotation(CGprogram program, const char *name, CGtype type);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateProgramAnnotation(IntPtr annotation, string name, ParameterType type);
+        public static extern IntPtr cgCreateProgramAnnotation(IntPtr annotation, string name, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateProgramFromEffect(IntPtr effect, ProfileType profile, string entry, string[] args);
+        public static extern IntPtr cgCreateProgramFromEffect(IntPtr effect, ProfileType profile, string entry, string[] args);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateProgramFromFile(IntPtr context, ProgramType type, string file, ProfileType profile, string entry, string[] args);
+        public static extern IntPtr cgCreateProgramFromFile(IntPtr context, ProgramType type, string file, ProfileType profile, string entry, string[] args);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateSamplerState(IntPtr context, string name, ParameterType type);
+        public static extern IntPtr cgCreateSamplerState(IntPtr context, string name, ParameterType type);
 
         //CG_API CGstateassignment CGENTRY cgCreateSamplerStateAssignment(CGparameter param, CGstate state);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateSamplerStateAssignment(IntPtr pass, IntPtr state);
+        public static extern IntPtr cgCreateSamplerStateAssignment(IntPtr pass, IntPtr state);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateState(IntPtr context, string name, ParameterType type);
+        public static extern IntPtr cgCreateState(IntPtr context, string name, ParameterType type);
 
         //CG_API CGstateassignment CGENTRY cgCreateStateAssignment(CGpass pass, CGstate state);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateStateAssignment(IntPtr pass, IntPtr state);
+        public static extern IntPtr cgCreateStateAssignment(IntPtr pass, IntPtr state);
 
         //CG_API CGstateassignment CGENTRY cgCreateStateAssignmentIndex(CGpass pass, CGstate state, int index);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateStateAssignmentIndex(IntPtr pass, IntPtr state, int index);
+        public static extern IntPtr cgCreateStateAssignmentIndex(IntPtr pass, IntPtr state, int index);
 
         //CG_API CGtechnique CGENTRY cgCreateTechnique(CGeffect effect, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateTechnique(IntPtr effect, string name);
+        public static extern IntPtr cgCreateTechnique(IntPtr effect, string name);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgCreateTechniqueAnnotation(IntPtr tech, string name, ParameterType type);
+        public static extern IntPtr cgCreateTechniqueAnnotation(IntPtr tech, string name, ParameterType type);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyBuffer(IntPtr buffer);
+        public static extern void cgDestroyBuffer(IntPtr buffer);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyContext(IntPtr context);
+        public static extern void cgDestroyContext(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyEffect(IntPtr effect);
+        public static extern void cgDestroyEffect(IntPtr effect);
 
         //    CG_API void CGENTRY cgDestroyObj(CGobj obj);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyObj(IntPtr obj);
+        public static extern void cgDestroyObj(IntPtr obj);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyParameter(IntPtr param);
+        public static extern void cgDestroyParameter(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDestroyProgram(IntPtr program);
+        public static extern void cgDestroyProgram(IntPtr program);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgDisconnectParameter(IntPtr param);
+        public static extern void cgDisconnectParameter(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgEvaluateProgram(IntPtr prog, float[] f, int ncomps, int nx, int ny, int nz);
+        public static extern void cgEvaluateProgram(IntPtr prog, float[] f, int ncomps, int nx, int ny, int nz);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetAnnotationName(IntPtr annotation);
+        public static extern IntPtr cgGetAnnotationName(IntPtr annotation);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetAnnotationType(IntPtr annotation);
+        public static extern ParameterType cgGetAnnotationType(IntPtr annotation);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetArrayDimension(IntPtr param);
+        public static extern int cgGetArrayDimension(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetArrayParameter(IntPtr aparam, int index);
+        public static extern IntPtr cgGetArrayParameter(IntPtr aparam, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetArraySize(IntPtr param, int dimension);
+        public static extern int cgGetArraySize(IntPtr param, int dimension);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetArrayTotalSize(IntPtr param);
+        public static extern int cgGetArrayTotalSize(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetArrayType(IntPtr param);
+        public static extern ParameterType cgGetArrayType(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern AutoCompileMode cgGetAutoCompile(IntPtr context);
+        public static extern AutoCompileMode cgGetAutoCompile(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Behavior cgGetBehavior(string behaviorString);
+        public static extern Behavior cgGetBehavior(string behaviorString);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetBehaviorString(Behavior behavior);
+        public static extern IntPtr cgGetBehaviorString(Behavior behavior);
 
         // const CGbool * cgGetBoolAnnotationValues( CGannotation ann, int * nvalues );
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetBoolAnnotationValues(IntPtr annotation, out int nvalues);
+        public static extern IntPtr cgGetBoolAnnotationValues(IntPtr annotation, out int nvalues);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [Obsolete]
-        internal static extern int[] cgGetBooleanAnnotationValues(IntPtr annotation, out int[] nvalues);
+        public static extern int[] cgGetBooleanAnnotationValues(IntPtr annotation, out int[] nvalues);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetBoolStateAssignmentValues(IntPtr stateassignment, out int nVals);
+        public static extern IntPtr cgGetBoolStateAssignmentValues(IntPtr stateassignment, out int nVals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetBufferSize(IntPtr buffer);
+        public static extern int cgGetBufferSize(IntPtr buffer);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgIncludeCallbackFunc cgGetCompilerIncludeCallback(IntPtr context);
+        public static extern CgIncludeCallbackFunc cgGetCompilerIncludeCallback(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetConnectedParameter(IntPtr param);
+        public static extern IntPtr cgGetConnectedParameter(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetConnectedStateAssignmentParameter(IntPtr sa);
+        public static extern IntPtr cgGetConnectedStateAssignmentParameter(IntPtr sa);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetConnectedToParameter(IntPtr param, int index);
+        public static extern IntPtr cgGetConnectedToParameter(IntPtr param, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Behavior cgGetContextBehavior(IntPtr context);
+        public static extern Behavior cgGetContextBehavior(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetDependentAnnotationParameter(IntPtr annotation, int index);
+        public static extern IntPtr cgGetDependentAnnotationParameter(IntPtr annotation, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetDependentProgramArrayStateAssignmentParameter(IntPtr sa, int index);
+        public static extern IntPtr cgGetDependentProgramArrayStateAssignmentParameter(IntPtr sa, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetDependentStateAssignmentParameter(IntPtr stateassignment, int index);
+        public static extern IntPtr cgGetDependentStateAssignmentParameter(IntPtr stateassignment, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Domain cgGetDomain(string domainString);
+        public static extern Domain cgGetDomain(string domainString);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetDomainString(Domain domain);
+        public static extern IntPtr cgGetDomainString(Domain domain);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetEffectContext(IntPtr effect);
+        public static extern IntPtr cgGetEffectContext(IntPtr effect);
 
         //        CG_API const char * CGENTRY cgGetEffectName(CGeffect effect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetEffectName(IntPtr effect);
+        public static extern IntPtr cgGetEffectName(IntPtr effect);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetEffectParameterBuffer(IntPtr param);
+        public static extern IntPtr cgGetEffectParameterBuffer(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetEffectParameterBySemantic(CGeffect, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetEffectParameterBySemantic(IntPtr effect, string name);
+        public static extern IntPtr cgGetEffectParameterBySemantic(IntPtr effect, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGenum cgGetEnum(const char *enum_string);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetEnum(string enumString);
+        public static extern int cgGetEnum(string enumString);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetEnumString(CGenum en);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetEnumString(int en);
+        public static extern IntPtr cgGetEnumString(int en);
 
         /// <summary>
         ///    Returns an error enum if an error has occured in the last Cg method call.
         //CGDLL_API CGerror cgGetError(void);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ErrorType cgGetError();
+        public static extern ErrorType cgGetError();
 
         /// <summary>
         /// 
         // CGDLL_API CGerrorCallbackFunc cgGetErrorCallback(void);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgErrorCallbackFuncDelegate cgGetErrorCallback();
+        public static extern CgErrorCallbackFuncDelegate cgGetErrorCallback();
 
         /// <summary>
         /// 
         // CGDLL_API CGerrorHandlerFunc cgGetErrorHandler(void **data);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgErrorHandlerFuncDelegate cgGetErrorHandler(IntPtr data);
+        public static extern Cg.CgErrorHandlerFuncDelegate cgGetErrorHandler(IntPtr data);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetErrorString(ErrorType error);
+        public static extern IntPtr cgGetErrorString(ErrorType error);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetFirstDependentParameter(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstDependentParameter(IntPtr param);
+        public static extern IntPtr cgGetFirstDependentParameter(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGeffect cgGetFirstEffect(CGcontext);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstEffect(IntPtr context);
+        public static extern IntPtr cgGetFirstEffect(IntPtr context);
 
         //CG_API CGannotation CGENTRY cgGetFirstEffectAnnotation(CGeffect effect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstEffectAnnotation(IntPtr effect);
+        public static extern IntPtr cgGetFirstEffectAnnotation(IntPtr effect);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetFirstEffectParameter(CGeffect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstEffectParameter(IntPtr effect);
+        public static extern IntPtr cgGetFirstEffectParameter(IntPtr effect);
 
         /// <summary>
         /// 
         // CGDLL_API CGerror cgGetFirstError(void);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ErrorType cgGetFirstError();
+        public static extern ErrorType cgGetFirstError();
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetFirstLeafEffectParameter(CGeffect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstLeafEffectParameter(IntPtr effect);
+        public static extern IntPtr cgGetFirstLeafEffectParameter(IntPtr effect);
 
         /// <summary>
         ///    Used to get the first leaf parameter from the specified program.
         // CGDLL_API CGparameter cgGetFirstLeafParameter(CGprogram prog, CGenum name_space);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstLeafParameter(IntPtr program, NameSpace nameSpace);
+        public static extern IntPtr cgGetFirstLeafParameter(IntPtr program, NameSpace nameSpace);
 
         /// <summary>
         /// Gets the first parameter in specified program.
         /// <returns>First parameter in specified program.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstParameter(IntPtr prog, NameSpace nameSpace);
+        public static extern IntPtr cgGetFirstParameter(IntPtr prog, NameSpace nameSpace);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetFirstParameterAnnotation(CGparameter);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstParameterAnnotation(IntPtr param);
+        public static extern IntPtr cgGetFirstParameterAnnotation(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGpass cgGetFirstPass(CGtechnique);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstPass(IntPtr technique);
+        public static extern IntPtr cgGetFirstPass(IntPtr technique);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetFirstPassAnnotation(CGpass);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstPassAnnotation(IntPtr pass);
+        public static extern IntPtr cgGetFirstPassAnnotation(IntPtr pass);
 
         /// <summary>
         ///     Gets the first program in a context.
         /// </returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstProgram(IntPtr context);
+        public static extern IntPtr cgGetFirstProgram(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstProgramAnnotation(IntPtr prog);
+        public static extern IntPtr cgGetFirstProgramAnnotation(IntPtr prog);
 
         /// <summary>
         /// 
         // CGDLL_API CGstate cgGetFirstSamplerState(CGcontext);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstSamplerState(IntPtr context);
+        public static extern IntPtr cgGetFirstSamplerState(IntPtr context);
 
         /// <summary>
         /// 
         // CGDLL_API CGstateassignment cgGetFirstSamplerStateAssignment(CGparameter);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstSamplerStateAssignment(IntPtr param);
+        public static extern IntPtr cgGetFirstSamplerStateAssignment(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGstate cgGetFirstState(CGcontext);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstState(IntPtr context);
+        public static extern IntPtr cgGetFirstState(IntPtr context);
 
         /// <summary>
         /// 
         // CGDLL_API CGstateassignment cgGetFirstStateAssignment(CGpass);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstStateAssignment(IntPtr pass);
+        public static extern IntPtr cgGetFirstStateAssignment(IntPtr pass);
 
         /// <summary>
         /// Gets the first child parameter in a struct parameter.
         /// <returns>First child parameter in specified struct parameter.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstStructParameter(IntPtr param);
+        public static extern IntPtr cgGetFirstStructParameter(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGtechnique cgGetFirstTechnique(CGeffect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstTechnique(IntPtr effect);
+        public static extern IntPtr cgGetFirstTechnique(IntPtr effect);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetFirstTechniqueAnnotation(CGtechnique);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetFirstTechniqueAnnotation(IntPtr technique);
+        public static extern IntPtr cgGetFirstTechniqueAnnotation(IntPtr technique);
 
         /// <summary>
         /// 
         // CGDLL_API const float *cgGetFloatAnnotationValues(CGannotation, int *nvalues);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern float[] cgGetFloatAnnotationValues(IntPtr annotation, out int nvalues);
+        public static extern float[] cgGetFloatAnnotationValues(IntPtr annotation, out int nvalues);
 
         /// <summary>
         /// 
         // CGDLL_API const float *cgGetFloatStateAssignmentValues(CGstateassignment, int *nVals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern float[] cgGetFloatStateAssignmentValues(IntPtr stateassignment, out int nVals);
+        public static extern float[] cgGetFloatStateAssignmentValues(IntPtr stateassignment, out int nVals);
 
         /// <summary>
         /// 
         // CGDLL_API const int *cgGetIntAnnotationValues(CGannotation, int *nvalues);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int[] cgGetIntAnnotationValues(IntPtr annotation, out int nvalues);
+        public static extern int[] cgGetIntAnnotationValues(IntPtr annotation, out int nvalues);
 
         /// <summary>
         /// 
         // CGDLL_API const int *cgGetIntStateAssignmentValues(CGstateassignment, int *nVals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int[] cgGetIntStateAssignmentValues(IntPtr stateassignment, out int nVals);
+        public static extern int[] cgGetIntStateAssignmentValues(IntPtr stateassignment, out int nVals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetLastErrorString(out ErrorType error);
+        public static extern IntPtr cgGetLastErrorString(out ErrorType error);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetLastListing(IntPtr context);
+        public static extern IntPtr cgGetLastListing(IntPtr context);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern LockingPolicy cgGetLockingPolicy();
+        public static extern LockingPolicy cgGetLockingPolicy();
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameterdc(CGparameter param, double *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameterdc(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameterdc(IntPtr param, IntPtr matrix);
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameterdr(CGparameter param, double *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameterdr(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameterdr(IntPtr param, IntPtr matrix);
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameterfc(CGparameter param, float *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameterfc(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameterfc(IntPtr param, IntPtr matrix);
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameterfr(CGparameter param, float *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameterfr(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameterfr(IntPtr param, IntPtr matrix);
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameteric(CGparameter param, int *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameteric(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameteric(IntPtr param, IntPtr matrix);
 
         /// <summary>
         /// 
         // CGDLL_API void cgGetMatrixParameterir(CGparameter param, int *matrix);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern void cgGetMatrixParameterir(IntPtr param, IntPtr matrix);
+        public static extern void cgGetMatrixParameterir(IntPtr param, IntPtr matrix);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Order cgGetMatrixParameterOrder(IntPtr param);
+        public static extern Order cgGetMatrixParameterOrder(IntPtr param);
 
         //CG_API void CGENTRY cgGetMatrixSize(CGtype type, int *nrows, int *ncols);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetMatrixSize(ParameterType type, out int nrows, out int ncols);
+        public static extern ParameterType cgGetMatrixSize(ParameterType type, out int nrows, out int ncols);
 
         //CG_API CGeffect CGENTRY cgGetNamedEffect(CGcontext context, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedEffect(IntPtr context, string name);
+        public static extern IntPtr cgGetNamedEffect(IntPtr context, string name);
 
         //CG_API CGannotation CGENTRY cgGetNamedEffectAnnotation(CGeffect effect, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedEffectAnnotation(IntPtr effect, string name);
+        public static extern IntPtr cgGetNamedEffectAnnotation(IntPtr effect, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetNamedEffectParameter(CGeffect, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedEffectParameter(IntPtr effect, string name);
+        public static extern IntPtr cgGetNamedEffectParameter(IntPtr effect, string name);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedParameter(IntPtr program, string parameter);
+        public static extern IntPtr cgGetNamedParameter(IntPtr program, string parameter);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetNamedParameterAnnotation(CGparameter, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedParameterAnnotation(IntPtr param, string name);
+        public static extern IntPtr cgGetNamedParameterAnnotation(IntPtr param, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGpass cgGetNamedPass(CGtechnique, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedPass(IntPtr technique, string name);
+        public static extern IntPtr cgGetNamedPass(IntPtr technique, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetNamedPassAnnotation(CGpass, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedPassAnnotation(IntPtr pass, string name);
+        public static extern IntPtr cgGetNamedPassAnnotation(IntPtr pass, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetNamedProgramAnnotation(CGprogram, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedProgramAnnotation(IntPtr prog, string name);
+        public static extern IntPtr cgGetNamedProgramAnnotation(IntPtr prog, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetNamedProgramParameter(CGprogram prog,  CGenum name_space,  const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedProgramParameter(IntPtr prog, NameSpace nameSpace, string name);
+        public static extern IntPtr cgGetNamedProgramParameter(IntPtr prog, NameSpace nameSpace, string name);
 
         // CGDLL_API CGstate cgGetNamedSamplerState(CGcontext, string name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedSamplerState(IntPtr context, string name);
+        public static extern IntPtr cgGetNamedSamplerState(IntPtr context, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGstateassignment cgGetNamedSamplerStateAssignment(CGparameter, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedSamplerStateAssignment(IntPtr param, string name);
+        public static extern IntPtr cgGetNamedSamplerStateAssignment(IntPtr param, string name);
 
         // CGDLL_API CGstate cgGetNamedState(CGcontext, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedState(IntPtr context, string name);
+        public static extern IntPtr cgGetNamedState(IntPtr context, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGstateassignment cgGetNamedStateAssignment(CGpass, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedStateAssignment(IntPtr pass, string name);
+        public static extern IntPtr cgGetNamedStateAssignment(IntPtr pass, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetNamedStructParameter(CGparameter param, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedStructParameter(IntPtr param, string name);
+        public static extern IntPtr cgGetNamedStructParameter(IntPtr param, string name);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedSubParameter(IntPtr param, string name);
+        public static extern IntPtr cgGetNamedSubParameter(IntPtr param, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGtechnique cgGetNamedTechnique(CGeffect, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedTechnique(IntPtr effect, string name);
+        public static extern IntPtr cgGetNamedTechnique(IntPtr effect, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetNamedTechniqueAnnotation(CGtechnique, const char *);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNamedTechniqueAnnotation(IntPtr technique, string name);
+        public static extern IntPtr cgGetNamedTechniqueAnnotation(IntPtr technique, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetNamedUserType(CGhandle handle, const char *name);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetNamedUserType(IntPtr handle, string name);
+        public static extern ParameterType cgGetNamedUserType(IntPtr handle, string name);
 
         /// <summary>
         /// 
         // CGDLL_API CGannotation cgGetNextAnnotation(CGannotation);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextAnnotation(IntPtr annotation);
+        public static extern IntPtr cgGetNextAnnotation(IntPtr annotation);
 
         /// <summary>
         /// 
         // CGDLL_API CGeffect cgGetNextEffect(CGeffect);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextEffect(IntPtr effect);
+        public static extern IntPtr cgGetNextEffect(IntPtr effect);
 
         /// <summary>
         ///    Gets a handle to the leaf parameter directly following the specified param.
         // CGDLL_API CGparameter cgGetNextLeafParameter(CGparameter current);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextLeafParameter(IntPtr currentParam);
+        public static extern IntPtr cgGetNextLeafParameter(IntPtr currentParam);
 
         /// <summary>
         /// Iterates to next parameter in program.
         /// <returns>The next parameter in the program's internal sequence of parameters.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextParameter(IntPtr currentParam);
+        public static extern IntPtr cgGetNextParameter(IntPtr currentParam);
 
         /// <summary>
         /// 
         // CGDLL_API CGpass cgGetNextPass(CGpass);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextPass(IntPtr pass);
+        public static extern IntPtr cgGetNextPass(IntPtr pass);
 
         /// <summary>
         ///     Iterate trough programs in a context.
         /// </returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextProgram(IntPtr current);
+        public static extern IntPtr cgGetNextProgram(IntPtr current);
 
         /// <summary>
         /// 
         // CGDLL_API CGstate cgGetNextState(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextState(IntPtr state);
+        public static extern IntPtr cgGetNextState(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API CGstateassignment cgGetNextStateAssignment(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextStateAssignment(IntPtr stateassignment);
+        public static extern IntPtr cgGetNextStateAssignment(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGtechnique cgGetNextTechnique(CGtechnique);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetNextTechnique(IntPtr technique);
+        public static extern IntPtr cgGetNextTechnique(IntPtr technique);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetNumConnectedToParameters(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumConnectedToParameters(IntPtr param);
+        public static extern int cgGetNumConnectedToParameters(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetNumDependentAnnotationParameters(CGannotation);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumDependentAnnotationParameters(IntPtr annotation);
+        public static extern int cgGetNumDependentAnnotationParameters(IntPtr annotation);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumDependentProgramArrayStateAssignmentParameters(IntPtr sa);
+        public static extern int cgGetNumDependentProgramArrayStateAssignmentParameters(IntPtr sa);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetNumDependentStateAssignmentParameters(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumDependentStateAssignmentParameters(IntPtr stateassignment);
+        public static extern int cgGetNumDependentStateAssignmentParameters(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetNumParentTypes(CGtype type);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumParentTypes(ParameterType type);
+        public static extern int cgGetNumParentTypes(ParameterType type);
 
         //CG_API int CGENTRY cgGetNumProgramDomains(CGprogram program);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumProgramDomains(IntPtr program);
+        public static extern int cgGetNumProgramDomains(IntPtr program);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumStateEnumerants(IntPtr state);
+        public static extern int cgGetNumStateEnumerants(IntPtr state);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumSupportedProfiles();
+        public static extern int cgGetNumSupportedProfiles();
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetNumUserTypes(CGhandle handle);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetNumUserTypes(IntPtr handle);
+        public static extern int cgGetNumUserTypes(IntPtr handle);
 
         /// <summary>
         /// Gets a parameter's base resource.
         /// <returns>Base resource of a given parameter.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ResourceType cgGetParameterBaseResource(IntPtr param);
+        public static extern ResourceType cgGetParameterBaseResource(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetParameterBaseType(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetParameterBaseType(IntPtr param);
+        public static extern ParameterType cgGetParameterBaseType(IntPtr param);
 
         //  CG_API int CGENTRY cgGetParameterBufferIndex(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterBufferIndex(IntPtr param);
+        public static extern int cgGetParameterBufferIndex(IntPtr param);
 
         // CG_API int CGENTRY cgGetParameterBufferOffset(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterBufferOffset(IntPtr param);
+        public static extern int cgGetParameterBufferOffset(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameterclass cgGetParameterClass(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterClass cgGetParameterClass(IntPtr param);
+        public static extern ParameterClass cgGetParameterClass(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterClass cgGetParameterClassEnum(string pString);
+        public static extern ParameterClass cgGetParameterClassEnum(string pString);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterClassString(ParameterClass pc);
+        public static extern IntPtr cgGetParameterClassString(ParameterClass pc);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterColumns(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterColumns(IntPtr param);
+        public static extern int cgGetParameterColumns(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGcontext cgGetParameterContext(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterContext(IntPtr param);
+        public static extern IntPtr cgGetParameterContext(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValuedc(IntPtr param, int nelements, double[] vals);
+        public static extern int cgGetParameterDefaultValuedc(IntPtr param, int nelements, double[] vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValuedr(IntPtr param, int nelements, double[] vals);
+        public static extern int cgGetParameterDefaultValuedr(IntPtr param, int nelements, double[] vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValuefc(IntPtr param, int nelements, float[] vals);
+        public static extern int cgGetParameterDefaultValuefc(IntPtr param, int nelements, float[] vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValuefr(IntPtr param, int nelements, float[] vals);
+        public static extern int cgGetParameterDefaultValuefr(IntPtr param, int nelements, float[] vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValueic(IntPtr param, int nelements, int[] vals);
+        public static extern int cgGetParameterDefaultValueic(IntPtr param, int nelements, int[] vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterDefaultValueir(IntPtr param, int nelements, int[] vals);
+        public static extern int cgGetParameterDefaultValueir(IntPtr param, int nelements, int[] vals);
 
         /// <summary>
         ///    Gets the direction of this parameter, i.e. CG_IN, CG_OUT, CG_INOUT.
         // CGDLL_API CGenum cgGetParameterDirection(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterDirection cgGetParameterDirection(IntPtr param);
+        public static extern ParameterDirection cgGetParameterDirection(IntPtr param);
 
         //CG_API CGeffect CGENTRY cgGetParameterEffect(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterEffect(IntPtr param);
+        public static extern IntPtr cgGetParameterEffect(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterIndex(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterIndex(IntPtr param);
+        public static extern int cgGetParameterIndex(IntPtr param);
 
         /// <summary>
         ///    Gets the name of the specified program.
         // CGDLL_API const char *cgGetParameterName(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterName(IntPtr param);
+        public static extern IntPtr cgGetParameterName(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetParameterNamedType(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetParameterNamedType(IntPtr param);
+        public static extern ParameterType cgGetParameterNamedType(IntPtr param);
 
         /// <summary>
         /// Returns an integer that represents the position of a parameter when it was declared within the Cg program.
         /// <returns>Parameter's ordinal number.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterOrdinalNumber(IntPtr param);
+        public static extern int cgGetParameterOrdinalNumber(IntPtr param);
 
         /// <summary>
         /// Gets program that specified parameter belongs to.
         /// <returns>A program given parameter belongs to.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterProgram(IntPtr param);
+        public static extern IntPtr cgGetParameterProgram(IntPtr param);
 
         /// <summary>
         /// Gets a parameter's resource.
         /// <returns>Resource of a given parameter.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ResourceType cgGetParameterResource(IntPtr param);
+        public static extern ResourceType cgGetParameterResource(IntPtr param);
 
         /// <summary>
         ///    Retrieves the index of the specifed parameter according to its type and variability.
         // CGDLL_API unsigned long cgGetParameterResourceIndex(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern uint cgGetParameterResourceIndex(IntPtr param);
+        public static extern uint cgGetParameterResourceIndex(IntPtr param);
 
         //CG_API const char * CGENTRY cgGetParameterResourceName(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterResourceName(IntPtr param);
+        public static extern IntPtr cgGetParameterResourceName(IntPtr param);
 
         //CG_API long CGENTRY cgGetParameterResourceSize(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterResourceSize(IntPtr param);
+        public static extern int cgGetParameterResourceSize(IntPtr param);
 
         // CG_API CGtype CGENTRY cgGetParameterResourceType(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetParameterResourceType(IntPtr param);
+        public static extern ParameterType cgGetParameterResourceType(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterRows(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterRows(IntPtr param);
+        public static extern int cgGetParameterRows(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetParameterSemantic(IntPtr param);
+        public static extern IntPtr cgGetParameterSemantic(IntPtr param);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterSettingMode cgGetParameterSettingMode(IntPtr context);
+        public static extern ParameterSettingMode cgGetParameterSettingMode(IntPtr context);
 
         /// <summary>
         ///    Gets the data type of the specified parameter.
         // CGDLL_API CGtype cgGetParameterType(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetParameterType(IntPtr param);
+        public static extern ParameterType cgGetParameterType(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValuedc(CGparameter param, int n, double *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValuedc(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValuedc(IntPtr param, int n, IntPtr vals);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValuedr(CGparameter param, int n, double *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValuedr(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValuedr(IntPtr param, int n, IntPtr vals);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValuefc(CGparameter param, int n, float *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValuefc(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValuefc(IntPtr param, int n, IntPtr vals);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValuefr(CGparameter param, int n, float *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValuefr(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValuefr(IntPtr param, int n, IntPtr vals);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValueic(CGparameter param, int n, int *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValueic(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValueic(IntPtr param, int n, IntPtr vals);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetParameterValueir(CGparameter param, int n, int *vals);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetParameterValueir(IntPtr param, int n, IntPtr vals);
+        public static extern int cgGetParameterValueir(IntPtr param, int n, IntPtr vals);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [Obsolete]
-        internal static extern double[] cgGetParameterValues(IntPtr param, int valueType, int[] nvalues);
+        public static extern double[] cgGetParameterValues(IntPtr param, int valueType, int[] nvalues);
 
         /// <summary>
         ///    Gets the variability of the specified param (i.e, uniform, varying, etc).
         // CGDLL_API CGenum cgGetParameterVariability(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Variability cgGetParameterVariability(IntPtr param);
+        public static extern Variability cgGetParameterVariability(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetParentType(CGtype type, int index);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetParentType(ParameterType type, int index);
+        public static extern ParameterType cgGetParentType(ParameterType type, int index);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetPassName(CGpass);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetPassName(IntPtr pass);
+        public static extern IntPtr cgGetPassName(IntPtr pass);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetPassProgram(IntPtr pass, Domain domain);
+        public static extern IntPtr cgGetPassProgram(IntPtr pass, Domain domain);
 
         /// <summary>
         /// 
         // CGDLL_API CGtechnique cgGetPassTechnique(CGpass);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetPassTechnique(IntPtr pass);
+        public static extern IntPtr cgGetPassTechnique(IntPtr pass);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProfileType cgGetProfile(string profile);
+        public static extern ProfileType cgGetProfile(string profile);
 
         // CG_API CGdomain CGENTRY cgGetProfileDomain(CGprofile profile);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Domain cgGetProfileDomain(ProfileType profile);
+        public static extern Domain cgGetProfileDomain(ProfileType profile);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
         [return: MarshalAs(UnmanagedType.Bool)]
-        internal static extern bool cgGetProfileProperty(ProfileType profile, Query query);
+        public static extern bool cgGetProfileProperty(ProfileType profile, Query query);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProfileString(ProfileType profile);
+        public static extern IntPtr cgGetProfileString(ProfileType profile);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramBuffer(IntPtr program, int bufferIndex);
+        public static extern IntPtr cgGetProgramBuffer(IntPtr program, int bufferIndex);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetProgramBufferMaxIndex(ProfileType profile);
+        public static extern int cgGetProgramBufferMaxIndex(ProfileType profile);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetProgramBufferMaxSize(ProfileType profile);
+        public static extern int cgGetProgramBufferMaxSize(ProfileType profile);
 
         /// <summary>
         ///     Gets a programs parent context.
         /// </returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramContext(IntPtr prog);
+        public static extern IntPtr cgGetProgramContext(IntPtr prog);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Domain cgGetProgramDomain(IntPtr program);
+        public static extern Domain cgGetProgramDomain(IntPtr program);
 
         //CG_API CGprofile CGENTRY cgGetProgramDomainProfile(CGprogram program, int index);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProfileType cgGetProgramDomainProfile(IntPtr program, int index);
+        public static extern ProfileType cgGetProgramDomainProfile(IntPtr program, int index);
 
         //CG_API CGprogram CGENTRY cgGetProgramDomainProgram(CGprogram program, int index);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramDomainProgram(IntPtr program, int index);
+        public static extern IntPtr cgGetProgramDomainProgram(IntPtr program, int index);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProgramInput cgGetProgramInput(IntPtr program);
+        public static extern ProgramInput cgGetProgramInput(IntPtr program);
 
         /// <summary>
         /// 
         // CGDLL_API char const * const *cgGetProgramOptions(CGprogram prog);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramOptions(IntPtr prog);
+        public static extern IntPtr cgGetProgramOptions(IntPtr prog);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProgramOutput cgGetProgramOutput(IntPtr program);
+        public static extern ProgramOutput cgGetProgramOutput(IntPtr program);
 
         /// <summary>
         ///     Gets the profile enumeration of the program.
         /// </returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProfileType cgGetProgramProfile(IntPtr prog);
+        public static extern ProfileType cgGetProgramProfile(IntPtr prog);
 
         /// <summary>
         /// 
         // CGDLL_API CGprogram cgGetProgramStateAssignmentValue(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramStateAssignmentValue(IntPtr stateassignment);
+        public static extern IntPtr cgGetProgramStateAssignmentValue(IntPtr stateassignment);
 
         /// <summary>
         ///     Gets the specified source from the program.
         // CGDLL_API const char *cgGetProgramString(CGprogram prog, CGenum pname);
         [DllImport(CgNativeLibrary, CallingConvention = Convention, CharSet = CharSet.Auto)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetProgramString(IntPtr program, SourceType sourceType);
+        public static extern IntPtr cgGetProgramString(IntPtr program, SourceType sourceType);
 
         /// <summary>
         /// Gets the resource enumerant assigned to a resource name.
         /// <returns>Resource enumerant.</returns>
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ResourceType cgGetResource(string resourceName);
+        public static extern ResourceType cgGetResource(string resourceName);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetResourceString(ResourceType resource);
+        public static extern IntPtr cgGetResourceString(ResourceType resource);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetSamplerStateAssignmentParameter(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetSamplerStateAssignmentParameter(IntPtr stateassignment);
+        public static extern IntPtr cgGetSamplerStateAssignmentParameter(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGstate cgGetSamplerStateAssignmentState(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetSamplerStateAssignmentState(IntPtr stateassignment);
+        public static extern IntPtr cgGetSamplerStateAssignmentState(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetSamplerStateAssignmentValue(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetSamplerStateAssignmentValue(IntPtr stateassignment);
+        public static extern IntPtr cgGetSamplerStateAssignmentValue(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern CasePolicy cgGetSemanticCasePolicy();
+        public static extern CasePolicy cgGetSemanticCasePolicy();
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetStateAssignmentIndex(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetStateAssignmentIndex(IntPtr stateassignment);
+        public static extern int cgGetStateAssignmentIndex(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGpass cgGetStateAssignmentPass(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateAssignmentPass(IntPtr stateassignment);
+        public static extern IntPtr cgGetStateAssignmentPass(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGstate cgGetStateAssignmentState(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateAssignmentState(IntPtr stateassignment);
+        public static extern IntPtr cgGetStateAssignmentState(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateContext(IntPtr state);
+        public static extern IntPtr cgGetStateContext(IntPtr state);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateEnumerant(IntPtr state, int index, out int value);
+        public static extern IntPtr cgGetStateEnumerant(IntPtr state, int index, out int value);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateEnumerantName(IntPtr state, int index);
+        public static extern IntPtr cgGetStateEnumerantName(IntPtr state, int index);
 
         /// <summary>
         /// 
         // CGDLL_API int cgGetStateEnumerantValue(CGstate, const char*)
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern int cgGetStateEnumerantValue(IntPtr state, string name);
+        public static extern int cgGetStateEnumerantValue(IntPtr state, string name);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProfileType cgGetStateLatestProfile(IntPtr state);
+        public static extern ProfileType cgGetStateLatestProfile(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetStateName(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStateName(IntPtr state);
+        public static extern IntPtr cgGetStateName(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API CGstatecallback cgGetStateResetCallback(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgStateCallbackDelegate cgGetStateResetCallback(IntPtr state);
+        public static extern State.CgStateCallbackDelegate cgGetStateResetCallback(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API CGstatecallback cgGetStateSetCallback(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgStateCallbackDelegate cgGetStateSetCallback(IntPtr state);
+        public static extern State.CgStateCallbackDelegate cgGetStateSetCallback(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetStateType(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetStateType(IntPtr state);
+        public static extern ParameterType cgGetStateType(IntPtr state);
 
         /// <summary>
         /// 
         // CGDLL_API CGstatecallback cgGetStateValidateCallback(CGstate);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern Cg.CgStateCallbackDelegate cgGetStateValidateCallback(IntPtr state);
+        public static extern State.CgStateCallbackDelegate cgGetStateValidateCallback(IntPtr state);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetString(CgAll sname);
+        public static extern IntPtr cgGetString(CgAll sname);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetStringAnnotationValue(CGannotation);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStringAnnotationValue(IntPtr annotation);
+        public static extern IntPtr cgGetStringAnnotationValue(IntPtr annotation);
 
         //CG_API const char * const * CGENTRY cgGetStringAnnotationValues(CGannotation ann, int *nvalues);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStringAnnotationValues(IntPtr ann, out int nvalues);
+        public static extern IntPtr cgGetStringAnnotationValues(IntPtr ann, out int nvalues);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetStringParameterValue(CGparameter param);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStringParameterValue(IntPtr param);
+        public static extern IntPtr cgGetStringParameterValue(IntPtr param);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetStringStateAssignmentValue(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetStringStateAssignmentValue(IntPtr stateassignment);
+        public static extern IntPtr cgGetStringStateAssignmentValue(IntPtr stateassignment);
 
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ProfileType cgGetSupportedProfile(int index);
+        public static extern ProfileType cgGetSupportedProfile(int index);
 
         /// <summary>
         /// 
         // CGDLL_API CGeffect cgGetTechniqueEffect(CGtechnique);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetTechniqueEffect(IntPtr technique);
+        public static extern IntPtr cgGetTechniqueEffect(IntPtr technique);
 
         /// <summary>
         /// 
         // CGDLL_API const char *cgGetTechniqueName(CGtechnique);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetTechniqueName(IntPtr technique);
+        public static extern IntPtr cgGetTechniqueName(IntPtr technique);
 
         /// <summary>
         /// 
         // CGDLL_API CGparameter cgGetTextureStateAssignmentValue(CGstateassignment);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern IntPtr cgGetTextureStateAssignmentValue(IntPtr stateassignment);
+        public static extern IntPtr cgGetTextureStateAssignmentValue(IntPtr stateassignment);
 
         /// <summary>
         /// 
         // CGDLL_API CGtype cgGetType(const char *type_string);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetType(string typeString);
+        public static extern ParameterType cgGetType(string typeString);
 
         //CG_API CGtype CGENTRY cgGetTypeBase(CGtype type);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterType cgGetTypeBase(ParameterType type);
+        public static extern ParameterType cgGetTypeBase(ParameterType type);
 
         //CG_API CGparameterclass CGENTRY cgGetTypeClass(CGtype type);
         [DllImport(CgNativeLibrary, CallingConvention = Convention)]
         [SuppressUnmanagedCodeSecurity]
-        internal static extern ParameterClass cgGetTypeClass(ParameterType type)