本文整理汇总了C++中NazaraError函数的典型用法代码示例。如果您正苦于以下问题:C++ NazaraError函数的具体用法?C++ NazaraError怎么用?C++ NazaraError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NazaraError函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NazaraError
bool NzMesh::IsAnimable() const
{
#if NAZARA_UTILITY_SAFE
if (!m_impl)
{
NazaraError("Mesh not created");
return false;
}
#endif
return m_impl->animationType != nzAnimationType_Static;
}
示例2: NazaraError
void NzLuaInstance::Compute(nzLuaOperation operation)
{
#ifdef NAZARA_DEBUG
if (operation > nzLuaOperation_Max)
{
NazaraError("Lua operation out of enum");
return;
}
#endif
lua_arith(m_state, s_operations[operation]);
}
示例3: NazaraError
void TaskScheduler::SetWorkerCount(unsigned int workerCount)
{
#ifdef NAZARA_CORE_SAFE
if (TaskSchedulerImpl::IsInitialized())
{
NazaraError("Worker count cannot be set while initialized");
return;
}
#endif
s_workerCount = workerCount;
}
示例4: NazaraError
bool Animation::IsLoopPointInterpolationEnabled() const
{
#if NAZARA_UTILITY_SAFE
if (!m_impl)
{
NazaraError("Animation not created");
return false;
}
#endif
return m_impl->loopPointInterpolation;
}
示例5: NazaraError
UInt32 Music::GetSampleRate() const
{
#if NAZARA_AUDIO_SAFE
if (!m_impl)
{
NazaraError("Music not created");
return 0;
}
#endif
return m_impl->sampleRate;
}
示例6: NazaraError
/*!
* \brief Loads the sound from memory
* \return true if loading is successful
*
* \param data Raw memory
* \param size Size of the memory
* \param params Parameters for the sound
*
* \remark Produces a NazaraError if loading failed
*/
bool Sound::LoadFromMemory(const void* data, std::size_t size, const SoundBufferParams& params)
{
SoundBufferRef buffer = SoundBuffer::New();
if (!buffer->LoadFromMemory(data, size, params))
{
NazaraError("Failed to load buffer from memory (" + String::Pointer(data) + ')');
return false;
}
SetBuffer(buffer);
return true;
}
示例7: NazaraError
void TaskSchedulerImpl::WaitForTasks()
{
#ifdef NAZARA_CORE_SAFE
if (s_workerCount == 0)
{
NazaraError("Task scheduler is not initialized");
return;
}
#endif
WaitForMultipleObjects(s_workerCount, &s_doneEvents[0], true, INFINITE);
}
示例8: NazaraError
void NzScene::RegisterForUpdate(NzUpdatable* object)
{
#if NAZARA_GRAPHICS_SAFE
if (!object)
{
NazaraError("Invalid object");
return;
}
#endif
m_impl->updateList.push_back(object);
}
示例9: ClientToScreen
void EventImpl::SetMousePosition(int x, int y, const Window& relativeTo)
{
HWND handle = reinterpret_cast<HWND>(relativeTo.GetHandle());
if (handle)
{
POINT pos = {x, y};
ClientToScreen(handle, &pos);
SetCursorPos(pos.x, pos.y);
}
else
NazaraError("Invalid window handle");
}
示例10: NazaraError
bool RenderWindow::CopyToImage(AbstractImage* image, const Vector3ui& dstPos) const
{
#if NAZARA_RENDERER_SAFE
if (!m_context)
{
NazaraError("Window has not been created");
return false;
}
#endif
return CopyToImage(image, Rectui(Vector2ui(0U), GetSize()), dstPos);
}
示例11: NazaraError
NzTexture* NzDeferredRenderTechnique::GetGBuffer(unsigned int i) const
{
#if NAZARA_GRAPHICS_SAFE
if (i >= 3)
{
NazaraError("GBuffer texture index out of range (" + NzString::Number(i) + " >= 3)");
return nullptr;
}
#endif
return m_GBuffer[i];
}