This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use glam::UVec2; | |
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; | |
use sdl2::{ | |
event::{Event, WindowEvent}, | |
keyboard::Keycode, | |
}; | |
use windows::Win32::Foundation::HWND; | |
#[no_mangle] | |
pub static D3D12SDKVersion: u32 = 614; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import os | |
import subprocess | |
from pathlib import Path | |
parser = argparse.ArgumentParser( | |
description="Process gltf into rust-compatible format") | |
parser.add_argument('file', type=Path) | |
parser.add_argument('--force', type=bool) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let iad = pollster::block_on(rend3::create_iad( | |
None, | |
None, | |
Some(RendererMode::CPUPowered), | |
)) | |
.unwrap(); | |
let vert = iad.device.create_shader_module(&ShaderModuleDescriptor { | |
label: Some("vert"), | |
source: ShaderSource::Wgsl( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import os | |
import subprocess | |
from pathlib import Path | |
parser = argparse.ArgumentParser( | |
description="Process gltf into rust-compatible format") | |
parser.add_argument('file', type=Path) | |
parser.add_argument('--force', type=bool) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Things that trigger shader recompiles on NVIDIA GL | |
* Respecifying input assembly via `glVertexAttrib*` for any vertex array | |
* Clearing an individual color attachment with `glClearBuffer*` | |
* Clearing an FBO with `glClear` without specifying all attachments in | |
the clear, e.g if the FBO has color + depth but you only pass `GL_COLOR_BUFFER_BIT` | |
* Attaching shaders to a program | |
* Changing sampler uniforms (all textures are bindless on NV, changing sampler index is bad) | |
* Respecifying `glClearColor` more than once per frame per FBO | |
* Changing depth function more than once per bound program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nalgebra as na; | |
macro_rules! conversions { | |
($trait1:ident, $conv1:ident, $trait2:ident, $conv2:ident, $(($src:ty, $mint:ty, $dst:ty)),* $(,)?) => { | |
$( | |
impl $trait1 for $src { | |
type Target = $dst; | |
fn $conv1(self) -> Self::Target { | |
let m: $mint = self.into(); | |
m.into() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* automatically generated by rust-bindgen */ | |
#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] | |
pub mod root { | |
#[repr(C)] | |
pub struct __BindgenUnionField<T>(::core::marker::PhantomData<T>); | |
impl<T> __BindgenUnionField<T> { | |
#[inline] | |
pub const fn new() -> Self { | |
__BindgenUnionField(::core::marker::PhantomData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route("/s/<path:url>") | |
def ret_hosted_file(url): | |
return send_from_directory("s/", url) | |
@app.route("/api/fdel/<path:url>", methods=['POST']) | |
def delete_file(url): | |
form_data = request.form | |
filename = os.path.abspath(os.path.join("s/", url)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Loading C:\Users\connor\Downloads\models\lucy.obj. | |
Duration: 640.7ms | |
Verts: 14027872 | |
Faces: 28055728 | |
Verts/s: 21895759.2 | |
Faces/s: 43791493.5 | |
MB/s: 1841.7 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Loading C:\Users\connor\Downloads\models\lucy.obj. | |
Duration: 1833.9ms | |
Verts: 14027872 | |
Faces: 28055728 | |
Verts/s: 7649115.7 | |
Faces/s: 15298222.7 | |
MB/s: 643.4 | |
*/ |
NewerOlder