Skip to content

Commit

Permalink
Merge pull request #79 from luchak/add-option-use-gles3
Browse files Browse the repository at this point in the history
Add use_gles3 option
  • Loading branch information
floooh authored Sep 2, 2024
2 parents 87de26b + c7540e0 commit 939ea7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ pub const SokolBackend = enum {

pub fn build(b: *Build) !void {
const opt_use_gl = b.option(bool, "gl", "Force OpenGL (default: false)") orelse false;
const opt_use_gles3 = b.option(bool, "gles3", "Force OpenGL ES3 (default: false)") orelse false;
const opt_use_wgpu = b.option(bool, "wgpu", "Force WebGPU (default: false, web only)") orelse false;
const opt_use_x11 = b.option(bool, "x11", "Force X11 (default: true, Linux only)") orelse true;
const opt_use_wayland = b.option(bool, "wayland", "Force Wayland (default: false, Linux only, not supported in main-line headers)") orelse false;
const opt_use_egl = b.option(bool, "egl", "Force EGL (default: false, Linux only)") orelse false;
const opt_with_sokol_imgui = b.option(bool, "with_sokol_imgui", "Add support for sokol_imgui.h bindings") orelse false;
const sokol_backend: SokolBackend = if (opt_use_gl) .gl else if (opt_use_wgpu) .wgpu else .auto;
const sokol_backend: SokolBackend = if (opt_use_gl) .gl else if (opt_use_gles3) .gles3 else if (opt_use_wgpu) .wgpu else .auto;

const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
Expand Down

0 comments on commit 939ea7a

Please sign in to comment.