コード例 #1
0
ファイル: tapehelp.cpp プロジェクト: artemeliy/inf4715
void TapeHelpCreationManager::CreateNewObject()
{
    tapeObject = (TapeHelpObject*)cDesc->Create();
    lastPutCount = theHold.GetGlobalPutCount();

    macroRec->BeginCreate(cDesc);
    // Start the edit params process
    if ( tapeObject ) {

        tapeObject->SetAFlag(A_OBJ_LONG_CREATE);
#ifndef NO_CREATE_TASK  // russom - 12/04/01
        tapeObject->BeginEditParams( (IObjParam*)createInterface, BEGIN_EDIT_CREATE, NULL );
#endif
    }
}
コード例 #2
0
ファイル: surfwrap.cpp プロジェクト: 2asoft/xray
void CreateSWrapObjectProc::CreateNewObject()
	{
	SWrapObj = (SWrapObject*)cDesc->Create();
	lastPutCount  = theHold.GetGlobalPutCount();
	
	// Start the edit params process
	if ( SWrapObj ) {
#ifndef NO_CREATE_TASK	// russom - 12/04/01
		SWrapObj->BeginEditParams( (IObjParam*)createInterface, BEGIN_EDIT_CREATE, NULL );
#endif
#ifdef _OSNAP
		SWrapObj->SetAFlag(A_OBJ_LONG_CREATE);
#endif
		}	
	}
コード例 #3
0
ファイル: ViewportLoader.cpp プロジェクト: artemeliy/inf4715
void ViewportLoader::LoadEffect(ClassDesc * pd)
{

	ReferenceTarget * newEffect;
	ReferenceTarget * oldEffect;

	if (theHold.Holding())
	{
		oldEffect = effect;

//		theHold.Suspend(); 


		if(pd == NULL){
			newEffect = NULL;
		}
		else{
			newEffect = (ReferenceTarget *)pd->Create(FALSE);
			DbgAssert(newEffect && _M("Plug-in instance creation failed. Possible cause: deferred plug-in failed to load."));
			if(!newEffect)
			{
				// maybe deferred
				ClassDesc * def = FindandLoadDeferedEffect(pd);
				if(def)
				{
					newEffect = (ReferenceTarget *)def->Create(FALSE);
				}

			}

		}

//		theHold.Resume(); 

		if (theHold.Holding())
			theHold.Put(new AddEffectRestore(this,oldEffect,newEffect));

		SwapEffect(newEffect);
	}
}
コード例 #4
0
ファイル: ViewportLoader.cpp プロジェクト: artemeliy/inf4715
void ViewportLoader::LoadEffectsList()
{
	// loads static shader list with name-sorted Shader ClassDesc*'s
	bool bdx9 = false;

	GraphicsWindow *gw = NULL;

	ViewExp& vpt = GetCOREInterface()->GetActiveViewExp();	

	if(vpt.IsAlive())
	{
		gw = vpt.getGW();
		if(gw && gw->GetInterface(D3D9_GRAPHICS_WINDOW_INTERFACE_ID))
	{
		bdx9 = true;
	}
		
	}

	effectsList.ZeroCount();
	SubClassList* scList = GetCOREInterface()->GetDllDir().ClassDir().GetClassList(REF_TARGET_CLASS_ID);
	theHold.Suspend(); // LAM - 3/24/03 - defect 446356 - doing a DeleteThis on created effects, need to make sure hold is off
	for (long i = 0, j = 0; i < scList->Count(ACC_ALL); ++i) {
		if ( (*scList)[ i ].IsPublic() ) {
			ClassDesc* pClassD = (*scList)[ i ].CD();
			const TCHAR *cat = pClassD->Category();
			TCHAR *defcat = GetString(IDS_DX_VIEWPORT_EFFECT);
			if ((cat) && (_tcscmp(cat,defcat) == 0)) 
			{
			
				ReferenceTarget * effect = (ReferenceTarget *)pClassD->Create(TRUE);
				if(effect)
				{

					IDX9DataBridge * vp = (IDX9DataBridge*)effect->GetInterface(VIEWPORT_SHADER9_CLIENT_INTERFACE);
					if( vp)
					{
						if(bdx9)
						{
							
							if(vp->GetDXVersion() >=9.0f || vp->GetDXVersion() == 1.0f)
							{
								effectsList.Append(1, &pClassD);
							}
						}
						else
						{
							if(vp->GetDXVersion() < 9.0f)
							{
								effectsList.Append(1, &pClassD);
							}

						}
					}
					else
					{
						IDXDataBridge * vp = (IDXDataBridge*)effect->GetInterface(VIEWPORT_SHADER_CLIENT_INTERFACE);
						if(vp && !bdx9)
						{
							effectsList.Append(1, &pClassD);
						}
					}

					effect->MaybeAutoDelete();
				}
			}

		}
	}
	theHold.Resume();
	effectsList.Sort(&classDescListCompare);
}