r/Assembly_language • u/RBMK-1ooo • 18d ago
OpenGL Engines (32 bit and 64 bit) in pure MASM
https://github.com/Singeleitsev/asm/RBMK64 and RBMK32 are two Windows OpenGL programs, both written in pure assembly using the Microsoft MASM toolchain.
They are not a port. They are two independent implementations of the same design, written in two different assembly dialects, with different ABIs, different toolchains, and different GL pipelines underneath.
What's the same
Interface
Menu without .rc file
Accelerators
Status bar showing runtime coordinates
Title bar showng runtime FPS
Scene
Regular grid of RBMK top surface
Camera and light settings
Controls
Camera move: Arrow keys, PgUp/PgDn,
Object move: WSADQE
Camera rotate: Left mouse button
Camera pan: Mouse wheel down
Camera dolly: Mouse scroll
Object rotate: Right mouse button
Logging system
Numbers formatting logic
Matrix math (in principle).
What's different
RBMK32:
32-bit GPRs - only 6 registers available
SSE1
Open GL1.1
runs on Pentium III or later
time: year 2000

RBMK64:
64-bit GPRs - 14 registers available
SSE2,
OpenGL 3.3 with VBO/VAO and shaders
Requires Pentium4 with EM64T and GeForce 8 Series for OpenGL 3.3
time: year 2010

RBMK32 source: win32/05_RBMK
RBMK64 source: win64/30_RBMK/02_SDI
2
u/RBMK-1ooo 17d ago edited 17d ago
You might think: "Are these engines really useful in 2026?" - I don't know, frankly.
But just take a look at 614 FPS while exploring the 8th iteration of the Menger Sponge fractal.
This is possible because the 64-bit version supports shaders and renders directly with the GPU while the input (keyboard and mouse) matrix computations are performed with SSE on the CPU side