Re: Registering a class that takes a float*
Tony Kostanjsek <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
hi, Maybe it's easier for you if you write more specific get functions (glGetVec2/3/4, glGetMatrix etc.) that return a struct instead of creating bindings for functions with float arrays? best, Tony ----- Ursprüngliche Mail ---- Von: beo wulf <[email protected]> An: [email protected] Gesendet: Mittwoch, den 5. Januar 2011, 3:43:40 Uhr Betreff: [luabind] Registering a class that takes a float* I want to register this function. GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ); I also have a : GLfloat* get_raw(boost::shared_ptr<std::vector<GLfloat> > p) { return &( (*p)[0] ); } I know that I can do: .def( "glGetFloatv", &glGetFloatv) .def( "get_raw", &get_raw); However, I don't know what types I need to register so that Luabind will understand the GLfloat* type I.e. make the following work: blah.lua: glGetFloatv(some_constant, some_vector:get_raw()); Thanks! ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ luabind-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luabind-user ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl