예제 #1
0
파일: Program.cs 프로젝트: bennywwg/csgeom
        public static void Cleanup()
        {
            consolas.destroy();

            colorShader.destroy();

            shadeless.destroy();

            Vao.Destroy();
        }
예제 #2
0
파일: Program.cs 프로젝트: bennywwg/csgeom
        public static void Initialize()
        {
            try {
                win = new Window(750, 750, "Circles");
                Console.WriteLine("Window initialized with OpenGL version 3.3");
            } catch {
                Console.WriteLine("Window failed to initialize");
            }

            Vao.Initialize();

            try {
                consolas = Texture.color("../../resources/consolas1.bmp");
                Console.WriteLine("Consolas font loaded from consolas1.bmp");
            } catch {
                Console.WriteLine("Consolas font failed to load");
            }

            try {
                colorShader = new Shader("../../resources/shaders/color/s.vert", "../../resources/shaders/color/s.frag");
                Console.WriteLine("Shader 'color' loaded");
            } catch {
                Console.WriteLine("Shader 'color' failed to load");
            }

            try {
                shadeless = new Shader("../../resources/shaders/shadeless/s.vert", "../../resources/shaders/shadeless/s.frag");
                Console.WriteLine("Shader 'shadeless' loaded");
            } catch {
                Console.WriteLine("Shader 'shadeless' failed to load");
            }

            try {
                textShader = new Shader("../../resources/shaders/text/s.vert", "../../resources/shaders/text/s.frag");



                Console.WriteLine("Shader 'text' loaded");
            } catch {
                Console.WriteLine("Shader 'text' failed to load");
            }

            g = new RenderPass()
            {
                depthEnabled = true
            };

            ui = new RenderPass()
            {
                depthEnabled = false
            };
        }