[Bf-committers] Access to object during drawing

Antony Riakiotakis kalast at gmail.com
Wed Apr 9 00:48:49 CEST 2014


Hi,

For the new code that displays meshes in texture paint for gsoc, I will
need access to the material at gpu buffer build time. This in turn requires
access to the object, since the code only has access to the derived mesh.

Is there some way to get it? I can only see getting this through
GPUMaterialState but I'm not sure if such a way is nice due to using a
global variable. I see we also have some other uses of global variables
such as  Gtexdraw.

Maybe adding an extra Object pointer to the derived mesh would help here?

Access to the Object would solve some other nice stuff we have, such as
allocating MAXMAT arrays on the stack at GPU buffer creation time.


More information about the Bf-committers mailing list