Lock and SetStreamSource in Direct3D

Started by
0 comments, last by kovacsp 18 years, 1 month ago
i am using Direct3D 9.0 SDK i am new in direct3d, why we using device->Lock(); device->Unlock(); and SetStreamSource(); and what is the parameters.
Advertisement
hi,

you use Lock to get a pointer to the vertex/index buffer, so that you can write data to it. Then you unlock it, to feed it back to the card. Then you set the newly created buffer as a stream source. You want to tell the card what to render as you can have multiple buffers.
Abou the parameters, please refer to the SDK docs, it explains every single parameter very well.

kp
------------------------------------------------------------Neo, the Matrix should be 16-byte aligned for better performance!

This topic is closed to new replies.

Advertisement