Skip to content
No description, website, or topics provided.
C HTML C++ CMake Objective-C CSS Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples fix for nvidia Feb 2, 2018
lib
projects
src Linux: fix compile warnings Feb 2, 2018
.gitignore
.gitmodules
LICENSE.md Create LICENSE.md Aug 3, 2016
README.md
build.sh
build_imgui.sh
build_stb_image.sh

README.md

TwoTriangles

This app simply draws two (shaded) triangles, which is basically a native offline variant of an older version of Shadertoy.

Screencast

Features

  • Edit OpenGL fragment shader files (GLSL 1.10) with your favorite text editor and watch saved changes appear near instantly
  • Modify uniform values by dragging to see the effects in realtime
  • Load and store uniform values to disk
  • Built-in 3D camera with keyboard controls (WASD for moving, arrow keys for looking around)
  • Load textures, cubemaps and HDR images

Installing

Windows

You can find a Windows build on the releases page: https://github.com/fabioarnold/TwoTriangles/releases

You might need to install the Microsoft Visual C++ Redistributable for Visual Studio 2017.

Arch Linux

You can obtain a package from the AUR: https://aur.archlinux.org/packages/twotris-git

Building from source

Install dependencies

Windows

You need Visual Studio 2017.

OS X

Assuming you already have Xcode installed, install dependencies using Homebrew:

$ brew install scons pkg-config sdl2

Arch Linux

Install dependencies using pacman:

# pacman -S base-devel scons pkg-config glew sdl2

Get the code

Clone repository and submodules:

$ git clone --recursive https://github.com/fabioarnold/TwoTriangles.git
$ cd TwoTriangles

Build and run

OS X and Arch Linux

Build and run TwoTriangles: sh build.sh run

Windows

Open projects/visualstudio/TwoTriangles.sln in Visual Studio 2017 and build the TwoTriangles project either in Debug or Release mode. Note that the x64 is the only configured target. After a successful build you can find all the binaries the target folder (projects/visualstudio/x64/Release).

Credits

You can’t perform that action at this time.