Can you create a TextureMap in code?
Sighman
Posts: 56
I am trying to create a TextureMap shader in code, I can create the shader easily enough but the 'TMap' parameter is NULL by default. I've searched all the headers and there are no methods that I can find to create a IShTextureMap, at least not directly. Maybe there is another way to do it that I missed.
Any help would be appreciated.
Comments
Use gShell3DUtilities->CreateTextureMapShader for building your shader
and how to build the actual texture
Regards,
Thanks again Eric, you are a wonder.
The secret line I was looking for was
gComponentUtilities->CoCreateInstance(CLSID_TextureMap, NULL, MC_CLSCTX_INPROC_SERVER, IID_IShTextureMap, (void**) &texture;);
The rest or your example is an extra + bonus.
I might actually get this project finished one day ;)
-Simon