sstar

Crates.iosstar
lib.rssstar
version0.1.8
sourcesrc
created_at2023-06-05 15:59:03.305976
updated_at2023-07-05 15:00:18.809746
descriptionA small frontend framework for 2D game.
homepage
repositoryhttps://github.com/Tengu712/shooting-star/
max_upload_size
id883139
size2,406,459
(Tengu712)

documentation

https://docs.rs/sstar

README

Shooting Star

Outline

A small frontend framework for game development. This framework is supported on Windows and Linux.

Quick Start

Install dependencies:

  • Linux
    • X11
    • vulkan
  • Windows
    • user32
    • xinput
    • vulkan-1

Create a project with Cargo. Then, add a following line to Cargo.toml:

[dependencies]
sstar = { version = "0.1.5", features=["with-default-shaders"] }

Write main.rs as follow (this is a program that creates a window and clears it default color):

use sstar::app::SStarApp;

fn main() {
    let mut app = SStarApp::new("Sample Program", 640.0, 480.0, 10);
    while app.update() {
        app.flush();
    }
    app.terminate();
}

Vertex Shader Interface

If you use a custom vertex shader, you should use following definitions:

#version 450

layout(push_constant) uniform PushConstant {
    vec4 scl;
    vec4 rot;
    vec4 trs;
    vec4 col;
    vec4 uv;
    ivec4 param;
} constant;

layout(binding=0) uniform UniformBuffer {
    mat4 view;
    mat4 perse;
    mat4 ortho;
};

layout(location=0) in vec3 in_pos;
layout(location=1) in vec2 in_uv;

License

This software (shooting-star) is published under the CC0 public domain. However, some dependencies may be linked when building an app using this software. See LICENSE-ALL in detail.

Commit count: 102

cargo fmt