mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Load only gl 3.3 functions
This commit makes 'gl::load_with' only load symbols from the minimal OpenGL (3.3) version alacritty aims to support. Doing so reduces the size of gl_bindings.rs from 21K LoC to 11K LoC, and also the actual loading by up to ~2x, thugh the loading is usually sub millisecond anyway.
This commit is contained in:
parent
9531e661b1
commit
198d3cb78d
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
use std::collections::HashSet;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
@ -11,7 +12,7 @@ fn main() {
|
||||||
let dest = env::var("OUT_DIR").unwrap();
|
let dest = env::var("OUT_DIR").unwrap();
|
||||||
let mut file = File::create(&Path::new(&dest).join("gl_bindings.rs")).unwrap();
|
let mut file = File::create(&Path::new(&dest).join("gl_bindings.rs")).unwrap();
|
||||||
|
|
||||||
Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, ["GL_ARB_blend_func_extended"])
|
Registry::new(Api::Gl, (3, 3), Profile::Core, Fallbacks::All, ["GL_ARB_blend_func_extended"])
|
||||||
.write_bindings(GlobalGenerator, &mut file)
|
.write_bindings(GlobalGenerator, &mut file)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue