What are constant buffers?
Until DirectX 10, inefficient constant updates adversely affected performance. To overcome this, Constant buffers have been introduced. These buffers are logical groupings of constant variables that Direct3D 10 application feeds into shaders. They allow the API and hardware to manipulate constants in an efficient way, minimizing usage of precious CPU to GPU bandwidth. The syntax for Constant buffers looks like C-style structs. Constants are grouped together in buffers based on their frequency of usage and updating. For example, for a rotating texture mapped cube viewed from a stationary point we can put the entities that change every frame in one buffer (world matrix and mesh color vector here) and those that never change in another buffer (view matrix here).