Giter Site home page Giter Site logo

learnopengl's Introduction

Zig Learn OpenGL

Learn OpenGL tutorials ported to the zig programming language. This repo follows the chronological order of the website, separating out the same functionality into separate files. The repository is intended to serve as a demonstration of how to use OpenGL with zig, both in user code, and with the zig build system.

Currently the "Getting Started" and "Lighting" sections have been ported in full, and I've also ported the ibl specular implementation in the PBR section for a bit of eyecandy.

Containers screenshot

Dependencies

  • GLAD (vendored)
  • STB (vendored)
  • GLFW (byo)

All dependencies except for GLFW are vendored under deps/. For GLFW, install using your OS package manager, or if using windows, install using something like vcpkg and edit the paths in build.zig.

Running

Check build.zig for the full list of implemented stages, to run the relevant stage, just run its zig build command, for example:

zig build hello_triangle    # Renders a colorful triangle
zig build camera            # Renders a scene with many boxes and a camera
zig build multiple_lights   # Renders the same scene but with diffuse/specular maps and multiple lights

Stability

My intention is to keep this repo up to date with the language. This has been tested and works with:

  • 0.5.0+d972d1c94

learnopengl's People

Contributors

cshenton avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.