Skip to content
/ visage Public
forked from VitalAudio/visage

C++ UI library meets creative coding

License

Notifications You must be signed in to change notification settings

BillyDM/visage

 
 

Repository files navigation

Visage: UI library meets creative coding

Visage is a GPU-accelerated, cross-platform C++ library for native UI and 2D graphics. It merges the structure of a UI framework with the features of a creative graphics libraries.

Full Basic Example

#include <visage_app/application_window.h>

int main() {
  visage::ApplicationWindow app;

  app.onDraw() = [&app](visage::Canvas& canvas) {
    canvas.setColor(0xffff00ff);
    canvas.fill(0, 0, app.width(), app.height());
  };

  app.show(800, 600); // Opens as 800 x 600 pixel window
  app.runEventLoop(); // Runs window events. Returns when window is closed.
  return 0;
}

Demos

UI Features

  • Event Normalization
       Cross-platform support for keyboard and mouse input normalization.

  • Window Normalization
       Cross-platform support for opening and handling windows.

  • Text entry
       Unicode text entry with multi line text editing

  • ✨ Emojis ✨
       If you're into that kind of thing 🤷

  • Partial Rendering
       Redraws only the dirty regions for optimal performance.

Graphics Features

  • Fluid motion
       New frames are displayed at the monitor's refresh rate and animations are smooth

  • Automatic Shape Batching
       Automatically groups shapes for efficient GPU rendering.

  • Blend Modes
       Supports blending layers with additive, subtractive or by drawing a custom mask for the UI to pass through

  • Shaders
       Write shaders once and transpile them for Direct3d, Metal and OpenGL

  • Included Effects
       Real-time effects such as large blur and bloom

  • Pixel Accuracy
       Access to device pixel size ensures precise rendering without blurring.

Supported Platforms

  • Windows: Direct3D11
  • MacOS: Metal
  • Linux: Vulkan
  • Web/Emscripten: WebGL

About

C++ UI library meets creative coding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.6%
  • Objective-C++ 3.8%
  • CMake 2.6%
  • Scala 2.2%
  • Shell 1.2%
  • Objective-C 0.4%
  • SuperCollider 0.2%