Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.35 KB

README.md

File metadata and controls

58 lines (42 loc) · 3.35 KB

Windowing library: mach/glfw - Ziggified GLFW bindings by slimsag (Stephen Gutekanst).

OpenGL bindings for Zig were generated by the zig-opengl project by MasterQ32 (Felix Queißner).

zstbi - stb image bindings, zmath - SIMD math library, provided by Michal Ziulek, part of the zig-gamedev project.

Sample programs can be used together with the reference book: Learn OpenGL - Graphics Programming by Joey de Vries.


Zig Language installation How-to instructions.


I. Getting Started

Hello Triangle

  • hello_triangle: Minimal setup for drawing a trianlge on screen.
    zig build hello_triangle-run
    hello triangle
  • hello_rectangle: Draw a rectangle efficiently with indexed rendering using the 'Element Buffer Object'.
    zig build hello_rectangle-run
    hello triangle

Shaders

  • shaders: Little programs that rest on the GPU
    zig build shaders-run
    shaders

    Shader struct mirrors the C++ Shader Class in the book.

Textures

  • textures: Decorate objects with textures
    zig build textures-run
    textures

Transformations

  • Transformations: Apply a transformation matrix to vertex data
    zig build transformations-run
    transformations

Coordinate Systems

Camera

  • Camera rotation: Camera rotation around world origin
    zig build camera_rotate-run

  • Simple camera: Fly-like camera
    zig build simple_camera-run

II. Lighting

Basic Lighting