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);
        }
Exemple #2
0
        public void GLWindowRegisterGlCallback()
        {
            tlog.Debug(tag, $"GLWindowRegisterGlCallback START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.RegisterGlCallback(GLInit, GLRenderFrame, GLTerminate);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
        }
Exemple #3
0
        public void GLWindowRegisterGlCallback()
        {
            tlog.Debug(tag, $"GLWindowRegisterGlCallback START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);


            a1.RegisterGlCallback(b1, c1, d1);
            tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
            Assert.Pass("GLWindowRegisterGlCallback");
        }