/* 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>(); }
/* CONSTRUCTORS */ public NodeRenderer(GraphingShader shader, Matrix4 projectionMatrix) { //initialization. this.nodeShader = shader; //initialize the shader using the projectionMatrix. shader.Start(); shader.LoadProjectionMatrix(projectionMatrix); shader.Stop(); }
/* CONSTRUCTORS */ public FunctionRenderer(GraphingShader graphingShader, Matrix4 projectionMatrix) { //initialization. this.graphingShader = graphingShader; //initialize the shader using the projectionMatrix. this.graphingShader.Start(); this.graphingShader.LoadProjectionMatrix(projectionMatrix); this.graphingShader.Stop(); }