Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 1.87 KB

README.md

File metadata and controls

92 lines (66 loc) · 1.87 KB

LearnOpenGl Examples

Unofficial cross platform examples for learnopengl.com

Live Demos

  • written in C.
  • shader dialect GLSL v450
  • runs on OSX, Linux, Windows and web (emscripten) from the same source
  • uses Sokol libraries for cross platform support

Building

Fips is used as build system to support multiple platforms.

Requirements

  • a C development environment:
    • OSX: Xcode + command line tools
    • Linux: make/ninja + gcc/clang
    • Windows: Visual Studio
  • CMake
  • Python
  • Git
  • Linux only: libgl-dev libx11-dev libxi-dev libxcursor-dev

How to Build

> mkdir fips-workspace
> cd fips-workspace
> git clone https://github.com/GeertArien/learnopengl-examples.git
> cd learnopengl-examples
> ./fips build
> ./fips run 1-3-1-rendering

Targets

To get a list of targets:

> ./fips list targets

To run a specific target:

> ./fips run 3-1-2-backpack-lights

Web Builds

To enable web builds you need to setup the emscripten SDK and select one of the webgl2 configs: webgl2-wasm-ninja-debug or webgl2-wasm-ninja-release.

> ./fips setup emscripten
> ./fips set config webgl2-wasm-ninja-debug
> ./fips build

IDE Integration

Fips supports CLion, Visual Studio, Visual Studio Code and XCode as provided by cmake:

> ./fips set config linux-clion-debug
> ./fips gen
> ./fips open
> ./fips set config win64-vstudio-debug
> ./fips gen
> ./fips open
> ./fips set config win64-vscode-debug
> ./fips gen
> ./fips open
> ./fips set config osx-xcode-debug
> ./fips gen
> ./fips open