Coder Social home page Coder Social logo

iq-scm / screen-13 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from attackgoat/screen-13

0.0 0.0 0.0 30.66 MB

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.

License: Apache License 2.0

Shell 0.34% Rust 98.42% GLSL 1.14% HLSL 0.11%

screen-13's Introduction

Screen 13

Crates.io Docs.rs LoC

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.

[dependencies]
screen-13 = "0.8"

Overview

Screen 13 provides a high performance Vulkan driver using smart pointers. The driver may be created manually for headless rendering or automatically using the built-in event loop abstraction:

use screen_13::prelude::*;

fn main() -> Result<(), DisplayError> {
    EventLoop::new().build()?.run(|frame| {
        // It's time to do some graphics! ๐Ÿ˜ฒ
    })
}

Usage

Screen 13 provides a fully-generic render graph structure for simple and statically typed access to all the resources used while rendering. The RenderGraph structure allows Vulkan smart pointer resources to be bound as "nodes" which may be used anywhere in a graph. The graph itself is not tied to swapchain access and may be used to execute general command streams.

Features of the render graph:

  • Compute, graphic, and ray-trace pipelines
  • Automatic Vulkan management (render passes, subpasses, descriptors, pools, etc.)
  • Automatic render pass scheduling, re-ordering, merging, with resource aliasing
  • Interoperable with existing Vulkan code
  • Optional shader hot-reload from disk
render_graph
    .begin_pass("Fancy new algorithm for shading a moving character who is actively on fire")
    .bind_pipeline(&gfx_pipeline)
    .read_descriptor(0, some_image)
    .read_descriptor(1, another_image)
    .read_descriptor(3, some_buf)
    .clear_color(0, swapchain_image)
    .store_color(0, swapchain_image)
    .record_subpass(move |subpass| {
        subpass.push_constants(some_u8_slice);
        subpass.draw(6, 1, 0, 0);
    });

Quick Start

Included are some examples you might find helpful:

  • hello_world.rs โ€” Displays a window on the screen. Please start here.
  • triangle.rs โ€” Shaders and full setup of index/vertex buffers; < 100 LOC.
  • shader-toy/ โ€” Recreation of a two-pass shader toy using the original shader code.

See the example code, documentation, or helpful getting started guide for more information.

NOTE: Required development packages and libraries are listed in the getting started guide. All new users should read and understand the guide.

History

As a child I was given access to a computer that had GW-Basic; and later one with QBasic. All of my favorite programs started with:

CLS
SCREEN 13

These commands cleared the screen of text and setup a 320x200 256-color paletized video mode. There were other video modes available, but none of them had the 'magic' of 256 colors.

Additional commands QBasic offered, such as DRAW, allowed you to build simple games quickly because you didn't have to grok the entirety of compiling and linking. I think we should have options like this today, and so I started this project to allow future developers to have the ability to get things done quickly while using modern tools.

Insipirations

Screen 13 was built from the learnings and lessons shared by others throughout our community. In particular, here are some of the repositories I found useful:

  • Bevy: A refreshingly simple data-driven game engine built in Rust
  • Granite - Open-source Vulkan renderer
  • Kajiya - Experimental real-time global illumination renderer made with Rust and Vulkan

screen-13's People

Contributors

attackgoat avatar doeringchristian avatar penguinliong avatar rdambrosio016 avatar seabassjh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.