And I forgot to mention one more question:
3) I have a VGTracerObject base C++ class which is for example inherited by
VGTracerMeshObject. This class is created and setup in JavaScript. When I
use it in C++ inheritance does not work for me. Always the base class
version of my functions are invoked, never the inherited functions. I use
Embind to set up the classes.
My bindings look like this:
class_<VGTracerObject>("VGTracerObject")
.constructor<>()
.function("intersect", &VGTracerObject::intersect)
;
class_<VGTracerMeshObject>("VGTracerMeshObject")
.constructor<uintptr_t, unsigned int>()
.function("intersect", &VGTracerMeshObject::intersect)
.function("setMaterial", &VGTracerMeshObject::setMaterial,
emscripten::allow_raw_pointers())
;
In C++ always intersect of VGTracerObject is invoked, never of
VGTracerMeshObject when the class is created in JavaScript and passed
onwards to the C++ based tracer.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.