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 GLWindowSetAvailableOrientations() { tlog.Debug(tag, $"GLWindowSetAvailableOrientations START"); string name = "myGLWindow"; Rectangle rectangle = new Rectangle(20, 20, 100, 100); GLWindow a1 = new GLWindow(name, rectangle, true); GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation(); List <GLWindow.GLWindowOrientation> l1 = new List <GLWindow.GLWindowOrientation> { o1 }; a1.SetAvailableOrientations(l1); a1.Destroy(); tlog.Debug(tag, $"GLWindowSetAvailableOrientations END (OK)"); }
public void GLWindowSetAvailableOrientationsNullValue() { tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue START"); string name = "myGLWindow"; Rectangle rectangle = new Rectangle(20, 20, 100, 100); var testingTarget = new GLWindow(name, rectangle, true); try { List <GLWindow.GLWindowOrientation> list = null; testingTarget.SetAvailableOrientations(list); } catch (ArgumentNullException) { testingTarget.Destroy(); tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } }