Beispiel #1
0
        public Bitmap LoadBitmap(string filename)
        {
            Bitmap bitmap = new Bitmap(string.Format(@"Resources\Textures\{0}.png", filename));

            if (bitmap.Height > 0 == false)
            {
                CogiLogger.Error("not found file" + filename);
                return(null);
            }
            loadedBitmap.Add(bitmap);
            return(bitmap);
        }
Beispiel #2
0
        static void Main()
        {
            CogiLogger.Debug("=========ENGINE START=======");
            string envDebug = Environment.GetEnvironmentVariable("DEBUG");

            if (envDebug == "GL")
            {
                KhronosApi.Log += delegate(object sender, KhronosLogEventArgs e)
                {
                    CogiLogger.Debug(string.Format("[KhronosApi] {0}", e.ToString()));
                };
                KhronosApi.LogEnabled = true;
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }