Original Post
I looked through the developers forum and did not find an answer to this. I have a problem retrieving the userdata from the calcorematerial for texture mapping. I'm using the code from the miniviewer for cal3d ...it's layed out very differently but the same code. I've error tested and I am getting the texture filename and loading in the texture and getting and setting a valid id in the userdata. It's when I try to retrieve it in the render loop from the model instance (calRenderer) that I have problems. The renderer returns 0 for getMapCount for the selected mesh. I'm not sure exactly what I'm doing wrong. Thanks for any assistance. edit: After further testing it seems that the pCalRenderer->getMapUserData(0) line is not getting the user data of the currently selected mesh correctly in the render loop. I manually just grabbed the coreMaterial of the first mesh and got it's user data and there was the correct texture id of the first mesh. I'm still in a bit of a jam as there are more meshes than materials so I can't just use the mesh id to get the material...and I rather feel like I'm trying to re-write on my side what cal3d should already be doing. So I'm still not sure what I'm doing wrong here. [Edited by - danto on November 26, 2005 7:04:36 PM]