├── .gitignore ├── .gitmodules ├── .vscode ├── launch.json └── tasks.json ├── README.md ├── build.zig ├── data ├── color.frag └── transform.vert ├── src ├── main.zig └── zig-mark.zig └── zig-mark.gif /.gitignore: -------------------------------------------------------------------------------- 1 | zig-cache 2 | zig-out -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/sdl2"] 2 | path = deps/sdl2 3 | url = https://github.com/MasterQ32/SDL.zig 4 | [submodule "deps/zlm"] 5 | path = deps/zlm 6 | url = https://github.com/ziglibs/zlm 7 | [submodule "deps/zgl"] 8 | path = deps/zgl 9 | url = https://github.com/ziglibs/zgl 10 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "(lldb) Launch", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/zig-out/bin/hello-3d", 12 | "args": [], 13 | "stopAtEntry": false, 14 | "cwd": "${fileDirname}", 15 | "environment": [], 16 | "externalConsole": false, 17 | "MIMode": "lldb", 18 | "preLaunchTask": "build" 19 | }, 20 | { 21 | "name": "(Windows) Launch", 22 | "type": "cppvsdbg", 23 | "request": "launch", 24 | "program": "${workspaceFolder}/zig-out/bin/hello-3d.exe", 25 | "args": [], 26 | "stopAtEntry": false, 27 | "cwd": "${workspaceFolder}", 28 | "environment": [], 29 | "preLaunchTask": "build" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "build", 8 | "type": "shell", 9 | "command": "zig build" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hello 3D in Zig 2 | 3 | ![Preview](/zig-mark.gif?raw=true "Preview") 4 | 5 | ## Install dependencies 6 | 7 | Install [Zig](https://ziglang.org/download/) master 8 | 9 | ### Windows 10 | 11 | Requires [vcpkg package manager](https://github.com/microsoft/vcpkg) 12 | 13 | ```cmd 14 | > vcpkg install sdl2:x64-windows libepoxy:x64-windows 15 | ``` 16 | 17 | ### macOS 18 | 19 | Requires [Homebrew](https://brew.sh/) 20 | 21 | ```bash 22 | $ brew install sdl2 libepoxy 23 | ``` 24 | 25 | ### Ubuntu Linux 26 | 27 | ```bash 28 | $ sudo apt install libsdl2-dev libepoxy-dev 29 | ``` 30 | 31 | ## Get the source 32 | 33 | ```bash 34 | $ git clone --recursive https://github.com/fabioarnold/hello-3d 35 | ``` 36 | 37 | ## Build and run 38 | 39 | ```bash 40 | $ cd hello-3d 41 | $ zig build run 42 | ``` -------------------------------------------------------------------------------- /build.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | const Sdk = @import("deps/sdl2/Sdk.zig"); // Import the Sdk at build time 3 | 4 | pub fn build(b: *std.build.Builder) !void { 5 | const target = b.standardTargetOptions(.{}); 6 | const mode = b.standardReleaseOptions(); 7 | 8 | const exe = b.addExecutable("hello-3d", "src/main.zig"); 9 | exe.setTarget(target); 10 | exe.setBuildMode(mode); 11 | if (exe.target.isWindows()) { 12 | exe.addVcpkgPaths(.dynamic) catch @panic("vcpkg not installed"); 13 | if (exe.vcpkg_bin_path) |bin_path| { 14 | for (&[_][]const u8{ "SDL2.dll", "epoxy-0.dll" }) |dll| 15 | b.installBinFile(try std.fs.path.join(b.allocator, &.{ bin_path, dll }), dll); 16 | } 17 | exe.subsystem = .Windows; 18 | } 19 | exe.addPackagePath("zgl", "deps/zgl/zgl.zig"); 20 | exe.addPackagePath("zlm", "deps/zlm/zlm.zig"); 21 | const sdk = Sdk.init(b); 22 | exe.addPackage(sdk.getWrapperPackage("sdl2")); 23 | sdk.link(exe, .dynamic); // link SDL2 as a shared library 24 | exe.linkSystemLibrary("epoxy"); 25 | if (exe.target.isDarwin()) { 26 | exe.linkFramework("OpenGL"); 27 | } else if (exe.target.isWindows()) { 28 | exe.linkSystemLibrary("opengl32"); 29 | } else { 30 | exe.linkSystemLibrary("gl"); 31 | } 32 | exe.linkLibC(); 33 | exe.install(); 34 | 35 | const run_cmd = exe.run(); 36 | run_cmd.step.dependOn(b.getInstallStep()); 37 | const run_step = b.step("run", "Run hello-3d"); 38 | run_step.dependOn(&run_cmd.step); 39 | } 40 | -------------------------------------------------------------------------------- /data/color.frag: -------------------------------------------------------------------------------- 1 | uniform vec4 color; 2 | 3 | void main() { 4 | gl_FragColor = color; 5 | } -------------------------------------------------------------------------------- /data/transform.vert: -------------------------------------------------------------------------------- 1 | uniform mat4 mvp; 2 | attribute vec3 position; 3 | 4 | void main() { 5 | gl_Position = mvp * vec4(position, 1); 6 | } -------------------------------------------------------------------------------- /src/main.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | const sdl = @import("sdl2"); 3 | const gl = @import("zgl"); 4 | const zlm = @import("zlm"); 5 | const m = zlm.SpecializeOn(f32); 6 | 7 | pub fn main() !void { 8 | try sdl.init(.{ .video = true, .events = true }); 9 | defer sdl.quit(); 10 | 11 | try sdl.gl.setAttribute(.{ .depth_size = 24 }); 12 | try sdl.gl.setAttribute(.{ .multisamplebuffers = true }); 13 | try sdl.gl.setAttribute(.{ .multisamplesamples = 4 }); 14 | const window = try sdl.createWindow("hello-3d", .{ .centered = {} }, .{ .centered = {} }, 640, 400, .{ .opengl = true, .allow_high_dpi = true }); 15 | defer window.destroy(); 16 | 17 | const ctx = try sdl.gl.createContext(window); 18 | defer sdl.gl.deleteContext(ctx); 19 | 20 | try sdl.gl.setSwapInterval(.vsync); 21 | gl.enable(.depth_test); 22 | 23 | var mvp_loc: u32 = undefined; 24 | var color_loc: u32 = undefined; 25 | const program = gl.Program.create(); 26 | { 27 | const vs = gl.Shader.create(.vertex); 28 | defer vs.delete(); 29 | vs.source(1, &.{@embedFile("../data/transform.vert")}); 30 | vs.compile(); 31 | const fs = gl.Shader.create(.fragment); 32 | defer fs.delete(); 33 | fs.source(1, &.{@embedFile("../data/color.frag")}); 34 | fs.compile(); 35 | program.attach(vs); 36 | defer program.detach(vs); 37 | program.attach(fs); 38 | defer program.detach(fs); 39 | program.link(); 40 | mvp_loc = program.uniformLocation("mvp").?; 41 | color_loc = program.uniformLocation("color").?; 42 | } 43 | program.use(); 44 | 45 | const buf = gl.Buffer.gen(); 46 | buf.bind(.array_buffer); 47 | gl.bufferData(.array_buffer, f32, &@import("zig-mark.zig").positions, .static_draw); // buf.data requires gl 4.5 48 | defer buf.delete(); 49 | 50 | const proj = m.Mat4.createPerspective(zlm.toRadians(45.0), 1.6, 0.1, 10.0); 51 | const trans = m.Mat4.createTranslationXYZ(0, 0, 4); 52 | 53 | var frame: u64 = 0; 54 | mainLoop: while (true) { 55 | while (sdl.pollEvent()) |ev| { 56 | switch (ev) { 57 | .quit => break :mainLoop, 58 | else => {}, 59 | } 60 | } 61 | 62 | gl.clearColor(0.5, 0.5, 0.5, 1); 63 | gl.clear(.{ .color = true, .depth = true }); 64 | 65 | const rot = m.Mat4.createAngleAxis(m.Vec3.unitY, 0.04 * @intToFloat(f32, frame)); 66 | const mvp = rot.mul(trans.mul(proj)); 67 | 68 | gl.enableVertexAttribArray(0); 69 | gl.vertexAttribPointer(0, 3, .float, false, 0, 0); 70 | gl.uniformMatrix4fv(mvp_loc, false, &.{mvp.fields}); 71 | gl.uniform4f(color_loc, 0.97, 0.64, 0.11, 1); 72 | gl.drawArrays(.triangles, 0, 120); 73 | gl.uniform4f(color_loc, 0.98, 0.82, 0.6, 1); 74 | gl.drawArrays(.triangles, 120, 66); 75 | gl.uniform4f(color_loc, 0.6, 0.35, 0.02, 1); 76 | gl.drawArrays(.triangles, 186, 90); 77 | gl.disableVertexAttribArray(0); 78 | 79 | sdl.gl.swapWindow(window); 80 | frame += 1; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/zig-mark.zig: -------------------------------------------------------------------------------- 1 | pub const positions = [_]f32{ 2 | 0.320261, 0.627322, 0.143791, 3 | 0.960783, 0.914845, 0.143791, 4 | -0.079386, -0.326730, 0.143791, 5 | -0.516339, 0.339800, 0.143791, 6 | -0.267974, 0.627322, 0.143791, 7 | 0.320261, 0.627322, 0.143791, 8 | -0.516339, 0.339800, 0.143791, 9 | 0.320261, 0.627322, 0.143791, 10 | 0.081425, 0.339800, 0.143791, 11 | 0.081425, 0.339800, 0.143791, 12 | 0.320261, 0.627322, 0.143791, 13 | -0.079386, -0.326730, 0.143791, 14 | -0.960783, -0.914845, 0.143791, 15 | 0.081425, 0.339800, 0.143791, 16 | -0.079386, -0.326730, 0.143791, 17 | -0.960783, -0.914845, 0.143791, 18 | -0.079386, -0.326730, 0.143791, 19 | -0.320261, -0.614253, 0.143791, 20 | -0.320261, -0.614253, 0.143791, 21 | -0.079386, -0.326730, 0.143791, 22 | 0.516339, -0.326730, 0.143791, 23 | -0.320261, -0.614253, 0.143791, 24 | 0.516339, -0.326730, 0.143791, 25 | 0.267973, -0.614253, 0.143791, 26 | 0.320261, 0.627322, -0.143791, 27 | -0.079386, -0.326730, -0.143791, 28 | 0.960783, 0.914845, -0.143791, 29 | -0.516339, 0.339800, -0.143791, 30 | 0.320261, 0.627322, -0.143791, 31 | -0.267974, 0.627322, -0.143791, 32 | -0.516339, 0.339800, -0.143791, 33 | 0.081425, 0.339800, -0.143791, 34 | 0.320261, 0.627322, -0.143791, 35 | 0.081425, 0.339800, -0.143791, 36 | -0.079386, -0.326730, -0.143791, 37 | 0.320261, 0.627322, -0.143791, 38 | -0.960783, -0.914845, -0.143791, 39 | -0.079386, -0.326730, -0.143791, 40 | 0.081425, 0.339800, -0.143791, 41 | -0.960783, -0.914845, -0.143791, 42 | -0.320261, -0.614253, -0.143791, 43 | -0.079386, -0.326730, -0.143791, 44 | -0.320261, -0.614253, -0.143791, 45 | 0.516339, -0.326730, -0.143791, 46 | -0.079386, -0.326730, -0.143791, 47 | -0.320261, -0.614253, -0.143791, 48 | 0.267973, -0.614253, -0.143791, 49 | 0.516339, -0.326730, -0.143791, 50 | -0.999999, -0.614253, 0.143791, 51 | -0.999999, 0.627322, 0.143791, 52 | -0.712418, 0.339800, 0.143791, 53 | -0.712418, 0.339800, 0.143791, 54 | -0.999999, 0.627322, 0.143791, 55 | -0.398692, 0.627322, 0.143791, 56 | -0.712418, 0.339800, 0.143791, 57 | -0.398692, 0.627322, 0.143791, 58 | -0.633986, 0.339800, 0.143791, 59 | -0.999999, -0.614253, 0.143791, 60 | -0.712418, 0.339800, 0.143791, 61 | -0.712418, -0.326730, 0.143791, 62 | -0.999999, -0.614253, 0.143791, 63 | -0.712418, -0.326730, 0.143791, 64 | -0.594771, -0.326730, 0.143791, 65 | -0.999999, -0.614253, 0.143791, 66 | -0.594771, -0.326730, 0.143791, 67 | -0.843136, -0.614253, 0.143791, 68 | -0.999999, -0.614253, -0.143791, 69 | -0.712418, 0.339800, -0.143791, 70 | -0.999999, 0.627322, -0.143791, 71 | -0.712418, 0.339800, -0.143791, 72 | -0.398692, 0.627322, -0.143791, 73 | -0.999999, 0.627322, -0.143791, 74 | -0.712418, 0.339800, -0.143791, 75 | -0.633986, 0.339800, -0.143791, 76 | -0.398692, 0.627322, -0.143791, 77 | -0.999999, -0.614253, -0.143791, 78 | -0.712418, -0.326730, -0.143791, 79 | -0.712418, 0.339800, -0.143791, 80 | -0.999999, -0.614253, -0.143791, 81 | -0.594771, -0.326730, -0.143791, 82 | -0.712418, -0.326730, -0.143791, 83 | -0.999999, -0.614253, -0.143791, 84 | -0.843136, -0.614253, -0.143791, 85 | -0.594771, -0.326730, -0.143791, 86 | 0.594770, 0.326730, 0.143791, 87 | 0.843136, 0.627322, 0.143791, 88 | 0.999999, 0.627322, 0.143791, 89 | 0.594770, 0.326730, 0.143791, 90 | 0.999999, 0.627322, 0.143791, 91 | 0.712417, 0.326730, 0.143791, 92 | 0.712417, 0.326730, 0.143791, 93 | 0.999999, 0.627322, 0.143791, 94 | 0.999999, -0.614253, 0.143791, 95 | 0.712417, -0.326730, 0.143791, 96 | 0.712417, 0.326730, 0.143791, 97 | 0.999999, -0.614253, 0.143791, 98 | 0.385620, -0.614253, 0.143791, 99 | 0.633986, -0.326730, 0.143791, 100 | 0.712417, -0.326730, 0.143791, 101 | 0.385620, -0.614253, 0.143791, 102 | 0.712417, -0.326730, 0.143791, 103 | 0.999999, -0.614253, 0.143791, 104 | 0.594770, 0.326730, -0.143791, 105 | 0.999999, 0.627322, -0.143791, 106 | 0.843136, 0.627322, -0.143791, 107 | 0.594770, 0.326730, -0.143791, 108 | 0.712417, 0.326730, -0.143791, 109 | 0.999999, 0.627322, -0.143791, 110 | 0.712417, 0.326730, -0.143791, 111 | 0.999999, -0.614253, -0.143791, 112 | 0.999999, 0.627322, -0.143791, 113 | 0.712417, -0.326730, -0.143791, 114 | 0.999999, -0.614253, -0.143791, 115 | 0.712417, 0.326730, -0.143791, 116 | 0.385620, -0.614253, -0.143791, 117 | 0.712417, -0.326730, -0.143791, 118 | 0.633986, -0.326730, -0.143791, 119 | 0.385620, -0.614253, -0.143791, 120 | 0.999999, -0.614253, -0.143791, 121 | 0.712417, -0.326730, -0.143791, 122 | // 120 front and back 123 | 0.320261, 0.627322, 0.143791, 124 | -0.267974, 0.627322, 0.143791, 125 | -0.267974, 0.627322, -0.143791, 126 | 0.320261, 0.627322, 0.143791, 127 | -0.267974, 0.627322, -0.143791, 128 | 0.320261, 0.627322, -0.143791, 129 | 0.081425, 0.339800, 0.143791, 130 | -0.960783, -0.914845, 0.143791, 131 | -0.960783, -0.914845, -0.143791, 132 | 0.081425, 0.339800, 0.143791, 133 | -0.960783, -0.914845, -0.143791, 134 | 0.081425, 0.339800, -0.143791, 135 | -0.267974, 0.627322, 0.143791, 136 | -0.516339, 0.339800, 0.143791, 137 | -0.516339, 0.339800, -0.143791, 138 | -0.267974, 0.627322, 0.143791, 139 | -0.516339, 0.339800, -0.143791, 140 | -0.267974, 0.627322, -0.143791, 141 | 0.960783, 0.914845, 0.143791, 142 | 0.320261, 0.627322, 0.143791, 143 | 0.320261, 0.627322, -0.143791, 144 | 0.960783, 0.914845, 0.143791, 145 | 0.320261, 0.627322, -0.143791, 146 | 0.960783, 0.914845, -0.143791, 147 | 0.516339, -0.326730, 0.143791, 148 | -0.079386, -0.326730, 0.143791, 149 | -0.079386, -0.326730, -0.143791, 150 | 0.516339, -0.326730, 0.143791, 151 | -0.079386, -0.326730, -0.143791, 152 | 0.516339, -0.326730, -0.143791, 153 | -0.398692, 0.627322, 0.143791, 154 | -0.999999, 0.627322, 0.143791, 155 | -0.999999, 0.627322, -0.143791, 156 | -0.398692, 0.627322, 0.143791, 157 | -0.999999, 0.627322, -0.143791, 158 | -0.398692, 0.627322, -0.143791, 159 | -0.594771, -0.326730, 0.143791, 160 | -0.712418, -0.326730, 0.143791, 161 | -0.712418, -0.326730, -0.143791, 162 | -0.594771, -0.326730, 0.143791, 163 | -0.712418, -0.326730, -0.143791, 164 | -0.594771, -0.326730, -0.143791, 165 | 0.712417, -0.326730, 0.143791, 166 | 0.633986, -0.326730, 0.143791, 167 | 0.633986, -0.326730, -0.143791, 168 | 0.712417, -0.326730, 0.143791, 169 | 0.633986, -0.326730, -0.143791, 170 | 0.712417, -0.326730, -0.143791, 171 | 0.843136, 0.627322, 0.143791, 172 | 0.594770, 0.326730, 0.143791, 173 | 0.594770, 0.326730, -0.143791, 174 | 0.843136, 0.627322, 0.143791, 175 | 0.594770, 0.326730, -0.143791, 176 | 0.843136, 0.627322, -0.143791, 177 | 0.999999, 0.627322, 0.143791, 178 | 0.843136, 0.627322, 0.143791, 179 | 0.843136, 0.627322, -0.143791, 180 | 0.999999, 0.627322, 0.143791, 181 | 0.843136, 0.627322, -0.143791, 182 | 0.999999, 0.627322, -0.143791, 183 | 0.633986, -0.326730, -0.143791, 184 | 0.633986, -0.326730, 0.143791, 185 | 0.385620, -0.614253, 0.143791, 186 | 0.633986, -0.326730, -0.143791, 187 | 0.385620, -0.614253, 0.143791, 188 | 0.385620, -0.614253, -0.143791, 189 | // top 66 190 | -0.320261, -0.614253, 0.143791, 191 | 0.267973, -0.614253, 0.143791, 192 | 0.267973, -0.614253, -0.143791, 193 | -0.320261, -0.614253, 0.143791, 194 | 0.267973, -0.614253, -0.143791, 195 | -0.320261, -0.614253, -0.143791, 196 | -0.079386, -0.326730, 0.143791, 197 | 0.960783, 0.914845, 0.143791, 198 | 0.960783, 0.914845, -0.143791, 199 | -0.079386, -0.326730, 0.143791, 200 | 0.960783, 0.914845, -0.143791, 201 | -0.079386, -0.326730, -0.143791, 202 | 0.267973, -0.614253, 0.143791, 203 | 0.516339, -0.326730, 0.143791, 204 | 0.516339, -0.326730, -0.143791, 205 | 0.267973, -0.614253, 0.143791, 206 | 0.516339, -0.326730, -0.143791, 207 | 0.267973, -0.614253, -0.143791, 208 | -0.516339, 0.339800, 0.143791, 209 | 0.081425, 0.339800, 0.143791, 210 | 0.081425, 0.339800, -0.143791, 211 | -0.516339, 0.339800, 0.143791, 212 | 0.081425, 0.339800, -0.143791, 213 | -0.516339, 0.339800, -0.143791, 214 | -0.960783, -0.914845, 0.143791, 215 | -0.320261, -0.614253, 0.143791, 216 | -0.320261, -0.614253, -0.143791, 217 | -0.960783, -0.914845, 0.143791, 218 | -0.320261, -0.614253, -0.143791, 219 | -0.960783, -0.914845, -0.143791, 220 | -0.712418, -0.326730, 0.143791, 221 | -0.712418, 0.339800, 0.143791, 222 | -0.712418, 0.339800, -0.143791, 223 | -0.712418, -0.326730, 0.143791, 224 | -0.712418, 0.339800, -0.143791, 225 | -0.712418, -0.326730, -0.143791, 226 | -0.633986, 0.339800, 0.143791, 227 | -0.398692, 0.627322, 0.143791, 228 | -0.398692, 0.627322, -0.143791, 229 | -0.633986, 0.339800, 0.143791, 230 | -0.398692, 0.627322, -0.143791, 231 | -0.633986, 0.339800, -0.143791, 232 | -0.999999, -0.614253, 0.143791, 233 | -0.843136, -0.614253, 0.143791, 234 | -0.843136, -0.614253, -0.143791, 235 | -0.999999, -0.614253, 0.143791, 236 | -0.843136, -0.614253, -0.143791, 237 | -0.999999, -0.614253, -0.143791, 238 | -0.999999, 0.627322, 0.143791, 239 | -0.999999, -0.614253, 0.143791, 240 | -0.999999, -0.614253, -0.143791, 241 | -0.999999, 0.627322, 0.143791, 242 | -0.999999, -0.614253, -0.143791, 243 | -0.999999, 0.627322, -0.143791, 244 | -0.712418, 0.339800, 0.143791, 245 | -0.633986, 0.339800, 0.143791, 246 | -0.633986, 0.339800, -0.143791, 247 | -0.712418, 0.339800, 0.143791, 248 | -0.633986, 0.339800, -0.143791, 249 | -0.712418, 0.339800, -0.143791, 250 | -0.843136, -0.614253, 0.143791, 251 | -0.594771, -0.326730, 0.143791, 252 | -0.594771, -0.326730, -0.143791, 253 | -0.843136, -0.614253, 0.143791, 254 | -0.594771, -0.326730, -0.143791, 255 | -0.843136, -0.614253, -0.143791, 256 | 0.712417, 0.326730, 0.143791, 257 | 0.712417, -0.326730, 0.143791, 258 | 0.712417, -0.326730, -0.143791, 259 | 0.712417, 0.326730, 0.143791, 260 | 0.712417, -0.326730, -0.143791, 261 | 0.712417, 0.326730, -0.143791, 262 | 0.594770, 0.326730, 0.143791, 263 | 0.712417, 0.326730, 0.143791, 264 | 0.712417, 0.326730, -0.143791, 265 | 0.594770, 0.326730, 0.143791, 266 | 0.712417, 0.326730, -0.143791, 267 | 0.594770, 0.326730, -0.143791, 268 | 0.385620, -0.614253, 0.143791, 269 | 0.999999, -0.614253, 0.143791, 270 | 0.999999, -0.614253, -0.143791, 271 | 0.385620, -0.614253, 0.143791, 272 | 0.999999, -0.614253, -0.143791, 273 | 0.385620, -0.614253, -0.143791, 274 | 0.999999, -0.614253, 0.143791, 275 | 0.999999, 0.627322, 0.143791, 276 | 0.999999, 0.627322, -0.143791, 277 | 0.999999, -0.614253, 0.143791, 278 | 0.999999, 0.627322, -0.143791, 279 | 0.999999, -0.614253, -0.143791, 280 | // bottom 90 281 | }; 282 | -------------------------------------------------------------------------------- /zig-mark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fabioarnold/hello-3d/66bde9f41a3a29223b7390036cff04f3737fcf21/zig-mark.gif --------------------------------------------------------------------------------