diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-11-14 21:48:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 21:48:24 +0300 |
commit | 198d3cb78d9f9432e1d829f44aec46ec7971c24d (patch) | |
tree | 1c4e790da7e7b6be1bb5922dab21e417012fa49b | |
parent | 9531e661b1cf777fc24d011e6116a501bd1b75e5 (diff) | |
download | alacritty-198d3cb78d9f9432e1d829f44aec46ec7971c24d.tar.gz alacritty-198d3cb78d9f9432e1d829f44aec46ec7971c24d.zip |
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.
-rw-r--r-- | alacritty/build.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alacritty/build.rs b/alacritty/build.rs index 3c0ec110..0d4a0560 100644 --- a/alacritty/build.rs +++ b/alacritty/build.rs @@ -1,3 +1,4 @@ +use std::collections::HashSet; use std::env; use std::fs::File; use std::path::Path; @@ -11,7 +12,7 @@ fn main() { let dest = env::var("OUT_DIR").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) .unwrap(); |