Registering a class that takes a float*
beo wulf <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
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