[GEM-dev] modelloader plugins

IOhannes m zmölnig zmoelnig at iem.at
Tue Oct 21 18:25:38 CEST 2014


hi all,

thanks to antoine, we now have working modelloaders again (the default
OBJ-loader, one based on the old assimp2 API and a shiny new one based
on assimp3).

cool!

however, i'd like to make some more (minor, cosmetic) changes to the
modelloader API, but wanted to discuss them beforehand:
(this is mainly directed at antoine, but others should chime in).

the current API (src/plugins/modelloader.h) looks like (simplified):

   float* getVector(std::string);
   VBOarray getVBOarray();

with VBOarray being a stripped down version of gem::VertexBuffer
(Gem/VertexBuffer.h), just containing the float-array and type.
it's a custom type defined in modelloader.h

is there any specific reason not to directly use gem::VertexBuffer for
returning the data from the modelloader?
the VertexBuffer contains all the data that is needed (float-array,
type) plus some more that should actually be returned (dimension,
stride) plus some that is not needed by the modelloader-API (e.g. vbo-ID)

this might simplify the API slightly to:
  VertexBuffer getVector(int type);
  vector<VertexBuffer> getVectors();

mfg.hj.iuo
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20141021/20cfdf7c/attachment.sig>


More information about the GEM-dev mailing list