public static void LoadEntryPoints()
		{
			LoadPlatformEntryPoints ();
			Enable = (EnableDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glEnable"), typeof(EnableDelegate));
			ClearColor = (ClearColorDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glClearColor"), typeof(ClearColorDelegate));
			Clear = (ClearDelegate)Marshal.GetDelegateForFunctionPointer (EntryPointHelper.GetAddress ("glClear"), typeof(ClearDelegate));
		}
示例#2
0
文件: FormLog.cs 项目: J6628426/Logo
        public FormLog()
        {
            InitializeComponent();

            _clear = new ClearDelegate(Clear);
            _print = new PrintDelegate(Print);
        }
示例#3
0
        internal static void LoadEntryPoints()
        {
            if (Viewport == null)
            {
                Viewport = LoadFunction <ViewportDelegate>("glViewport");
            }
            if (Scissor == null)
            {
                Scissor = LoadFunction <ScissorDelegate>("glScissor");
            }
            //if (MakeCurrent == null)
            //	MakeCurrent = LoadFunction<MakeCurrentDelegate>("glMakeCurrent");

            GetError = LoadFunction <GetErrorDelegate>("glGetError");

            EnableVertexAttribArray  = LoadFunction <EnableVertexAttribArrayDelegate>("glEnableVertexAttribArray");
            DisableVertexAttribArray = LoadFunction <DisableVertexAttribArrayDelegate>("glDisableVertexAttribArray");

            _getStringInternal = LoadFunction <GetStringDelegate>("glGetString");

            ClearDepth = LoadFunction <ClearDepthDelegate>("glClearDepth")
                         ?? LoadFunction <ClearDepthDelegate>("glClearDepthf");

            Clear        = LoadFunction <ClearDelegate>("glClear");
            ClearColor   = LoadFunction <ClearColorDelegate>("glClearColor");
            ClearStencil = LoadFunction <ClearStencilDelegate>("glClearStencil");

            Enable  = LoadFunction <EnableDelegate>("glEnable");
            Disable = LoadFunction <DisableDelegate>("glDisable");

            BindBuffer = LoadFunction <BindBufferDelegate>("glBindBuffer");
            //DrawBuffers = LoadFunction<DrawBuffersDelegate>("glDrawBuffers");
            //DrawElements = LoadFunction<DrawElementsDelegate>("glDrawElements");
            DrawArrays = LoadFunction <DrawArraysDelegate>("glDrawArrays");
            //Uniform1i = LoadFunction<Uniform1iDelegate>("glUniform1i");
            //Uniform4fv = LoadFunction<Uniform4fvDelegate>("glUniform4fv");
            //ReadPixelsInternal = LoadFunction<ReadPixelsDelegate>("glReadPixels");

            CreateShader         = LoadFunction <CreateShaderDelegate>("glCreateShader");
            ShaderSourceInternal = LoadFunction <ShaderSourceDelegate>("glShaderSource");
            CompileShader        = LoadFunction <CompileShaderDelegate>("glCompileShader");

            ColorMask = LoadFunction <ColorMaskDelegate>("glColorMask");
            //TODO: DepthFunc = LoadFunction<DepthFuncDelegate>("glDepthFunc");
            DepthMask = LoadFunction <DepthMaskDelegate>("glDepthMask");

            StencilMask = LoadFunction <StencilMaskDelegate>("glStencilMask");

            GenBuffers = LoadFunction <GenBuffersDelegate>("glGenBuffers");
            BufferData = LoadFunction <BufferDataDelegate>("glBufferData");
            //MapBuffer = LoadFunction<MapBufferDelegate>("glMapBuffer");
            //UnmapBuffer = LoadFunction<UnmapBufferDelegate>("glUnmapBuffer");
            BufferSubData = LoadFunction <BufferSubDataDelegate>("glBufferSubData");
            //DeleteBuffers = LoadFunction<DeleteBuffersDelegate>("glDeleteBuffers");

            VertexAttribPointer = LoadFunction <VertexAttribPointerDelegate>("glVertexAttribPointer");
        }
示例#4
0
        public TypeSchema Initialize(KnownSerializers serializers, TypeSchema targetSchema)
        {
            var runtimeSchema = TypeSchema.FromType(typeof(T), serializers.RuntimeVersion, this.GetType(), Version);
            var members       = runtimeSchema.GetCompatibleMemberSet(targetSchema);

            this.deserializeImpl = Generator.GenerateDeserializeMethod <T>(il => Generator.EmitDeserializeFields(typeof(T), serializers, il, members));
            this.serializeImpl   = Generator.GenerateSerializeMethod <T>(il => Generator.EmitSerializeFields(typeof(T), serializers, il, members));
            this.cloneImpl       = Generator.GenerateCloneMethod <T>(il => Generator.EmitCloneFields(typeof(T), serializers, il));
            this.clearImpl       = Generator.GenerateClearMethod <T>(il => Generator.EmitClearFields(typeof(T), serializers, il));

            return(targetSchema ?? runtimeSchema);
        }
示例#5
0
 public void Clear()
 {
     if (cDetails.InvokeRequired)
     {
         ClearDelegate d = new ClearDelegate(Clear);
         this.Invoke(d);
     }
     else
     {
         cDetails.Text = String.Empty;
     }
 }
示例#6
0
        public FormDisplay()
        {
            InitializeComponent();

            base.FormClosing += new FormClosingEventHandler(ViewClosing);
            base.Load += new EventHandler(FormLoad);
            textInput.KeyDown += new KeyEventHandler(InputKeyDown);

            _clear = new ClearDelegate(Clear);
            _draw = new DrawDelegate(Draw);
            _print = new PrintDelegate(Print);
        }
示例#7
0
 public void Clear()
 {
     try
     {
         if (this.txtConsoleOutput.InvokeRequired)
         {
             // It's on a different thread, so use Invoke.
             ClearDelegate d = new ClearDelegate(Clear);
             this.Invoke(d);
         }
         else
         {
             txtConsoleOutput.Text = string.Empty;
         }
     }
     catch { }
 }
示例#8
0
        public StructArray(int length, ClearDelegate clearAction, MoveDelegate moveAction)
        {
            ClearAction = clearAction;
            MoveAction  = moveAction;

            Length       = length;
            Values       = new T[length];
            IdsToIndices = new int[length];
            IndicesToIds = new int[length];

            for (int i = 0; i < Length; i++)
            {
                Values[i]       = new T();
                IdsToIndices[i] = i;
                IndicesToIds[i] = i;
            }
        }
示例#9
0
 public void Clear()
 {
     if (cDetails.InvokeRequired)
     {
         ClearDelegate d = new ClearDelegate(Clear);
         this.Invoke(d);
     }
     else
     {
         cDetails.Text = String.Empty;
     }
 }
示例#10
0
 public void SetClearCallback(ClearDelegate callback)
 {
     clearCallback = callback;
 }