当前位置: 首页>>代码示例>>C++>>正文


C++ Uninitialize函数代码示例

本文整理汇总了C++中Uninitialize函数的典型用法代码示例。如果您正苦于以下问题:C++ Uninitialize函数的具体用法?C++ Uninitialize怎么用?C++ Uninitialize使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Uninitialize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: NazaraError

bool NzAudio::Initialize()
{
	if (s_moduleReferenceCounter++ != 0)
		return true; // Déjà initialisé

	// Initialisation des dépendances
	if (!NzCore::Initialize())
	{
		NazaraError("Failed to initialize core module");
		Uninitialize();

		return false;
	}

	// Initialisation d'OpenGL
	if (!NzOpenAL::Initialize())
	{
		NazaraError("Failed to initialize OpenAL");
		Uninitialize();

		return false;
	}

	// Définition de l'orientation par défaut
	SetListenerDirection(NzVector3f::Forward());

	// Loaders
	NzLoaders_sndfile_Register();

	NazaraNotice("Initialized: Audio module");

	return true;
}
开发者ID:Moumou38,项目名称:NazaraEngine,代码行数:33,代码来源:Audio.cpp

示例2: Uninitialize

/*****************************************************************************************
Initialize
*****************************************************************************************/
int CUnMAC::Initialize(IAPEDecompress *pAPEDecompress) 
{
    // uninitialize if it is currently initialized
    if (m_bInitialized)
        Uninitialize();

    if (pAPEDecompress == NULL)
    {
        Uninitialize();
        return ERROR_INITIALIZING_UNMAC;
    }

    // set the member pointer to the IAPEDecompress class
    m_pAPEDecompress = pAPEDecompress;

    // set the last decode frame to -1 so it forces a seek on start
    m_LastDecodedFrameIndex = -1;

    m_pAPEDecompressCore = new CAPEDecompressCore(GET_IO(pAPEDecompress), pAPEDecompress);
    m_pPrepare = new CPrepare;

    // set the initialized flag to TRUE
    m_bInitialized = TRUE;
    
    m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (long) &m_wfeInput);

    // return a successful value
    return ERROR_SUCCESS;
}
开发者ID:Kr0nZ,项目名称:boxee,代码行数:32,代码来源:UnMAC.cpp

示例3: RETURN_IF

void BaseProgramRenderPass::Link()
{
	RETURN_IF(mProgramState->Program()==0||mIsLinked);
	SAFE_DELETE_DICTIONARY_VALUE(mUniforms);
	SAFE_DELETE_DICTIONARY_VALUE(mAttributes);

	uint program=mProgramState->Program();
	Render::Instance().LinkProgram(program);
	int outLinkStatus=Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::LinkStatus);

	if (!outLinkStatus)
	{
		//link error
		int outInfoLogLength=Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::InfoLogLength);

		HeapString infoLog((size_t)outInfoLogLength+1,true);
		Render::Instance().GetProgramInfoLog(program,infoLog);
		Log::FormatError("Failed to link effect:{}",infoLog.Buffer());
		Uninitialize();
		return ;
	}

	Render::Instance().ValidateProgram(program);
	int outValidateStatus=Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::ValidateStatus);

	if (!outValidateStatus)
	{
		//link error
		int outInfoLogLength=Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::InfoLogLength);

		HeapString infoLog((size_t)outInfoLogLength+1,true);
		Render::Instance().GetProgramInfoLog(program,infoLog);
		Log::FormatError("Failed to validate effect:{}",infoLog.Buffer());
		Uninitialize();
		return;
	}
	RenderStateMachine::Instance().Push(mProgramState);

	//add all uniforms
	uint uniformCount=(uint)Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::ActiveUniformCount);
	uint maxUniformNameLength=(uint)Render::Instance().GetProgramStatus(program,GraphicsProgramStatus::MaxActiveUniformNameLength);
	HeapString outName((size_t)maxUniformNameLength+1,true);
	FOR_EACH_SIZE(i,uniformCount)
	{
		int outSize;
		uint outDataType;
		Render::Instance().GetActiveUniformName(program,static_cast<uint>(i),outSize,outDataType,outName);
		int index= Render::Instance().GetUniformLocation(program,outName);	//NOTE: Cannot use i as index
		ShaderUniform* uniform=new ShaderUniform(this,index,outName,(GraphicsUniformDataType)outDataType);
		mUniforms.Add(outName,uniform);
	}
开发者ID:fjz13,项目名称:Medusa,代码行数:51,代码来源:BaseProgramRenderPass.cpp

示例4: FOR_EACH_TO

bool EffectRenderGroup::Uninitialize()
{
	FOR_EACH_TO(mGroups, Uninitialize());

	FOR_EACH_ITEM_CLEAR(mGroups, MaterialRenderGroupPool::Instance().Recycle);
	return true;
}
开发者ID:fjz13,项目名称:Medusa,代码行数:7,代码来源:EffectRenderGroup.cpp

示例5: Uninitialize

void COXNetBrowseTree::PostNcDestroy() 
{
	// Unitialize the control
	Uninitialize();

	CTreeCtrl::PostNcDestroy();
}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:7,代码来源:OXNetBrowseTree.cpp

示例6: Initialize

CLStatus CLMessageLoopManager::EnterMessageLoop(void *pContext)
{
	CLStatus s = Initialize();
	if(!s.IsSuccess())
	{
		CLLogger::WriteLogMsg("In CLMessageLoopManager::EnterMessageLoop(), Initialize error", 0);
		return CLStatus(-1, 0);
	}
	
	while(true)
	{
		CLMessage *pMsg = WaitForMessage();
		if(pMsg == 0)
		{
			CLLogger::WriteLogMsg("In CLMessageLoopManager::EnterMessageLoop(), pMsg == 0", 0);
			continue;
		}
		
		CLStatus s3 = DispatchMessage(pMsg);

		delete pMsg;

		if(s3.m_clReturnCode == QUIT_MESSAGE_LOOP)
			break;
	}

	CLStatus s4 = Uninitialize();
	if(!s4.IsSuccess())
	{
		CLLogger::WriteLogMsg("In CLMessageLoopManager::EnterMessageLoop(), Uninitialize() error", 0);
		return CLStatus(-1, 0);
	}

	return CLStatus(0, 0);
}
开发者ID:unix1986,项目名称:universe,代码行数:35,代码来源:CLMessageLoopManager.cpp

示例7: Uninitialize

bool BaseProgramRenderPass::Initialize()
{
	if (mProgramState->Program()!=0)
	{
		Uninitialize();
	}

	uint newProgram=Render::Instance().CreateProgram();
	RETURN_FALSE_IF_ZERO(newProgram);
	mProgramState->SetProgram(newProgram);
	if (mVertexShader!=nullptr)
	{
		Render::Instance().AttachShader(newProgram,mVertexShader->Shader());
	}

	if (mPixelShader!=nullptr)
	{
		Render::Instance().AttachShader(newProgram,mPixelShader->Shader());
	}

	if (!IsLinked())
	{
		Link();
	}

	return true;	
}
开发者ID:fjz13,项目名称:Medusa,代码行数:27,代码来源:BaseProgramRenderPass.cpp

示例8: Initialize

CLStatus CLMessageLoopManager::EnterMessageLoop(void *pContext)
{
	SLExecutiveInitialParameter *para = (SLExecutiveInitialParameter *)pContext;
	CLStatus s = Initialize();//队列(管道,网络等对象)等的初始化工作
	if(!s.IsSuccess())
	{
		throw "In CLMessageLoopManager::EnterMessageLoop(), Initialize() error.";
		para->pNotifier->NotifyInitialFinished(false);
		return CLStatus(-1,0);
	}
	CLStatus s1 = m_pMessageOberver->Initialize(this,para->pContext);//初始化CLMessageOberver对象,如注册不同消息的处理方法
	if(!s1.IsSuccess())
	{
		throw "In CLMessageLoopManager::EnterMessageLoop(), m_pMessageOberver->Initialize error.";
		para->pNotifier->NotifyInitialFinished(false);
		return CLStatus(-1,0);
	}
	para->pNotifier->NotifyInitialFinished(true);

	while(true)
	{
		CLMessage *pMsg = WaitForMessage();
		CLStatus s3 = DispatchMessage(pMsg);
		if(s3.m_clReturnCode == QUIT_MESSAGE_LOOP)  //注意此退出返回码要与QUIT_MESSAGE_LOOP保持一致
			break;
		delete pMsg;
	}
	delete m_pMessageOberver; //所有消息处理完毕,删除消息处理方法CLMessageOberver对象
	m_pMessageOberver = 0;  //这里加入了赋值语句,使得m_pMessageOberver = 0,因为在本类的析构中还释放了一次,造成segmentation fault
	CLStatus s4 = Uninitialize();//反初始化队列(管道,网络等对象)等
	return CLStatus(0,0);
}
开发者ID:ashimidashajia,项目名称:LibExcutor,代码行数:32,代码来源:CLMessageLoopManager.cpp

示例9: WelsLog

CWelsH264SVCEncoder::~CWelsH264SVCEncoder() {
  if (m_pWelsTrace) {
    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsH264SVCEncoder::~CWelsH264SVCEncoder()");

#ifdef REC_FRAME_COUNT
    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
             "CWelsH264SVCEncoder::~CWelsH264SVCEncoder(), m_uiCountFrameNum= %d, m_iCspInternal= 0x%x", m_uiCountFrameNum,
             m_iCspInternal);
#endif
  }

#ifdef REC_FRAME_COUNT
  m_uiCountFrameNum = 0;
#endif//REC_FRAME_COUNT

#ifdef OUTPUT_BIT_STREAM
  if (m_pFileBs) {
    WelsFclose (m_pFileBs);
    m_pFileBs = NULL;
  }
  if (m_pFileBsSize) {
    WelsFclose (m_pFileBsSize);
    m_pFileBsSize = NULL;
  }
  m_bSwitch	= false;
  m_iSwitchTimes	= 0;
#endif//OUTPUT_BIT_STREAM

  Uninitialize();

  if (m_pWelsTrace) {
    delete m_pWelsTrace;
    m_pWelsTrace = NULL;
  }
}
开发者ID:Momo-FW,项目名称:openh264,代码行数:35,代码来源:welsEncoderExt.cpp

示例10: UninitializeRenderer

CGraphics::~CGraphics(void)
{
	UninitializeRenderer();
	UninitializeDisplay();
	UninitializeTimer();
	Uninitialize();
}
开发者ID:m1h4,项目名称:Analyzed,代码行数:7,代码来源:Graphics.cpp

示例11: _tmain

int _tmain(int argc, _TCHAR* argv[])
{	
	Initialize();

	const int bufferLen = 1024;
	unsigned char* buffer = (unsigned char*)malloc(bufferLen * sizeof(unsigned char));
	buffer[0] = '\0';
	
	printf("presentation slide index: %d\n", PresentationCurrentSlideIndex());

	PresentationCurrentSlideNote(buffer, bufferLen);
	printf("presentation note: %s\n", buffer);

	PresentationCurrentSlideName(buffer, bufferLen);
	printf("slide name: %s\n", buffer);

	printf("saving presentation slides thumbnails...\n");
	RefreshPresentationSlidesThumbnail();

	/*printf("gonna goto previous slide...\n");
	system("pause");
	PresentationPreviousSlide();

	printf("gonna goto next slide...\n");
	system("pause");
	PresentationNextSlide();*/
	
	Uninitialize();

	printf("Test finished\n");
	system("pause");

	return 0;
}
开发者ID:phutidus,项目名称:ksdust,代码行数:34,代码来源:Test.c

示例12: WelsLog

int CWelsH264SVCEncoder::InitializeExt (const SEncParamExt* argv) {
  if (m_pWelsTrace == NULL) {
    return cmMallocMemeError;
  }

  WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsH264SVCEncoder::InitEncoder(), openh264 codec version = %s",
           VERSION_NUMBER);

  if (NULL == argv) {
    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::InitializeExt(), invalid argv= 0x%p",
             argv);
    return cmInitParaError;
  }

  SWelsSvcCodingParam	sConfig;
  // Convert SEncParamExt into WelsSVCParamConfig here..
  if (sConfig.ParamTranscode (*argv)) {
    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
             "CWelsH264SVCEncoder::InitializeExt(), parameter_translation failed.");
    TraceParamInfo (&sConfig);
    Uninitialize();
    return cmInitParaError;
  }

  return InitializeInternal (&sConfig);
}
开发者ID:ChristyAJones,项目名称:openh264,代码行数:26,代码来源:welsEncoderExt.cpp

示例13: Uninitialize

CShader::~CShader()
{
    if (IsInitialized())
    {
        Uninitialize();
    }
}
开发者ID:BeyondEngine,项目名称:BeyondEngine,代码行数:7,代码来源:Shader.cpp

示例14: flags

	bool DebugDrawer::Initialize()
	{
		if (!s_initialized)
		{
			// s_shader
			s_shader = ShaderLibrary::Get("DebugSimple");
			s_colorLocation = s_shader->GetUniformLocation("Color");

			// s_vertexBuffer
			try
			{
				ErrorFlags flags(ErrorFlag_ThrowException, true);
				s_vertexBuffer.Reset(VertexDeclaration::Get(VertexLayout_XYZ), 65365, DataStorage_Hardware, BufferUsage_Dynamic);
			}
			catch (const std::exception& e)
			{
				NazaraError("Failed to create buffer: " + String(e.what()));

				Uninitialize();
				return false;
			}

			s_primaryColor = Color::Red;
			s_renderStates.parameters[RendererParameter_DepthBuffer] = true;
			s_secondaryColor = Color::Green;

			s_initialized = true;
		}

		return true;
	}
开发者ID:GigAnon,项目名称:NazaraEngine,代码行数:31,代码来源:DebugDrawer.cpp

示例15: Uninitialize

FileStorage::~FileStorage()
{
	//SIREN_BODY_DESTRUCT_BEGIN
//SIREN_BODY_DESTRUCT_END

	Uninitialize();
}
开发者ID:johndpope,项目名称:Medusa,代码行数:7,代码来源:FileStorage.cpp


注:本文中的Uninitialize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。