Esempio n. 1
0
        public GlFuncResult <T> GlCall <T>(Func <T> func, bool recursive = false)
            where T : IGlEvent
        {
            var glFunc = new GlFunc <T>(func, this, false, recursive);

            return(_glExecute(glFunc));
        }
Esempio n. 2
0
 protected internal void GlEnqueue(GlFunc <IGlEvent> glAction)
 {
     if (!_glActionsBufferSignal.IsSet)
     {
         _glFuncsBuffer.Enqueue(glAction);
     }
 }
Esempio n. 3
0
        public GlFuncResult <T> GlCallSync <T>(Func <T> func, bool recursive = false)
            where T : IGlEvent
        {
            var glFunc = new GlFunc <T>(func, this, true, recursive);

            if (Thread.CurrentThread.Name == GlMasterRenderHandler.GlContextThreadName)
            {
                return(_glExecuteSync(glFunc));
            }
            else
            {
                return(_glExecute(glFunc));
            }
        }
Esempio n. 4
0
 protected internal static GlFuncResult <T> _glExecuteSync <T>(GlFunc <T> glFunc)
     where T : IGlEvent
 {
     glFunc._result._value = glFunc.Function();
     return(glFunc.Result);
 }
Esempio n. 5
0
 protected internal static GlFuncResult <T> _glExecute <T>(GlFunc <T> glFunc)
     where T : IGlEvent
 {
     glFunc.Queue();
     return(glFunc.Result);
 }