Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualAndreas Jonsson

Posted 20 December 2012 - 11:55 AM

I believe this is actually a problem with how the vector3 type is registered and not the ABI implementation that you've been working on.

Take a look in the scriptmath3d.cpp function RegisterScriptMath3D_Native().



void RegisterScriptMath3D_Native(asIScriptEngine *engine)

{

int r;

// Register the type

r = engine->RegisterObjectType("vector3", sizeof(Vector3), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK); assert( r >= 0 );





I believe addding the asOBJ_APP_CLASS_ALLFLOATS flag will make the tests pass successfully.

#2Andreas Jonsson

Posted 20 December 2012 - 11:54 AM

I believe this is actually a problem with how the vector3 type is registered and not the ABI implementation that you've been working on.

Take a look in the scriptmath3d.cpp function RegisterScriptMath3D_Native(). The type needs to be registered with asOBJ_APP_CLASS_ALLFLOATS, i.e.


void RegisterScriptMath3D_Native(asIScriptEngine *engine)

{

int r;

// Register the type

r = engine->RegisterObjectType("vector3", sizeof(Vector3), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK); assert( r >= 0 );





I believe addding the asOBJ_APP_CLASS_ALLFLOATS flag will make the tests pass successfully.

#1Andreas Jonsson

Posted 20 December 2012 - 11:53 AM

I believe this is actually a problem with how the vector3 type is registered and not the ABI implementation that you've been working on.

Take a look in the scriptmath3d.cpp function RegisterScriptMath3D_Native(). The type needs to be registered with asOBJ_APP_CLASS_ALLFLOATS, i.e.

void RegisterScriptMath3D_Native(asIScriptEngine *engine)
{
int r;
// Register the type
r = engine->RegisterObjectType("vector3", sizeof(Vector3), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | [b]asOBJ_APP_CLASS_ALLFLOATS[/b]); assert( r >= 0 );


I believe addding this flag will make the tests pass successfully.

PARTNERS