Axiom.Serialization.MeshSerializerImplv12.ReadGeometryPositions C# (CSharp) Метод

ReadGeometryPositions() защищенный Метод

protected ReadGeometryPositions ( short bindIdx, BinaryReader reader, VertexData data ) : void
bindIdx short
reader System.IO.BinaryReader
data Axiom.Graphics.VertexData
Результат void
		protected virtual void ReadGeometryPositions( short bindIdx, BinaryReader reader, VertexData data )
		{
			data.vertexDeclaration.AddElement( bindIdx, 0, VertexElementType.Float3, VertexElementSemantic.Position );

			// vertex buffers
			HardwareVertexBuffer vBuffer = HardwareBufferManager.Instance.CreateVertexBuffer( data.vertexDeclaration.Clone( bindIdx ), data.vertexCount, mesh.VertexBufferUsage, mesh.UseVertexShadowBuffer );

			IntPtr posData = vBuffer.Lock( BufferLocking.Discard );

			// ram the floats into the buffer data
			ReadFloats( reader, data.vertexCount * 3, posData );

			// unlock the buffer
			vBuffer.Unlock();

			// bind the position data
			data.vertexBufferBinding.SetBinding( bindIdx, vBuffer );
		}