HowardK
07-10-2002, 01:34 PM
I'm fairly new to directX, using V8.1.
The following code is based upon the tutorial supplied by MS with the SDK.
For some reason triangle 2 will not draw.
With Vertices(0): .x = x + width: .y = y: .z = z + length: .colour = &HFF000000: End With
With Vertices(1): .x = x: .y = y: .z = z: .colour = &HFF000000: End With
With Vertices(2): .x = x: .y = y: .z = z + length: .colour = &HFF000000: End With
With Vertices(4): .x = x: .y = y: z = z: .colour = &HFF00FF00: End With
With Vertices(5): .x = x + width: .y = y: z = z + length: .colour = &HFF00FF00: End With
With Vertices(3): .x = x + width: .y = y: z = z: .colour = &HFF00FF00: End With
x=0, y=0, z=0, width = 5, length = 5
This should lay out 2 triangles flat, in the shape of a square. Camera is positioned up abd back a few units. It shows only the first triangle, in black.
When a loop is used to lay out further triangles only the first halves show up.
I've tried allsorts, change the order of the vertices, the triangles etc. Only when the Y value for last point is changed to 1 does the triangle appear.
Banging my head on a brick wall only hurts my head !
Please someone, tell me I'm doing something stupid.
The following code is based upon the tutorial supplied by MS with the SDK.
For some reason triangle 2 will not draw.
With Vertices(0): .x = x + width: .y = y: .z = z + length: .colour = &HFF000000: End With
With Vertices(1): .x = x: .y = y: .z = z: .colour = &HFF000000: End With
With Vertices(2): .x = x: .y = y: .z = z + length: .colour = &HFF000000: End With
With Vertices(4): .x = x: .y = y: z = z: .colour = &HFF00FF00: End With
With Vertices(5): .x = x + width: .y = y: z = z + length: .colour = &HFF00FF00: End With
With Vertices(3): .x = x + width: .y = y: z = z: .colour = &HFF00FF00: End With
x=0, y=0, z=0, width = 5, length = 5
This should lay out 2 triangles flat, in the shape of a square. Camera is positioned up abd back a few units. It shows only the first triangle, in black.
When a loop is used to lay out further triangles only the first halves show up.
I've tried allsorts, change the order of the vertices, the triangles etc. Only when the Y value for last point is changed to 1 does the triangle appear.
Banging my head on a brick wall only hurts my head !
Please someone, tell me I'm doing something stupid.