1 2 3 4 5 6 7 8 9 10 11 12
|
m_Texture := Texture(m_Data.HTTextures['sol']);
m_Device.SetTexture(0, m_Texture);
m_Device.TextureState[0].TextureCoordinateIndex := 0;
m_Device.SetSamplerState(0, SamplerStageStates.AddressU, 1);
m_Device.SetSamplerState(0, SamplerStageStates.AddressV, 1);
m_Device.SetTransform(TransformType.World, Matrix.get_Identity);
m_Device.SetStreamSource(0, m_VertexBuffer, 0);
m_Device.Indices := m_IndexBuffer;
// on dit quel type de vertex on utilise
m_Device.VertexFormat := CustomVertex.PositionNormalTextured.Format;
m_Device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, Length(m_Terrain), 0, (Length(m_Indices) div 3)); |
Partager