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

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

protected ReadGeometryColors ( short bindIdx, BinaryReader reader, VertexData data ) : void
bindIdx short
reader System.IO.BinaryReader
data Axiom.Graphics.VertexData
Результат void
		protected virtual void ReadGeometryColors( short bindIdx, BinaryReader reader, VertexData data )
		{
			// add an element for normals
			data.vertexDeclaration.AddElement( bindIdx, 0, VertexElementType.Color, VertexElementSemantic.Diffuse );

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

			// lock the buffer for editing
			IntPtr colors = vBuffer.Lock( BufferLocking.Discard );

			// stuff the floats into the normal buffer
			ReadInts( reader, data.vertexCount, colors );

			// unlock the buffer to commit
			vBuffer.Unlock();

			// bind this buffer
			data.vertexBufferBinding.SetBinding( bindIdx, vBuffer );
		}