コード例 #1
0
 public void SwapBuffers()
 {
     if (!egl.EglSwapBuffers(EGLDisplay, EGLSurface))
     {
         var error = egl.EglGetError();
         if (error == 0x300e)
         {
             throw new InvalidOperationException(string.Format("EglSwapBuffers {0:x}", error));
         }
     }
 }
コード例 #2
0
        public bool Swap()
        {
            bool ret = egl.EglSwapBuffers(window.Display, window.Surface);

            if (!ret)
            {
                int err = egl.EglGetError();
                switch (err)
                {
                case EGL11.EglContextLost:
                    throw EglContextLostException.GenerateException("EglSwapBuffers", egl, err);

                case EGL11.EglBadAlloc:
                    throw EglBadAllocException.GenerateException("EglSwapBuffers", egl, err);

                default:
                    throw EglException.GenerateException("EglSwapBuffers", egl, err);
                }
            }
            return(ret);
        }