Closed maierfelix closed 1 year ago
Lets give it a better name than "Update" :)
Lets give it a better name than "Update" :)
Not sure if I can think of a better name^^
Not sure if I can think of a better name^^
I can't think of a worse name :) See my changed title
You have linker errors on some platforms:
Undefined symbols for architecture x86_64:
"TimeQuery::Stop()", referenced from:
AddGraphics(lobster::NativeRegistry&)::$_99::__invoke(lobster::Value*&, lobster::VM&, lobster::Value&) in graphics.o
"TimeQuery::Start()", referenced from:
AddGraphics(lobster::NativeRegistry&)::$_98::__invoke(lobster::Value*&, lobster::VM&, lobster::Value&) in graphics.o
"vtable for TimeQuery", referenced from:
AddGraphics(lobster::NativeRegistry&)::$_97::__invoke(lobster::Value*&, lobster::VM&) in graphics.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
I guess gltimequery.cpp
is not added on the mac.. I can fix that.
The failures on Android/Wasm is because you use the Query
functions that don't exist on those platforms, please surround their use with #ifdef PLATFORM_WINNIX
(platforms that have OpenGL 4.x) and in the #else
case just return some default value.
Seems clang is now unhappy about:
/home/runner/work/lobster/lobster/dev/src/gltexture.cpp: In function ‘uint16_t FloatToHalfFloat(float)’:
/home/runner/work/lobster/lobster/dev/src/gltexture.cpp:37:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
37 | uint32_t b = (*(uint32_t*)&x) + 0x00001000;
| ^~~~~~~~~~~~~
Maybe we can replace (*(uint32_t*)&x)
by this kind of code:
int2float i2f;
i2f.f = x;
i2f.i
Ok, lets merge this for now, we will fix issues separately
A rough overview of what this adds: