Hi.
I try to work with vertex array over VB NET 2.4, and I discovered the following:
if I Try to draw a triangle with this code:
dim pX as integer = 100
dim pY as integer = 100
dim pVertex(2) as Vertex
pVertex(0) = New Vertex(New Vector2f(pX, pY), New Color(255, 0, 0, 255))
pVertex(1) = New Vertex(New Vector2f(pX+64, pY), New Color(255, 0, 0, 255))
pVertex(2) = New Vertex(New Vector2f(pX+64, pY+64), New Color(255, 0, 0, 255))
oRtScreen.Draw(pArrayAura, PrimitiveType.Triangles)
Work perfect.
But, if I declare the vertex without any parameter, and then try to set the value, then, SFML don't draw anything, but don't report any error.
dim pX as integer = 100
dim pY as integer = 100
dim pVertex(2) as Vertex
pVertex(0) = New Vertex()
pVertex(1) = New Vertex()
pVertex(2) = New Vertex()
pVertex(0).position = New Vector2f(pX, pY)
pVertex(1).position = New Vector2f(pX+64, pY)
pVertex(2).position = New Vector2f(pX+64, pY+64)
pVertex(0).color = New Color(255, 0, 0, 255)
pVertex(1).color = New Color(255, 0, 0, 255)
pVertex(2).color = New Color(255, 0, 0, 255)
oRtScreen.Draw(pArrayAura, PrimitiveType.Triangles)
Don't work, but don't show any error.
Any idea why this happens?