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); }
public void GLWindowSetEglConfig() { tlog.Debug(tag, $"GLWindowSetEglConfig START"); string name = "myGLWindow"; Rectangle rectangle = new Rectangle(20, 20, 100, 100); GLWindow a1 = new GLWindow(name, rectangle, true); GLWindow.GLESVersion b1 = new GLWindow.GLESVersion(); a1.SetEglConfig(true, true, 10, b1); a1.Destroy(); tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)"); Assert.Pass("GLWindowSetEglConfig"); }
public void GLWindowSetEglConfig() { tlog.Debug(tag, $"GLWindowSetEglConfig START"); var testingTarget = new GLWindow(); Assert.IsNotNull(testingTarget, "Can't create success object GLWindow"); Assert.IsInstanceOf <GLWindow>(testingTarget, "Should be an instance of GLWindow type."); try { testingTarget.SetEglConfig(true, true, 10, GLESVersion.Version20); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception: Failed!"); } testingTarget.Destroy(); tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)"); }