Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
72b1a81
Initial opengl with glfw and gl
alloncm Oct 3, 2025
cf191d9
WIP texture not working
alloncm Oct 6, 2025
4661104
WIP perhpas this is the texture unifrom
alloncm Oct 8, 2025
4e40d00
Working but renders the image opposite
alloncm Oct 10, 2025
1c81197
Rendering now works
alloncm Oct 10, 2025
6d38b78
Add joypad and render fixed scale
alloncm Oct 11, 2025
7db117e
Refactor the update viewport callback
alloncm Oct 11, 2025
338a79a
Clean gl impl
alloncm Oct 11, 2025
b23f495
Add docs and header
alloncm Oct 11, 2025
1675ede
Fix framerate
alloncm Oct 14, 2025
3a70712
WIP merge the GL into to SDL to gain better control on the rendering
alloncm Jan 4, 2026
ba04334
WIP refactor
alloncm Jan 9, 2026
3ca52f3
WIP
alloncm Jan 10, 2026
24fa08f
WIP antoher step
alloncm Jan 11, 2026
a01a119
Finnaly the SDL is working
alloncm Jan 17, 2026
a306ab8
Fix (without testing) the nx and the libretro
alloncm Jan 17, 2026
86d8a74
more fixes for the rpi
alloncm Jan 17, 2026
9838f97
Move the gl renderer to common
alloncm Feb 7, 2026
193f813
Fix the tests complication
alloncm Feb 7, 2026
b414989
Revert back the bump in sdl and rust and a few more fixes
alloncm Feb 26, 2026
247b159
Still does not compile
alloncm May 2, 2026
09761b8
make nx build faster
alloncm May 4, 2026
632749f
Fix sdl
alloncm May 4, 2026
0c4c199
Fix nx
alloncm May 4, 2026
8a5c326
Fix the gl load function
alloncm May 4, 2026
7ab2d58
Merge remote-tracking branch 'origin/feature/gl' into feature/gl
alloncm May 9, 2026
74c623e
Looks the previous issues are fixed
alloncm May 9, 2026
d805cd6
fix the choppy audio
alloncm May 9, 2026
c83a1e1
delete vscode lancnh config
alloncm May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"C_Cpp.clang_format_fallbackStyle": "WebKit",
"C_Cpp.default.includePath": [
"${DEVKITPRO}\\libnx\\include",
"${DEVKITPRO}\\devkitA64\\aarch64-none-elf\\include",
"${DEVKITPRO}\\devkitA64\\lib\\gcc\\aarch64-none-elf\\15.1.0\\include"
"${DEVKITPRO}/libnx/include",
"${DEVKITPRO}/portlibs/switch/include/*",
"${DEVKITPRO}/devkitA64/aarch64-none-elf/include",
"${DEVKITPRO}/devkitA64/lib/gcc/aarch64-none-elf/*/include"
],
"rust-analyzer.cargo.extraEnv": {
"RPI": "4"
Expand Down
45 changes: 36 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
"rpi",
"common",
"libretro",
"nx"
"nx",
]

[workspace.package]
Expand Down
33 changes: 9 additions & 24 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,6 @@ args = ["build", "--release", "--package", "magenboy_sdl"]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_sdl", "--features", "dbg"]

[tasks.sdl.linux]
args = ["build", "--release", "--package", "magenboy_sdl", "--no-default-features"]
dependencies = ["install_sdl2_linux"]

[tasks.sdl_dbg.linux]
args = ["build", "--release", "--package", "magenboy_sdl", "--no-default-features", "--features", "dbg"]
dependencies = ["install_sdl2_linux"]

[tasks.install_sdl2_linux]
script = [
"""
# returns early if the package was already installed and install it otherwise. The first
# argument is the package name to be checked (and installed if not already).
# other arguments are passed to apt-get
try_install() {
dpkg -l "$1" | grep -q ^ii && return 0
sudo apt-get -y install "$@"
return 0
}
try_install libsdl2-dev
"""
]

[tasks.rpios]
install_crate = {crate_name = "cross", binary = "cross", test_arg = "-h"}
install_crate_args=["--locked", "--version", "0.2.5"]
Expand Down Expand Up @@ -87,6 +64,14 @@ dependencies = ["add_android_target"]
command = "rustup"
args = ["target", "add", "aarch64-linux-android"]

[tasks.build_mabenboy_nx]
private = true
toolchain = "${nightly_version}"
command = "cargo"
args = ["build", "--release", "--package", "magenboy_nx", "--target", "aarch64-nintendo-switch-freestanding", "-Z", "build-std=core,compiler_builtins,alloc", "-Z", "build-std-features=compiler-builtins-mem"]
dependencies = ["nightly-install", "install_rust_src"]

[tasks.nx]
command = "docker"
args = ["build", "--progress=plain", ".", "--file", "nx/Dockerfile", "--target", "export", "--output=.", "--build-arg", "NIGHTLY=${nightly_version}"]
args = ["build", ".", "--file", "nx/Dockerfile", "--target", "export", "--output=." ]
dependencies = ["build_mabenboy_nx"]
6 changes: 3 additions & 3 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ magenboy_core = {path = "../core"}
log = "0.4"
cfg-if = "1"
libm = "0.2.15"
crossbeam-channel = {version = "0.5", optional = true}
fern = {version = "0.6", optional = true}
chrono = {version = "0.4", optional = true}
gl = { git = "https://github.com/alloncm/gl-rs.git", branch = "no_std", optional = true }

[features]
std = ["chrono", "fern", "crossbeam-channel", "alloc"]
std = ["chrono", "fern", "alloc"]
dbg = ["std"]
alloc = []
alloc = ["gl"]

[dev-dependencies]
criterion = "0.3"
Expand Down
13 changes: 13 additions & 0 deletions common/src/fragment.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#version 330 core

out vec4 FragColor;

in vec2 TexCoord;

// texture sampler
uniform sampler2D Texture;

void main()
{
FragColor = texture(Texture, TexCoord);
}
Loading
Loading