Now I can see something but it is far from correct as far as I can see... I draw the bottom and top lines that connects the near and far planes but the lines are drawn as if the frustum would have a fov at 180 degrees and the fov is 20 degrees.
EDIT: it doesn't matter how I change the fov the lines are drawn the same starting at the position of the light and are drawn as if the light frustum would have 180 degree fov.
EDIT 2: I have now drawn the lines around the near and far plane and it looks like the near and far plane are at the same position, at 1.0f the far plane should be at 100.0f
EDIT 3: All planes have the same information according to what I have logged into my logfile
15:20:04 +---------------------------------------------------------------------------------+15:20:04 | Plane 0 light 0 |15:20:04 +---------------------------------------------------------------------------------+15:20:04 | Normal X:0.02 Y:-0.01 Z:-1.00 |15:20:04 | Distance -0.82 |15:20:04 +---------------------------------------------------------------------------------+
altough when I calculate the corners for the frustum I get the 8 corners of the near and far plane and when I draw them they are located around the lightsource except that the near and far plane is the "same" plane the quads that visualize the near and far plane are different sizes but it looks like they are the same plane.
EDIT 4: I have fixed the "EDIT 3" problem so now the planes are different as they should be. And I have found out that if I use an Identity matrix as Modelview matrix the frustum planes works as they should.
EDIT 5: Now I have fixed the modelview matrix, and I got nice frustums But they are at the wrong positions not where the light actually are and some of them has the wrong direction too.
[Edited by - McZ on January 31, 2006 12:27:20 PM]