digitalmars.D.learn - D with DerelictASSIMP3 question
- WhatMeWorry (22/22) Feb 01 2016 I'm porting a C++/opengl/AssImp tutorial over to
- Maeriden (3/7) Feb 01 2016 Try aiGetMaterialTextureCount.
- Mike Parker (2/4) Feb 01 2016 It uses the C API exclusively.
I'm porting a C++/opengl/AssImp tutorial over to
D/DerelictOpenGL/DerelictAssImp
but have hit a brick wall.
It's a fairly large project but a tiny fragment suffices:
if(mesh.mMaterialIndex >= 0)
{
const aiMaterial* material =
scene.mMaterials[mesh.mMaterialIndex];
// uint texCount =
material.GetTextureCount(aiTextureType_SPECULAR);
Everything compiles fine.
But when I uncomment the call to GetTextureCount(), the Visual
Studio D compiler comes back with:
ModelClass.d(165): Error: no property 'GetTextureCount' for type
'const(aiMaterial*)'
I looked at AssImp documentation at
http://assimp.sourceforge.net/lib_html/structai_material.html
And it shows
unsigned int GetTextureCount (aiTextureType type) const
Get the number of textures for a particular texture type.
So it seems like such a simple error, but I've been stuck for
days. Any suggestions?
Feb 01 2016
On Tuesday, 2 February 2016 at 02:57:14 UTC, WhatMeWorry wrote:I'm porting a C++/opengl/AssImp tutorial over to D/DerelictOpenGL/DerelictAssImp but have hit a brick wall. [...]Try aiGetMaterialTextureCount. I'm guessing derelict uses the C API as much as it can.
Feb 01 2016
On Tuesday, 2 February 2016 at 03:22:16 UTC, Maeriden wrote:Try aiGetMaterialTextureCount. I'm guessing derelict uses the C API as much as it can.It uses the C API exclusively.
Feb 01 2016








Mike Parker <aldacron gmail.com>