예제 #1
0
        public void Init(HexahedronMeshGeometry3D geometry)
        {
            base.Init(geometry);

            indexBuffer = new uint[1];
            indexBuffer[0] = CreateVertexBufferObject(OpenGL.GL_ELEMENT_ARRAY_BUFFER, geometry.HalfHexahedronIndices, OpenGL.GL_STATIC_DRAW);

            int elementLength = sizeof(uint);// should be 4.
            this.indexBufferLength = geometry.HalfHexahedronIndices.SizeInBytes / (elementLength);
        }
예제 #2
0
        public void Init(HexahedronMeshGeometry3D geometry)
        {
            base.Init(geometry);

            indexBuffer    = new uint[1];
            indexBuffer[0] = CreateVertexBufferObject(OpenGL.GL_ELEMENT_ARRAY_BUFFER, geometry.HalfHexahedronIndices, OpenGL.GL_STATIC_DRAW);

            int elementLength = sizeof(uint);// should be 4.

            this.indexBufferLength = geometry.HalfHexahedronIndices.SizeInBytes / (elementLength);
        }