예제 #1
0
        void Initialize()
        {
            mGLWindow = new GLWindow();
            mGLWindow.SetEglConfig(true, true, 0, GLWindow.GLESVersion.Version_2_0);

            mGLWindow.RegisterGlCallback(intializeGL, renderFrameGL, terminateGL);

            //int width, height;
            Information.TryGetValue("http://tizen.org/feature/screen.width", out int width);
            Information.TryGetValue("http://tizen.org/feature/screen.height", out int height);

            updateWindowSize(width, height);
            mGLWindow.Resized    += OnResizedEvent;
            mGLWindow.KeyEvent   += OnKeyEvent;
            mGLWindow.TouchEvent += OnTouchEvent;

            mGLWindow.Show();

            // Add GLWindow Avaialble Orientations
            List <GLWindow.GLWindowOrientation> orientations = new List <GLWindow.GLWindowOrientation>();

            orientations.Add(GLWindow.GLWindowOrientation.Portrait);
            orientations.Add(GLWindow.GLWindowOrientation.Landscape);
            orientations.Add(GLWindow.GLWindowOrientation.PortraitInverse);
            orientations.Add(GLWindow.GLWindowOrientation.LandscapeInverse);
            mGLWindow.SetAvailableOrientations(orientations);
        }
예제 #2
0
        public void GLWindowShow()
        {
            tlog.Debug(tag, $"GLWindowShow START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.Show();
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowShow END (OK)");
        }