Well you should maybe give a bit more information : what have you tried - what doesn't work. Have you looked into any examples? In the DXSDK there is plenty of simple examples how to draw a triangle, how to light a triangle etc.
Since you are using DX9, you may even start without using any shaders - the fixed function pipeline does all that you need for drawing gouraud shaded objects with ambient, diffuse and specular lighting. No need even for a lighting model or anything.
Typically to attain that objective you'll need (assuming that you are using fixed function pipeline) :
- vertex buffer (+index buffer) containing a 3d mesh with at least position and normal data
- vertex format declaration or FVF which matches the vertex buffer data
- a material description with desired ambient, diffuse, specular values
- a light structure with required lighting information (position, diffuse, direction)
- a view matrix describing your camera location and orientation
- a projection matrix to describe your view port form and znear and zfar planes
- a world matrix for the object orientation and location
- well of course a back buffer and z-buffer a required too ... and a window
Anyway, take a look in to the examples of the DXSDK or google. You'll find source which does more and less exactly what you need.
Cheers!
[edit] when using the fixed function pipeline, you'll have less control over the lighting calculations. You'll need to use a vertex shader and a pixel shader to implement some specific lighting formulas. Once again, there are samples using VS/PS so it is pointless to write an exact answer for your question.