コード例 #1
0
ファイル: r_skin.c プロジェクト: Picmip/qfusion
/*
* R_RegisterSkinFile
*/
skinfile_t *R_RegisterSkinFile( const char *name ) {
	skinfile_t *skinfile;

	skinfile = R_SkinFileForName( name );
	if( skinfile && skinfile->registrationSequence != rsh.registrationSequence ) {
		int i;

		skinfile->registrationSequence = rsh.registrationSequence;
		for( i = 0; i < skinfile->numpairs; i++ ) {
			R_TouchShader( skinfile->pairs[i].shader );
		}
	}
	return skinfile;
}
コード例 #2
0
ファイル: r_skm.c プロジェクト: codetwister/qfusion
/*
* Mod_TouchSkeletalModel
*/
static void Mod_TouchSkeletalModel( model_t *mod )
{
	unsigned int i;
	mskmesh_t *mesh;
	mskskin_t *skin;
	mskmodel_t *skmodel = ( mskmodel_t * )mod->extradata;

	mod->registrationSequence = rsh.registrationSequence;

	for( i = 0, mesh = skmodel->meshes; i < skmodel->nummeshes; i++, mesh++ ) {
		// register needed skins and images
		skin = &mesh->skin;
		if( skin->shader ) {
			R_TouchShader( skin->shader );
		}
		if( mesh->vbo ) {
			R_TouchMeshVBO( mesh->vbo );
		}
	}
}
コード例 #3
0
/*
* Mod_TouchAliasModel
*/
static void Mod_TouchAliasModel( model_t *mod )
{
	int i, j;
	maliasmesh_t *mesh;
	maliasskin_t *skin;
	maliasmodel_t *aliasmodel = ( maliasmodel_t * )mod->extradata;

	mod->registrationSequence = rf.registrationSequence;

	for( i = 0, mesh = aliasmodel->meshes; i < aliasmodel->nummeshes; i++, mesh++ ) {
		// register needed skins and images
		for( j = 0, skin = mesh->skins; j < mesh->numskins; j++, skin++ ) {
			if( skin->shader ) {
				R_TouchShader( skin->shader );
			}
		}

		if( mesh->vbo ) {
			R_TouchMeshVBO( mesh->vbo );
		}
	}
}