-void PicoSetSurfaceName( picoSurface_t *surface, char *name )
+void PicoSetSurfaceName( picoSurface_t *surface, const char *name )
{
if( surface == NULL || name == NULL )
return;
void PicoAddTriangleToModel( picoModel_t *model, picoVec3_t** xyz, picoVec3_t** normals,
int numSTs, picoVec2_t **st, int numColors, picoColor_t **colors,
- picoShader_t* shader, picoIndex_t* smoothingGroup )
+ picoShader_t* shader, const char *name, picoIndex_t* smoothingGroup )
{
int i,j;
int vertDataIndex;
for ( i = 0 ; i < model->numSurfaces ; i++ )
{
workSurface = model->surface[i];
+ if ( !name || !strcmp(workSurface->name, name) )
if ( workSurface->shader == shader )
{
break;
/* do surface setup */
PicoSetSurfaceType( workSurface, PICO_TRIANGLES );
- PicoSetSurfaceName( workSurface, shader->name );
+ PicoSetSurfaceName( workSurface, name ? name : shader->name );
PicoSetSurfaceShader( workSurface, shader );
}