Ejemplo n.º 1
0
 // Token: 0x0600208A RID: 8330 RVA: 0x0013EC20 File Offset: 0x0013CE20
 public NNS_VTXARRAY_GL(AppMain.NNS_VTXARRAY_GL array)
 {
     this.Type     = array.Type;
     this.Size     = array.Size;
     this.DataType = array.DataType;
     this.Stride   = array.Stride;
     this.Pointer  = array.Pointer;
     this.Data     = array.Data;
 }
Ejemplo n.º 2
0
        // Token: 0x0600208B RID: 8331 RVA: 0x0013EC7C File Offset: 0x0013CE7C
        public static AppMain.NNS_VTXARRAY_GL Read(BinaryReader reader, ByteBuffer vertexBuffer, uint vertexBufferOffset, int nVertex)
        {
            AppMain.NNS_VTXARRAY_GL nns_VTXARRAY_GL = new AppMain.NNS_VTXARRAY_GL();
            nns_VTXARRAY_GL.Type     = reader.ReadUInt32();
            nns_VTXARRAY_GL.Size     = reader.ReadInt32();
            nns_VTXARRAY_GL.DataType = reader.ReadUInt32();
            nns_VTXARRAY_GL.Stride   = reader.ReadInt32();
            uint num = reader.ReadUInt32();

            if (num != 0U)
            {
                nns_VTXARRAY_GL.Pointer = vertexBuffer + ( int )(num - vertexBufferOffset);
            }
            return(nns_VTXARRAY_GL);
        }
Ejemplo n.º 3
0
        public GLVertexBuffer_(AppMain.NNS_VTXLIST_GL_DESC pVtxDesc)
        {
            this.pVtxDesc_     = pVtxDesc;
            this.elementTypes_ = new OpenGL.GLVertexElementType[this.pVtxDesc_.nArray];
            for (int index = 0; index < this.pVtxDesc_.nArray; ++index)
            {
                uint type = this.pVtxDesc_.pArray[index].Type;
                if (type <= 8U)
                {
                    switch ((int)type - 1)
                    {
                    case 0:
                        this.posArray_            = this.pVtxDesc_.pArray[index];
                        this.elementTypes_[index] = OpenGL.GLVertexElementType.Position;
                        continue;

                    case 1:
                        this.blWeightArray_       = this.pVtxDesc_.pArray[index];
                        this.elementTypes_[index] = OpenGL.GLVertexElementType.BlendWeight;
                        continue;

                    case 2:
                        continue;

                    case 3:
                        this.blIndexArray_        = this.pVtxDesc_.pArray[index];
                        this.elementTypes_[index] = OpenGL.GLVertexElementType.BlendIndex;
                        continue;

                    default:
                        if (type == 8U)
                        {
                            this.normArray_           = this.pVtxDesc_.pArray[index];
                            this.elementTypes_[index] = OpenGL.GLVertexElementType.Normal;
                            continue;
                        }
                        continue;
                    }
                }
                else if (type != 16U)
                {
                    if (type != 256U)
                    {
                        if (type == 512U)
                        {
                            this.texCoord1Array_      = this.pVtxDesc_.pArray[index];
                            this.elementTypes_[index] = OpenGL.GLVertexElementType.TextureCoordinate1;
                        }
                    }
                    else
                    {
                        this.texCoord0Array_      = this.pVtxDesc_.pArray[index];
                        this.elementTypes_[index] = OpenGL.GLVertexElementType.TextureCoordinate0;
                    }
                }
                else
                {
                    this.colArray_            = this.pVtxDesc_.pArray[index];
                    this.elementTypes_[index] = OpenGL.GLVertexElementType.Color;
                }
            }
        }