Skip to content

Instantly share code, notes, and snippets.

@rodrigobmg
rodrigobmg / links.md
Created October 3, 2018 03:05 — forked from Leandros/links.md
Writing a Modern Rendering Engine
@rodrigobmg
rodrigobmg / lop.h
Created April 11, 2018 16:09 — forked from leegao/lop.h
Lua Bytecode
// from lopcodes.h
/*
** R(x) - register
** Kst(x) - constant (in constant table)
** RK(x) == if ISK(x) then Kst(INDEXK(x)) else R(x)
*/
// Here, x can be three things
// x can be a variable denoting a register (its 8th bit is 0), in which case R(x) returns the value of the x-th register