本文整理汇总了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;
}
示例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;
}
示例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);
}
示例4: FOR_EACH_TO
bool EffectRenderGroup::Uninitialize()
{
FOR_EACH_TO(mGroups, Uninitialize());
FOR_EACH_ITEM_CLEAR(mGroups, MaterialRenderGroupPool::Instance().Recycle);
return true;
}
示例5: Uninitialize
void COXNetBrowseTree::PostNcDestroy()
{
// Unitialize the control
Uninitialize();
CTreeCtrl::PostNcDestroy();
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
}
示例10: UninitializeRenderer
CGraphics::~CGraphics(void)
{
UninitializeRenderer();
UninitializeDisplay();
UninitializeTimer();
Uninitialize();
}
示例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;
}
示例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);
}
示例13: Uninitialize
CShader::~CShader()
{
if (IsInitialized())
{
Uninitialize();
}
}
示例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;
}
示例15: Uninitialize
FileStorage::~FileStorage()
{
//SIREN_BODY_DESTRUCT_BEGIN
//SIREN_BODY_DESTRUCT_END
Uninitialize();
}