Game Development Reference
In-Depth Information
Render states are states that the device maintains that affect how
geometry is rendered. Render states remain in effect until changed,
and the current values are applied to the geometry of any subse-
quent drawing operations. All render states have initial default
values.
To draw the contents of a vertex buffer and an index buffer you
must:
Call IDirect3DDevice9::SetStreamSource and hook the
vertex buffer that you wish to draw from to a stream.
Call IDirect3DDevice9::SetFVF to set the vertex format
of the vertices to render.
If you are using an index buffer, call IDirect3DDevice9::
SetIndices to set the index buffer.
Call either IDirect3DDevice9::DrawPrimitive or
IDirect3DDevice9::DrawIndexedPrimitive in
between an IDirect3DDevice9::BeginScene and
IDirect3DDevice9::EndScene pair.
Using the D3DXCreate* functions, we can create the geometry of
more complex 3D objects, such as spheres, cylinders, and teapots.
Search WWH ::




Custom Search