Initialization of Direct3D9 (This is most likely irrelevant to my problem, but just in case)
direct3D = New Direct3D() Dim deviceSettings As New PresentParameters deviceSettings.BackBufferCount = 1 deviceSettings.DeviceWindowHandle = Me.Handle deviceSettings.Windowed = True deviceSettings.SwapEffect = SwapEffect.Discard deviceSettings.PresentationInterval = PresentInterval.Immediate device = New Device(direct3D, 0, DeviceType.Hardware, Me.Handle, CreateFlags.HardwareVertexProcessing, deviceSettings)
device.Clear(ClearFlags.Target, Color.Yellow, 1, 0) device.BeginScene() Dim vertices(3) As CustomVertex vertices(0).position = New Vector3(-0.5!, -0.5!, 0.0!) vertices(1).position = New Vector3(200.0!, 100.0!, 0.0!) vertices(2).position = New Vector3(150.0!, 100.0!, 0.0!) device.VertexFormat = VertexFormat.Position Dim ret As SlimDX.Result = device.DrawUserPrimitives(PrimitiveType.TriangleList, 1, vertices) device.EndScene() device.Present()
For the record, CustomVertex is just a Vector3 for the position. I have also tried altering the CustomVertex to have a Integer for color and had that but that did not seem to affect it.
Edited by addy914, 29 May 2012 - 09:03 PM.