private void RenderBoundingBox(BoundingBox boundingBox) { GL.Enable(EnableCap.PolygonOffsetLine); GL.PolygonOffset(15.0f, 100.0f); GL.MatrixMode(MatrixMode.Modelview); GL.LoadMatrix(cam.ViewMatrix.GetInvertedValues()); GL.MatrixMode(MatrixMode.Projection); GL.LoadMatrix(cam.ProjectionMatrix.GetInvertedValues()); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line); GL.LineWidth(1.5f); GL.Begin(PrimitiveType.Triangles); GL.Color3(1.0f, 0.0f, 0.0f); RenderUtil.RenderBoundingBox(boundingBox); GL.End(); GL.Disable(EnableCap.PolygonOffsetLine); }