All Projects → cloudhead → Rgx

cloudhead / Rgx

Licence: mit
Modern mid-level 2D graphics library

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rgx

Pixieditor
PixiEditor is a lightweight pixel art editor made with .NET 5
Stars: ✭ 210 (+22.09%)
Mutual labels:  graphics, 2d, pixel-art
Gcanvas
A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas
Stars: ✭ 1,705 (+891.28%)
Mutual labels:  graphics, 2d
Vulkancore
Vulkan 1.0 graphics and compute API bindings for .NET Standard
Stars: ✭ 162 (-5.81%)
Mutual labels:  graphics, vulkan
Floor
A C++ Compute/Graphics Library and Toolchain enabling same-source CUDA/Host/Metal/OpenCL/Vulkan C++ programming and execution.
Stars: ✭ 166 (-3.49%)
Mutual labels:  graphics, vulkan
Gizmo
2D Pixel Destruction Game written in Go.
Stars: ✭ 114 (-33.72%)
Mutual labels:  2d, pixel-art
Veldrid
A low-level, portable graphics library for .NET.
Stars: ✭ 1,784 (+937.21%)
Mutual labels:  graphics, vulkan
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+7583.14%)
Mutual labels:  graphics, vulkan
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-52.91%)
Mutual labels:  graphics, vulkan
Serpent
Cross-platform gaming kit in the D programming language
Stars: ✭ 140 (-18.6%)
Mutual labels:  vulkan, 2d
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (-18.02%)
Mutual labels:  graphics, 2d
Rx
👾 Modern and minimalist pixel editor
Stars: ✭ 2,063 (+1099.42%)
Mutual labels:  graphics, pixel-art
Vulkan Samples
One stop solution for all Vulkan samples
Stars: ✭ 2,009 (+1068.02%)
Mutual labels:  graphics, vulkan
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+5860.47%)
Mutual labels:  graphics, vulkan
Svg.skia
An SVG rendering library.
Stars: ✭ 122 (-29.07%)
Mutual labels:  graphics, 2d
Citro2d
Library for drawing 2D graphics using the Nintendo 3DS's PICA200 GPU
Stars: ✭ 88 (-48.84%)
Mutual labels:  graphics, 2d
Bsf
Modern C++14 library for the development of real-time graphical applications
Stars: ✭ 1,640 (+853.49%)
Mutual labels:  graphics, vulkan
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-11.63%)
Mutual labels:  graphics, 2d
Spatialmath Python
Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
Stars: ✭ 78 (-54.65%)
Mutual labels:  graphics, 2d
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-54.65%)
Mutual labels:  graphics, vulkan
Pixelorama
A free & open-source 2D sprite editor, made with the Godot Engine! Available on Windows, Linux, macOS and the Web!
Stars: ✭ 2,535 (+1373.84%)
Mutual labels:  graphics, pixel-art

rgx

A mid-level 2D graphics library for rust

Introduction

rgx is a 2D graphics library built on top of wgpu and Vulkan/Metal. This library aims to be "mid-level" in that it provides an API that is higher level than Vulkan/Metal, but lower level than most 2D graphics libraries in the wild, by exposing the user to concepts such as pipelines, buffers and swap chains. The goal of rgx is to provide as simple an API as possible without sacrificing performance or control over the rendering pipeline. See the examples directory to get a feel.

At this stage, the focus is on 2D bitmap graphics and sprite rendering. Basic shape rendering is also supported, but not the core strength of this library. In the future, text rendering and more complex vector rasterization may be supported - however, these are incredibly difficult to do correctly, and I would recommend looking at Mozilla's pathfinder project for these needs. rgx aims to do one thing really well, and that is bitmap rendering.

Overview

The library is split into two modules, kit, and core. The latter provides rgx's core API with no assumption on what kind of 2D graphics will be rendered, while the former exposes some useful building blocks for various use-cases, such as a shape-oriented pipeline and a sprite oriented pipeline. Users can construct their own pipelines and use them with rgx.

rgx can be used with, or without a rendering backend. To use it with, turn on the renderer feature. When used without a backend, the kit module's backend-agnostic utilities can be used.

Pipelines included in the kit

  • shape2d: for batched 2D shape rendering
  • sprite2d: for batched 2D sprite rendering

Features

  • Batched texture rendering
  • Batched shape rendering
  • Basic primitives for sprite animation
  • Off-screen rendering support
  • Custom shader support
  • Custom pipeline support
  • Built-in depth testing

Usage

See examples/helloworld.rs for a simple usage example.

Rebuilding the shaders

To rebuild the shaders run the following:

glslc -c -Werror --target-env=vulkan ./examples/data/framebuffer.vert -o ./examples/data/framebuffer.vert.spv
glslc -c -Werror --target-env=vulkan ./examples/data/framebuffer.frag -o ./examples/data/framebuffer.frag.spv
glslc -c -Werror --target-env=vulkan ./src/kit/data/shape.frag        -o ./src/kit/data/shape.frag.spv
glslc -c -Werror --target-env=vulkan ./src/kit/data/sprite.frag       -o ./src/kit/data/sprite.frag.spv
glslc -c -Werror --target-env=vulkan ./src/kit/data/shape.vert        -o ./src/kit/data/shape.vert.spv
glslc -c -Werror --target-env=vulkan ./src/kit/data/sprite.vert       -o ./src/kit/data/sprite.vert.spv

Support

If you find this project useful, consider supporting it by sending ₿ (Bitcoin) to 1HMfp9QFXmVUarNPmHxa1rhecZXyAPiPZd. <3

Copyright

(c) 2019 Alexis Sellier
Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].