Skip to content

UI library written with NanoVG, GLFW, and modern OpenGL in C++11

License

Notifications You must be signed in to change notification settings

jiayuwang/Alloy-Graphics-Library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alloy Graphics Library

Alloy is yet another 2D/3D graphics library written in C++11. As mundane as that sounds, this API provides an extensive collection of GUI components and engineering reference implementations of common 2D/3D graphics algorithms for fast prototyping on windows, linux, and mac platforms.

Build Status Build status

Contents

  • Anti-aliased vector graphics drawing (NanoVG).
  • Truetype fonts (stb_truetype).
  • OpenGL core 3.3 and higher support. Legacy OpenGL will not run, but you won't need it!
  • Generic handling of absolute/relative coordinates in pixels, dp, in, and mm.
  • Tweenable positions, dimensions, font sizes, and colors.
  • GUI components: Region, Composite, Border Layout, Vertical Layout, Horizontal Layout, Scroll Bars, Draw 2D Region, Text Button, Icon Button, Text Icon Button, Text Label, Text Region, Text Field, Number Field, Message Dialog, Selection Box, Drop Down Box, Menu Bar, Vertical Slider, Horizontal Slider, Color Selection, File Dialog, File Field, Multi-File Filed, File Button, List Box, Search Box, Window Pane, Graph Plot, Progress Bar, Expand Region, Expand Tree, Tab Pane, Table Pane, Timeline, Toggle Box, Check Box, Glass Pane, Parameter Pane.
  • Worker, timer, and recurrent worker.
  • Vector types from one to four dimensions.
  • Quaternions.
  • Color space support for RGBA, HSV, CieLAB, XYZ, Gray, and look-up tables.
  • Sparse Matrix, Dense Matrix, Dense Vector, Array, Image, and Volume data structures.
  • Data structure serialization to json, binary, and xml (cereal).
  • Image IO (stb_image and tinyexr) for PNG, JPEG, TIFF, HDR, PSD, BMP, GIF, PNM, PIC, TGA, EXR, and XML (Mipav's encoding).
  • Mesh IO for PLY and OBJ (tinyobj).
  • Dense and sparse matrix solvers including SVD, QR, LU, CG, and BiCGstab.
  • The "Any" class to enable methods with arbitrary left-hand return types.
  • Perspective and orthographic cameras with methods to transform from world to screen or vice versa.
  • "Awesome font" icons.
  • Window screenshot (F11).
  • Arbitrary mouse cursors.
  • Common shaders for deferred rendering in OpenGL 3.3 and higher.
  • Distance Field 2D/3D (fast-marching method).
  • Delaunay Triangulation.
  • Point Kd-Tree 2D/3D (libkdtree).
  • Approximate Nearest Neighbors in N-dimensions (nanoflann).
  • Mesh Kd-Tree (ray-intersection and closest point).
  • SHA1, SHA-256, SHA-384, SHA-512.
  • Cross-Platform file system IO.
  • NURB curves, B-Splines, and Beziers (tinyspline).
  • Catmull-Clark and Loop mesh sub-division.
  • Mesh primitives for box, icosahedron, sphere, cylinder, torus, plane, cone, pyramid, frustum, capsule, tessellated sphere, grid, and asteroid.
  • Iso-contour generation (with connectivity rules)
  • Dataflow UI for graphics/imaging pipelines
  • Force directed graph
  • "One Euro" filter

Dependencies

GLFW 3.1+ and GLEW. Source code for all other libraries is included in the repository and compiles on windows, linux, and mac.

Building

Ubuntu Linux:

sudo apt-get install g++-4.8
sudo apt-get install gcc-4.8
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libxxf86vm-dev 
sudo apt-get install libxrandr-dev
sudo apt-get install libxcursor-dev
sudo apt-get install libxinerama-dev
sudo apt-get install libxdamage-dev
sudo apt-get install libxi-dev
sudo apt-get install libglew-dev
sudo apt-get install libxi6
sudo apt-get install libglew1.10
sudo apt-get install cmake
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8
make -j4

OS X:

brew update
brew install glew
brew install cmake
brew tap homebrew/versions
brew install glfw3
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
make -j4

Windows 10:

License

Alloy is MIT licensed and only uses libraries that also have a permissive license for commercial and academic use.

Absolute/Relative Positioning Example

UnitsEx

Composite Example

CompisteEx

Events Example

EventsEx

Drag and Drop Example

DragEx

Tween Animation Example

TweenEx

Image Example

ImageEx

Controls Example

ControlsEx

Dialog Example

DialogEx

Parameter Pane Example

ParameterPaneEx

Timeline Example

TimelineEx

Expand Bar Example

ExpandBarEx

Expand Tree Example

ExpandTreeEx

Tab Pane Example

TabPaneEx

Menu System Example

MenuEx

Graph Example

GraphPaneEx

Window Pane Example

WindowPaneEx

Table Pane Example

TablePaneEx

DataFlow Example

DataFlowEx

Force Directed Graph Example

ForceDirectedGraphEx

Mesh with Matcap Shading Example

MeshMatcapEx

Mesh Wireframe Example

MeshWireframeEx

Mesh Subdivision Example

MeshSubdivideEx

Mesh Texture Example

MeshTextureEx

Mesh with Per Vertex Color Example

MeshVertexColorEx

Particles Example

MeshParticleEx

Mesh Depth / Normals / Distances Example

MeshDepthEx

Mesh Phong Shading Example

MeshPhongEx

Laplace Fill Example

LaplaceFillEx

Poisson Blend Example

PoissonBlendEx

Poisson Fill Example

PoissonInpaintEx

Image Filter Example

ImageProcessingEx

Object/Face Picker Example

MeshPickerEx

Mesh Ray Intersection Example

IntersectorEx

Mesh Smoothing Example

MeshSmoothEx

Color Space Example

ColorSpaceEx

Mesh Primitives Example

MeshPrimitivesEx

Point Locator Example

LocatorEx

B-Spline Example

SplineEx

Distance Field Example

DistanceFieldEx

One Euro Filter Example

OneEuroFilterEx

About

UI library written with NanoVG, GLFW, and modern OpenGL in C++11

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.8%
  • C 47.1%
  • Other 0.1%