Skip to content

Instantly share code, notes, and snippets.

View oluigipo's full-sized avatar
🎷

Luigi oluigipo

🎷
View GitHub Profile
@oluigipo
oluigipo / learn-d3d12.c
Last active December 1, 2023 06:47
learn-d3d12
/*
* fxc /nologo shader.hlsl /Fovs.bin /EVertex /Tvs_5_0
* fxc /nologo shader.hlsl /Fops.bin /EPixel /Tps_5_0
* clang learn-d3d12.c -o a.exe -g -Wall -fuse-ld=lld
*/
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
@oluigipo
oluigipo / parser.c
Last active November 28, 2022 22:42
simple expression parser in C
// Top-level declarations
static double parse_add(void);
static const char* state;
// Checks if state is a valid digit
static int is_digit(void) {
return *state >= '0' && *state <= '9';
}
// Get the digit value of state