Example #1
0
        public static Int64 GetInteger64(ArbSync pname)
        {
            Int64 value;

            GL.GetInteger64(pname, out value);
            return(value);
        }
Example #2
0
        public override ClientWaitResult ClientWait(int timeoutInNanoseconds)
        {
            if ((timeoutInNanoseconds < 0) && (timeoutInNanoseconds != (int)ArbSync.TimeoutIgnored))
            {
                throw new ArgumentOutOfRangeException("timeoutInNanoseconds");
            }

            ArbSync result = GL.ClientWaitSync(_name.Value, 0, timeoutInNanoseconds);

            switch (result)
            {
            case ArbSync.AlreadySignaled:
                return(ClientWaitResult.AlreadySignaled);

            case ArbSync.ConditionSatisfied:
                return(ClientWaitResult.Signaled);

            case ArbSync.TimeoutExpired:
                return(ClientWaitResult.TimeoutExpired);
            }

            return(ClientWaitResult.TimeoutExpired);     // ArbSync.WaitFailed
        }
Example #3
0
		public static IntPtr FenceSync(IntPtr condition, ArbSync flags)
		{
			glFenceSync deleg = BaseGraphicsContext.Current.Loader.Get<glFenceSync>();
			if (deleg != null)
				return deleg(condition, flags);
			return default(IntPtr);
		}
Example #4
0
		public static unsafe void GetSynciv(IntPtr sync, ArbSync pname, int bufSize, int* length, int[] values)
		{
			glGetSynciv deleg = BaseGraphicsContext.Current.Loader.Get<glGetSynciv>();
			if (deleg != null)
				deleg(sync, pname, bufSize, length, values);
		}