8000 GitHub - rzel/yocto-gl: A collection of C/C++ single-file libraries for building physically-based graphics applications
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ yocto-gl Public
forked from xelatihy/yocto-gl

A collection of C/C++ single-file libraries for building physically-based graphics applications

Notifications You must be signed in to change notification settings

rzel/yocto-gl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yocto/GL: C/C++ Single File Libraries for Physically-Based Graphics

Yocto/GL is a collection of single-file libraries, or single .h/.cpp pairs, for building physically-based graphics applications. Yocto/GL is written in C++14, with compilation supported also on C++11, and compiles on OSX (clang/gcc), Linux (gcc) and Windows (MSVC 2017). You can use Yocto/GL as either header-only libraries, for simplicity, or .h/.cpp pairs, to reduce code bloat and compile time.

Libraries

  • yocto_obj (.h/.cpp) - Wavefront OBJ/MTL loader and writer that supports arbitrary polygons (with/without triangulation), lines, and points. Includes optionals extensions for per-vertex color and radius, camera and environment map.
  • yocto_gltf (.h/.cpp) - Khronos glTF loader and writer automatically generated by the spec. Supports all glTF format including Khronos extensions.
  • yocto_bvh (.h/.cpp) - Ray casting and closet point queries of points, lines and triangles accelerated by a two-level bounding volume hierarchy.
  • yocto_trace (.h/.cpp) - Path tracer with support for point, line or triangle geometry, mesh area lights and environment maps, materials with either GGX or Phong (only opaque for now). Support both incremental and offline computation on single- or multi-core machines. Implementation depends on yocto_math.h.
  • yocto_sym (.h/.cpp) - Rigid body solver supporting convex and concave triangle meshes based on Sequential Impulses (aka Projected Gauss-Sidel).
  • yocto_math (.h only) - Vector and matrix math, shape and image manipulation.
  • yocto_utils (.h/.cpp) - Utilities for writing applications. Includes command line parsing, logging, thread pools, string and path msanipulation.
  • yocto_glu (.h/.cpp) - Quick and dirty rendering of images and shapes in OpenGL, useful to create interactive viewers.
  • yocto_gui (.h/.cpp) - A wrapper for GLFW and ImGui for window management and immediate mode widgets.
  • yocto_img (.h/.cpp) - A wrapper for single-file libraries for image loading and saving.

Documentation

All documentation is included in each library file in plain ASCII and formatted as Markdown and HTML in the doc/ folder.

Example applications

This repository contains Yocto/GL applications written to test the libraries.

  • yview.cpp: Simple OpenGL viewer.
  • ytrace.cpp: Interactive/Offline path-tracer.
  • ysym.cpp: Interactive/Offline rigid body demo.
  • yobj2gltf.cpp: Converts Wavefront OBJ to glTF 1.1.
  • ytestgen.cpp: Creates various test cases for the path tracer and GL viewer.
  • yimview.cpp: HDR/PNG/JPG image viewer with exposure/gamma tone mapping.
  • yimproc.cpp: Offline image manipulation.

A few screenshots from ytrace are included here for demonstration.

A screenshotted movie from ysym is included here for demonstration.

Tools

This repository contains tools used for code generation and documentation extraction.

  • ygltfgen.cpp: glTF parsing code generation.
  • ydocgen.cpp: Documentation generation.

Building

You can build the non-interactive example apps using cmake with

mkdir cmake
cd cmake
cmake ..
make -j4        # linux/OSX
msbuild         # Windows

The interactive apps use OpenGL, GLFW and GLEW. We include binaries for Windows, but you have to install the libraries youself on Linux (we use apt-get) and OSX (we use homebrew). If these libraries and not available you can compile without interactive viewer support with

cmake -DYOCTO_NO_OPENGL=ON ..

License

Yocto/GL libraries are released under the permissive MIT license, while the example apps are released under the 2-clause BSD (to include warranty for binary distribution).

About

A collection of C/C++ single-file libraries for building physically-based graphics applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 50.0%
  • C 49.7%
  • Other 0.3%
0