
Modify vertex data during rendering
lock the vb, get the memory pointer. then walk the memory, and modify the
data. then unlock the vb.
then you can use it to submit a DrawPrim request.
--
Phil Taylor
PM : DirectX SDK, Managed DirectX, Windows XP Inbox 3D screensavers, and a
few more bits and bobs.
http://msdn.microsoft.com/directx
This posting is provided "AS IS" with no warranties, and confers no rights.
Quote:
> Hi all,
> I'm afraid the answer to this is terribly simple but
> reading the sdk and scanning mboards has not driven the
> light into my skull yet. I have a basic program which
> reads in a POV raw triangle file and puts the data into a
> DXvertexBuffer for rendering as a triangle list with my
> D3DDevice.
> Problem is , I want to modify the color of the vertices
> without having to basically reinitialize the whole process.
> Reading the documentation the only clue I saw was the
> D3DVertexBuffer8SetData function, but if I read that
> correctly it is actually 3 functions and would have to be
> called for each element in the buffer (which I'm not even
> going to contemplate unless a guru whacks me with an idiot
> stick).
> Any help would be greatly appreciated!
> Thanks,
> Zach McCain (my first dx program, be gentle)