/* CONSTRUCTORS */
        public MasterRenderer()
        {
            //we should not bother rendering triangles whose normal vectors are pointing away from the camera. we will "cull" those faces here.
            GL.Enable(EnableCap.CullFace);
            GL.CullFace(CullFaceMode.Back);

            //initialize shader and projection matrix:
            projectionMatrix = CreateProjectionMatrix();

            //initialize function stuff:
            this.graphingShader   = new GraphingShader();
            this.functionRenderer = new FunctionRenderer(graphingShader, projectionMatrix);
            functions             = new List <Function>();

            //initialize node stuff:
            this.nodeRenderer = new NodeRenderer(graphingShader, projectionMatrix);
            nodesToRender     = new List <Node>();

            //initialize fractal stuff:
            this.mandelbrotShader       = new MandelbrotShader();
            this.mandelbrotShaderDouble = new MandelbrotShaderDouble();
            this.mandelbrotRenderer     = new MandelbrotRenderer(mandelbrotShader, mandelbrotShaderDouble);
            this.fractals       = new List <Fractal>();
            this.fractalDoubles = new List <FractalDouble>();

            //initialize data stuff:
            this.data = new List <Data>();
        }
Exemple #2
0
 /* CONSTRUCTORS */
 public MandelbrotRenderer(MandelbrotShader mandelbrotShader, MandelbrotShaderDouble mandelbrotShaderDouble)
 {
     //initialization.
     this.mandelbrotShader       = mandelbrotShader;
     this.mandelbrotShaderDouble = mandelbrotShaderDouble;
 }