I have problems implementing frustum culling in my Quake 3 BSP map viewer.
Faces near the left and right edges sometimes are incorrectly getting culled by the frustum culling code. If i turn off the frustum culling the map is rendered correctly (although slower).http://pastebin.com/m5fce5afa
- Frustum. Setups the frustum planes and tests where a leaf is inside frustumhttp://pastebin.com/m2cf93fae
- BSPPlane. Used to test if a point is behind, in front or on planehttp://pastebin.com/m5f99adbe
- BSPMap. Calls the frustum culling code to elimate leafshttp://pastebin.com/m2402a3a3
- BSPViewer. Handles the rendering of the maphttp://pastebin.com/m2402a3a3
- BSPFileReader. Handles reading the quake 3 BSP file. Converts from quake 3 coords to opengl coords. Coords are also scaled down in this code.