Commits

Tobias Bohnen committed db42f67

* changed constructor to public

Comments (0)

Files changed (14)

CgNet.OpenTK/Properties/AssemblyInfo.cs

-#region Using directives
-
-using System;
+using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-#endregion
-
-// General Information about an assembly is controlled through the following 
+// General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("CgNet.OpenTK")]
 //
 // Major.Minor.Build.Revision
 //
-// You can specify all the values or you can use the default the Revision and 
+// You can specify all the values or you can use the default the Revision and
 // Build Numbers by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.*")]

CgNet/Annotation.cs

     {
         #region Constructors
 
-        internal Annotation(IntPtr handle, bool ownsHandle)
+        public Annotation(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
     {
         #region Constructors
 
-        internal Buffer(IntPtr handle, bool ownsHandle)
+        public Buffer(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
             return NativeMethods.cgGetTypeSizes(type, out nrows, out ncols);
         }
 
+        public static unsafe string[] IntPtrToStringArray(IntPtr ptr)
+        {
+            if (ptr == IntPtr.Zero)
+            {
+                return null;
+            }
+
+            var byteArray = (byte**)ptr;
+            var lines = new List<string>();
+            var buffer = new List<byte>();
+
+            for (; ; )
+            {
+                byte* b = *byteArray;
+                for (; ; )
+                {
+                    if (b == null || *b == '\0')
+                    {
+                        if (buffer.Count > 0)
+                        {
+                            char[] cc = Encoding.ASCII.GetChars(buffer.ToArray());
+                            lines.Add(new string(cc));
+                            buffer.Clear();
+                        }
+                        break;
+                    }
+
+                    buffer.Add(*b);
+                    b++;
+                }
+
+                byteArray++;
+
+                if (b == null)
+                {
+                    break;
+                }
+            }
+
+            return lines.Count == 0 ? null : lines.ToArray();
+        }
+
         public static bool IsInterfaceType(ParameterType type)
         {
             return NativeMethods.cgIsInterfaceType(type);
             return null;
         }
 
-        internal static unsafe string[] IntPtrToStringArray(IntPtr ptr)
-        {
-            if (ptr == IntPtr.Zero)
-            {
-                return null;
-            }
-
-            var byteArray = (byte**)ptr;
-            var lines = new List<string>();
-            var buffer = new List<byte>();
-
-            for (; ; )
-            {
-                byte* b = *byteArray;
-                for (; ; )
-                {
-                    if (b == null || *b == '\0')
-                    {
-                        if (buffer.Count > 0)
-                        {
-                            char[] cc = Encoding.ASCII.GetChars(buffer.ToArray());
-                            lines.Add(new string(cc));
-                            buffer.Clear();
-                        }
-                        break;
-                    }
-
-                    buffer.Add(*b);
-                    b++;
-                }
-
-                byteArray++;
-
-                if (b == null)
-                {
-                    break;
-                }
-            }
-
-            return lines.Count == 0 ? null : lines.ToArray();
-        }
-
         #endregion Internal Static Methods
 
         #region Private Static Methods
 
         #region Constructors
 
-        internal Context(IntPtr handle, bool ownsHandle)
+        public Context(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
                 return ptr == IntPtr.Zero ? null : new State(ptr, false);
             }
         }
-        
+
         public bool IsContext
         {
             get
     {
         #region Constructors
 
-        internal Effect(IntPtr handle, bool ownsHandle)
+        public Effect(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
                 return ptr == IntPtr.Zero ? null : new Parameter(ptr, false);
             }
         }
-        
+
         public Technique FirstTechnique
         {
             get
                 return ptr == IntPtr.Zero ? null : new Technique(ptr, false);
             }
         }
-        
+
         public bool IsEffect
         {
             get
     {
         #region Constructors
 
-        internal Obj(IntPtr handle, bool ownsHandle)
+        public Obj(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }

CgNet/Parameter.cs

     {
         #region Constructors
 
-        internal Parameter(IntPtr handle, bool ownsHandle)
+        public Parameter(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
     {
         #region Constructors
 
-        internal Pass(IntPtr handle, bool ownsHandle)
+        public Pass(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }
     {
         #region Constructors
 
-        internal Program(IntPtr handle, bool ownsHandle)
+        public Program(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }

CgNet/Properties/AssemblyInfo.cs

 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: InternalsVisibleTo("CgNet.OpenTK")]
-[assembly: InternalsVisibleTo("CgNet.SlimDX")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
     {
         #region Constructors
 
-        internal State(IntPtr handle, bool ownsHandle)
+        public State(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }

CgNet/StateAssignment.cs

     {
         #region Constructors
 
-        internal StateAssignment(IntPtr handle, bool ownsHandle)
+        public StateAssignment(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }

CgNet/Technique.cs

     {
         #region Constructors
 
-        internal Technique(IntPtr handle, bool ownsHandle)
+        public Technique(IntPtr handle, bool ownsHandle)
             : base(handle, ownsHandle)
         {
         }