D with DerelictASSIMP3 question

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 1 18:57:14 PST 2016


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?



More information about the Digitalmars-d-learn mailing list