Exemplo 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));
        }
Exemplo n.º 2
0
 protected internal void GlEnqueue(GlFunc <IGlEvent> glAction)
 {
     if (!_glActionsBufferSignal.IsSet)
     {
         _glFuncsBuffer.Enqueue(glAction);
     }
 }
Exemplo 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));
            }
        }
Exemplo n.º 4
0
 protected internal static GlFuncResult <T> _glExecuteSync <T>(GlFunc <T> glFunc)
     where T : IGlEvent
 {
     glFunc._result._value = glFunc.Function();
     return(glFunc.Result);
 }
Exemplo n.º 5
0
 protected internal static GlFuncResult <T> _glExecute <T>(GlFunc <T> glFunc)
     where T : IGlEvent
 {
     glFunc.Queue();
     return(glFunc.Result);
 }