/// <summary> /// Loads all the available bindings for the current context. /// </summary> /// <param name="context">The context used to query the available bindings.</param> /// <remarks> /// Loads all available entry points for the current OpenGL context. /// </remarks> public static void LoadBindings(IBindingsContext context) { Debug.Print("Loading entry points for {0}", typeof(Wgl).FullName); if (context == null) { throw new ArgumentNullException(nameof(context)); } for (int i = 0; i < EntryPoints.Length; i++) { EntryPoints[i] = context.GetProcAddress(EntryPointNames[i]); } }
public NativeBindingsContext() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _context = new WglBindingsContext(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { _context = new GlxBindingsContext(); } else { throw new PlatformNotSupportedException(); } }
private void InitGLContext() { // Initialize the OpenTK 3 GL context with GLFW. _graphicsContext = new GLFWBindingsContext(); GL.LoadBindings(_graphicsContext); }
public OpenToolkitBindingsContext(IBindingsContext bindingsContext) { _bindingContext = bindingsContext; }
public void LoadBindings(IBindingsContext context) { _rendererImplementation.LoadBindings(context); }
public void LoadBindings(IBindingsContext context) { GL.LoadBindings(context); GL.Enable(EnableCap.DepthTest); //GL.Enable(EnableCap.CullFace); }
public GLContextBase(Clyde clyde) { Clyde = clyde; BindingsContext = new BindingsContextImpl(this); }
private void InitGLContext() { _graphicsContext = new GLFWBindingsContext(); GL.LoadBindings(_graphicsContext); }