lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alex wrote:
> I've ran it again and uploaded the results to the same URLs. Looks like the
> backtrace is pointing to 0xb74a8877 (line 1413 of the jdump).

Umm, what's your declaration for glTexCoord2fv()? Because it looks
like you used __stdcall, but the actual function is a plain
__cdecl (or behaves as such). This causes the C stack to get
misaligned in the JIT-compiled code on x86 and bad things happen.

Could it be that you used __stdcall declarations for Linux, too?
That's certainly wrong, as these are only used under Windows.

BTW: You can just leave __stdcall out and it'll be auto-detected
by the LuaJIT FFI on Windows.

[__stdcall is a legal calling convention on all x86 platforms, but
rarely used outside of Windows. The declaration is ignored on x64,
so you got away with it there.]

BTW: Whatever you're doing to resolve GL function calls is rather
inefficient. That's the stuff around lujgl.lua:39.

--Mike