glfw: default to GLES v3 instead of v2.

GLES v3 has >70% device support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-10-16 16:53:15 -07:00 committed by Stephen Gutekanst
parent 47f2324400
commit 4c103a344e

View file

@ -29,7 +29,7 @@ pub const Options = struct {
/// Deprecated on macOS. /// Deprecated on macOS.
opengl: bool = false, opengl: bool = false,
/// Not supported on macOS. /// Not supported on macOS. GLES v3.2 only, currently.
gles: bool = false, gles: bool = false,
/// Only respected on Linux. /// Only respected on Linux.
@ -187,8 +187,7 @@ fn linkGLFW(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void
step.linkSystemLibrary("opengl32"); step.linkSystemLibrary("opengl32");
} }
if (options.gles) { if (options.gles) {
// TODO(slimsag): does anyone want GLESv1/GLESv3 options? step.linkSystemLibrary("GLESv3");
step.linkSystemLibrary("GLESv2");
} }
}, },
.macos => { .macos => {