Original Post
hi,
I am trying to draw a simple quad on the screen using direct3d.
To do this, I fill a vertex buffer and an index buffer with
the requaired vertex and index arrays, and use the
DrawIndexedPrimitive function.
The quad is drawn only if I declare my vertex array as a fixed array:
VERTEX vArray[4];
and pass it directly to the (memcpy) function, which I use to fill
the vertex buffer.
but when I try to use a dynamic array:
VERTEX *vArray = new VERTEX[4];
or when I try to pass a fixed array as an argument to a function
that use it to fill the buffer by passing it again to the (memcpy),
nothing is shown on the screen..
Do anybody know why does this happen?
thanks in advanced and sorry for my poor english..
I am trying to draw a simple quad on the screen using direct3d.
To do this, I fill a vertex buffer and an index buffer with
the requaired vertex and index arrays, and use the
DrawIndexedPrimitive function.
The quad is drawn only if I declare my vertex array as a fixed array:
VERTEX vArray[4];
and pass it directly to the (memcpy) function, which I use to fill
the vertex buffer.
but when I try to use a dynamic array:
VERTEX *vArray = new VERTEX[4];
or when I try to pass a fixed array as an argument to a function
that use it to fill the buffer by passing it again to the (memcpy),
nothing is shown on the screen..
Do anybody know why does this happen?
thanks in advanced and sorry for my poor english..