Crates.io | sstar |
lib.rs | sstar |
version | 0.1.8 |
source | src |
created_at | 2023-06-05 15:59:03.305976 |
updated_at | 2023-07-05 15:00:18.809746 |
description | A small frontend framework for 2D game. |
homepage | |
repository | https://github.com/Tengu712/shooting-star/ |
max_upload_size | |
id | 883139 |
size | 2,406,459 |
A small frontend framework for game development. This framework is supported on Windows and Linux.
Install dependencies:
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();
}
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;
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.