Example #1
0
 public static void DrawRangeElements(BeginMode mode, int start, int end, int count, PointerToType type, int offset)
 {
     Delegates.DrawRangeElements(mode, start, end, count, type, offset);
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="structElementCount">1, 2, 3 or 4</param>
 /// <param name="type"></param>
 /// <param name="stride"></param>
 /// <param name="offset"></param>
 public static void VertexAttribPointer(int attribIndex, int structElementCount, PointerToType type, byte normalized, int stride, int offset)
 {
     Delegates.VertexAttribPointer(attribIndex, structElementCount, type, normalized, stride, offset);
 }
Example #3
0
 public static void DrawElements(BeginMode mode, int count, PointerToType type, int offset)
 {
     Delegates.DrawElements(mode, count, type, offset);
 }
Example #4
0
 public static void IndexPointer(PointerToType type, int stride, int offset)
 {
     Delegates.IndexPointer(type, stride, offset);
 }
Example #5
0
 public static void NormalPointer(PointerToType type, int stride, int offset)
 {
     Delegates.NormalPointer(type, stride, offset);
 }
Example #6
0
 public static void FogCoordPointer(PointerToType type, int stride, int offset)
 {
     Delegates.FogCoordPointer(type, stride, offset);
 }
Example #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="structElementCount">1, 2, 3 or 4</param>
 /// <param name="type"></param>
 /// <param name="stride"></param>
 /// <param name="offset"></param>
 public static void TexCoordPointer(int structElementCount, PointerToType type, int stride, int offset)
 {
     Delegates.TexCoordPointer(structElementCount, type, stride, offset);
 }
Example #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="structElementCount">3 or 4</param>
 /// <param name="type"></param>
 /// <param name="stride"></param>
 /// <param name="offset"></param>
 public static void SecondaryColorPointer(int structElementCount, PointerToType type, int stride, int offset)
 {
     Delegates.SecondaryColorPointer(structElementCount, type, stride, offset);
 }
Example #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="structElementCount">2, 3 or 4</param>
 /// <param name="type"></param>
 /// <param name="stride"></param>
 /// <param name="offset"></param>
 public static void VertexPointer(int structElementCount, PointerToType type, int stride, int offset)
 {
     Delegates.VertexPointer(structElementCount, type, stride, offset);
 }
Example #10
0
            public BufferArray(int attributeIdx, int unitElementCount, bool normalized, int stride, int offset, object data)
            {
                ArrayType = ArrayType.AttribArray;

                AttributeIdx     = attributeIdx;
                UnitElementCount = unitElementCount;
                Normalized       = normalized;
                Stride           = stride;
                Offset           = offset;
                DataArray        = data;

                string typeName = data.GetType().Name;

                switch (typeName)
                {
                case "Single[]":
                    DataType     = PointerToType.Float;
                    ElementCount = ((float[])data).Length;
                    Size         = ElementCount * sizeof(float);
                    break;

                case "UInt32[]":
                    DataType     = PointerToType.UnsignedInt;
                    ElementCount = ((uint[])data).Length;
                    Size         = ElementCount * sizeof(uint);
                    break;

                case "Int32[]":
                    DataType     = PointerToType.Int;
                    ElementCount = ((int[])data).Length;
                    Size         = ElementCount * sizeof(int);
                    break;

                case "UInt16[]":
                    DataType     = PointerToType.UnsignedShort;
                    ElementCount = ((ushort[])data).Length;
                    Size         = ElementCount * sizeof(ushort);
                    break;

                case "Int16[]":
                    DataType     = PointerToType.Short;
                    ElementCount = ((short[])data).Length;
                    Size         = ElementCount * sizeof(short);
                    break;

                case "Byte[]":
                    DataType     = PointerToType.UnsignedByte;
                    ElementCount = ((byte[])data).Length;
                    Size         = ElementCount * sizeof(byte);
                    break;

                case "SByte[]":
                    DataType     = PointerToType.Byte;
                    ElementCount = ((sbyte[])data).Length;
                    Size         = ElementCount * sizeof(sbyte);
                    break;

                case "Double[]":
                    DataType     = PointerToType.Double;
                    ElementCount = ((double[])data).Length;
                    Size         = ElementCount * sizeof(double);
                    break;

                    /* case "HalfFloat[]":
                     *      DataType = PointerToType.HalfFloat;
                     *      ElementCount = ((halffloat[])data).Length;
                     *      Size = ElementCount * sizeof(halffloat);
                     *      break;
                     */
                }
                // TODO: think of a way to safely set data type to Int2101010Rev
            }