Home

Awesome

<p align="center"> <img width="200" height="100" src="/example/assets/texture/logo.png"> </p>

A zig-contained library for Windows and Ubuntu that automatically compiles and links ImGui, OpenGL, stb_image, and GLFW into typed packages.

ZT will always target the latest dev version of Zig, and will create a branch for stable releases when convenient.

Check out the wiki for documentation and help.

<h1 align=center>For Applications</h1> <p align="center"> <img width="640px" height="390px" src="https://cdn.discordapp.com/attachments/602279341371424780/864667669940273172/unknown.png"> </p>

Get your applications done quick with industry standard ImGui library, used by a bunch of applications for its convenience and power.

Using ImGui is as simple as calling the functions! ZT will render everything for you without ever needing to touch gamedev code.

<hr/> <h1 align=center>For Games</h1> <p align="center"> <img width="640px" height="390px" src="https://cdn.discordapp.com/attachments/602279341371424780/864667491817095218/unknown.png"> </p>

With ImGui at the forefront for free, debugging and creating editors for your game is as smooth as it can be without deciding anything for you

<hr/>

Overview

To work with ZT You will need:

Current Status

See the example for what ZT.App has to offer.

Why

ZT is intended for an extremely broad group of developers in zig realtime graphics and applications, as it does not railroad you into using its app+windowing interface to function, and is better viewed as the following goals being accomplished without any resistance:

and additionally a ready to go combination of all 3 that lets you just immediately use close to the metal OpenGL constructs to just work on your application with convenience for use as desktop application code such as Energy Saving mode.

Getting Started

First you'll want to clone this into your zig project's folder, and const ztBuild = @import("path/to/ZT/build.zig") in your own build.zig to import this framework's build.zig, and that will expose some important functions to link ZT into your project.

So with ztBuild imported you just ztBuild.link(exe) and you can start importing and using ZT, or if you so choose, completely ignore ZT and use raw opengl/glfw/imgui.

Then getting started is as easy as this:

const std = @import("std");
const zt = @import("zt");

/// SampleData will be available through the context anywhere.
const SampleData = struct {
    yourData: i32 = 0,
};

const SampleApplication = zt.App(SampleData);

pub fn main() !void {
    var context = try SampleApplication.begin(std.heap.c_allocator);
    // Config here,
    while(context.open) {
        context.beginFrame();
        // Application code here!
        context.data.yourData += 1;
        context.endFrame();
    }
    // Unload here
    context.deinit();
}

For a more indepth example see the example file that shows opengl rendering mixed with imgui and more

Gotcha:

Credits