[Plib-users] RE: How to determine surface material by ssgState texture fi lename ?
Brought to you by:
sjbaker
From: McEvoy, N. <nic...@ds...> - 2002-12-05 06:24:58
|
Sorry I'm answering my own question ... I think I now understand what TuxKart is doing (in Material.cxx). The idea is: - use ssgSetAppStateCallback() to register that you want to create your own ssgStates when the model is loaded. So depending on the texture filename I create my own state (similar to TuxKart Material.h/cxx). Then this is what I can get to in the ssgHit->leaf->getState() thus having a simple integer flag to tell me the material type (instead of having to do a strcmp on the filename). Just brilliant !!! :) Sorry to trouble you all ... :) Nick |