Compare commits

..

No commits in common. "master" and "init-sh-test" have entirely different histories.

3 changed files with 5 additions and 17 deletions

View File

@ -54,9 +54,6 @@ git remote remove origin
git rm --cached init.sh git rm --cached init.sh
git rm -r skel-test git rm -r skel-test
# replace the README with a stub
echo "# $name" >| README.md
# escape HTML special characters (&, <, and >), but also sed special characters (& again, \, and /) # escape HTML special characters (&, <, and >), but also sed special characters (& again, \, and /)
htmlname=$(echo -n "$name" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s:[\\/&]:\\&:g') htmlname=$(echo -n "$name" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s:[\\/&]:\\&:g')
sed -i "s/PROJECT NAME/$htmlname/" ui/src/main_window.ui sed -i "s/PROJECT NAME/$htmlname/" ui/src/main_window.ui
@ -76,7 +73,4 @@ grep -l -r PROJECT_NAME | xargs sed -i "s/PROJECT_NAME/$ident/g"
pascal=$(echo -n $ident | LC_ALL=C tr '_' '\n' | LC_ALL=C awk -v FIELDWIDTHS='1 1000' -v ORS='' '{print toupper($1) $2}') pascal=$(echo -n $ident | LC_ALL=C tr '_' '\n' | LC_ALL=C awk -v FIELDWIDTHS='1 1000' -v ORS='' '{print toupper($1) $2}')
grep -l -r PROJECTNAME | xargs sed -i "s/PROJECTNAME/$pascal/g" grep -l -r PROJECTNAME | xargs sed -i "s/PROJECTNAME/$pascal/g"
# another hack, to update Cargo.lock
cargo tree >/dev/null
git commit -a -m "MORPH INTO: $name" git commit -a -m "MORPH INTO: $name"

View File

@ -1,6 +1,6 @@
use std::error::Error; use std::error::Error;
use glam::{UVec2, Vec4, vec4}; use glam::{UVec2, Vec4};
const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth16Unorm; const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth16Unorm;
const OUTPUT_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb; const OUTPUT_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb;
@ -11,14 +11,6 @@ pub struct RedrawArgs {
pub background: Vec4, pub background: Vec4,
} }
impl Default for RedrawArgs {
fn default() -> Self {
Self {
background: vec4(0.05, 0.20, 0.85, 1.00),
}
}
}
pub struct Gpu { pub struct Gpu {
device: wgpu::Device, device: wgpu::Device,
queue: wgpu::Queue, queue: wgpu::Queue,

View File

@ -1,7 +1,7 @@
use std::sync::Arc; use std::sync::Arc;
use PROJECT_NAME::{Core, RedrawArgs, init_gpu_inner}; use PROJECT_NAME::{Core, RedrawArgs, init_gpu_inner};
use glam::uvec2; use glam::{uvec2, vec4};
use winit::{ use winit::{
application::ApplicationHandler, application::ApplicationHandler,
event::WindowEvent, event::WindowEvent,
@ -36,7 +36,9 @@ impl MainWindow {
WindowEvent::Resized(physical_size) => self WindowEvent::Resized(physical_size) => self
.core .core
.configure(uvec2(physical_size.width, physical_size.height)), .configure(uvec2(physical_size.width, physical_size.height)),
WindowEvent::RedrawRequested => self.core.redraw(&RedrawArgs::default()), WindowEvent::RedrawRequested => self.core.redraw(&RedrawArgs {
background: vec4(0.05, 0.20, 0.85, 1.00),
}),
_ => {} _ => {}
} }
} }