Ok, this one has me completely stumped. I'm trying to cull polys based on their texture name. More specifically, I'm loading a Quake 3 BSP, and I want keep the renderer from drawing any faces that use the texture "null.jpg". Seems simple enough. I have something like this:
(not actual code, but the nearly the same thing.Code:for(int i=0; i<numQ3bspFaces; i++){ Q3BSPFace *pTri = &q3bspFace[i]; int materialIndex = pTri->texID; string::size_type loc = texMgr->textures[q3bspMaterial[materialIndex][0]]->name.find("null"); if(loc == string::npos){ //"null" not found, so draw normally } }
However, it still draws everything anyway. I have no idea why. I had it working once, but then I tried to change the texture that prevents rendering, and it stopped working again. I've also tried having the if statement use a goto statement, but to no avail.
Please help. Please tell me i'm just doing something stupid. Because it really doesn't make much sense to me.
Thanks.
EDIT: I should also mention that I know that there are faces in the mesh using the texture. In fact, a test mesh I have all use that texture, but it's still rendered.



LinkBack URL
About LinkBacks



Usually is the case for me.