public override void AddShaders()
        {
            shaders = new Dictionary<string, ShaderProgram>();
            ShaderProgram simpleShader = new ShaderProgram();
            simpleShader.atachShaders("VertexShaders\\imageVS.glsl", "FragmentShaders\\imageFS.glsl");
            shaders.Add(triangleShader, simpleShader);

            ShaderProgram lines = new ShaderProgram();
            lines.atachShaders("VertexShaders\\linesVS.glsl", "FragmentShaders\\simpleFS.glsl");
            shaders.Add(lineShader, lines);

        }
        public virtual void AddShaders()
        {
            trianglesList = new List<Vector3[]>();
            shaders = new Dictionary<string, ShaderProgram>();
            ShaderProgram simpleShader = new ShaderProgram();
            simpleShader.atachShaders("VertexShaders\\simpleVS.glsl", "FragmentShaders\\simpleFS.glsl");
            shaders.Add(triangleShader, simpleShader);

            ShaderProgram lines = new ShaderProgram();
            lines.atachShaders("VertexShaders\\linesVS.glsl", "FragmentShaders\\simpleFS.glsl");
            shaders.Add(lineShader, lines);
        }
Esempio n. 3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            shaderProgram = new ShaderProgram();
            shaderProgram.atachShaders("VertexShaders\\simpleVS.glsl", "FragmentShaders\\simpleFS.glsl");
            
            myViewData = new Matrix4[]{Matrix4.Identity};

            Title = "UrbanPhaseSpace";

            world = new SimpleWorld();
            world.Init();
            world.AddShip("Player");
            world.AddShip("Leming");

            buletMesh = new Bullet(8);
            buletMesh.setTrianglesColor(new Vector3(1, 1, 1));
            buletMesh.setLinesColor(new Vector3(0, 0, 0));
            buletMesh.BuildObject();

            mesh = new Ship();
            
            mesh.setTrianglesColor(new Vector3(1, 1, 1));
            mesh.setLinesColor(new Vector3(0, 0, 0));
            mesh.BuildObject();

            shieldMesh = new Shield(32);

            shieldMesh.setTrianglesColor(new Vector3(0, 0, 1));
            shieldMesh.setLinesColor(new Vector3(1, 0, 0));
            shieldMesh.BuildObject();

            imgPanel = new MapPanel(1,1);
            imgPanel.PlayerCord.X = 52.2290478;
            imgPanel.PlayerCord.Y = 21.0298659;
            imgPanel.RefreshMap();
            imgPanel.BuildObject();
            imgPanel.setLinesColor(new Vector3(0, 0, 0));

            GL.ClearColor(Color.CornflowerBlue);

            current = DateTime.Now;
            last = DateTime.Now;
        }