本文整理汇总了C++中OVR_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ OVR_UNUSED函数的具体用法?C++ OVR_UNUSED怎么用?C++ OVR_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OVR_UNUSED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OVR_UNUSED
void SharedLock::ReleaseLock(Lock* plock)
{
OVR_UNUSED(plock);
OVR_ASSERT(plock == toLock());
int oldUseCount, oldUseCount_tmp;
do {
oldUseCount = UseCount;
OVR_ASSERT(oldUseCount != (int)LockInitMarker);
if (oldUseCount == 1)
{
// Initialize marker
int tmp_one = 1;
int tmp_LockInitMarker = LockInitMarker;
if (UseCount.compare_exchange_strong(tmp_one, LockInitMarker))
{
Destruct<Lock>(toLock());
do { }
while (!UseCount.compare_exchange_weak(tmp_LockInitMarker, 0));
return;
}
continue;
}
oldUseCount_tmp = oldUseCount;
} while (!UseCount.compare_exchange_weak(oldUseCount_tmp, oldUseCount - 1,
std::memory_order_relaxed));
}
示例2: OVR_UNUSED
void SharedLock::ReleaseLock(Lock* plock)
{
OVR_UNUSED(plock);
OVR_ASSERT((plock = toLock()) != 0);
int oldUseCount;
do {
oldUseCount = UseCount;
OVR_ASSERT(oldUseCount != LockInitMarker);
if (oldUseCount == 1)
{
// Initialize marker
if (AtomicOps<int>::CompareAndSet_Sync(&UseCount, 1, LockInitMarker))
{
Destruct<Lock>(toLock());
do { }
while (!AtomicOps<int>::CompareAndSet_Sync(&UseCount, LockInitMarker, 0));
return;
}
continue;
}
} while (!AtomicOps<int>::CompareAndSet_NoSync(&UseCount, oldUseCount, oldUseCount - 1));
}
示例3: OVR_UNUSED
//==============================
// OvrSliderComponent::OnTouchRelative
eMsgStatus OvrSliderComponent::OnTouchRelative( OvrGuiSys & guiSys, VrFrame const & vrFrame,
VRMenuObject * self, VRMenuEvent const & event )
{
OVR_UNUSED( vrFrame );
return MSG_STATUS_CONSUMED;
}
示例4: OVRRiftForContext
ULONG WINAPI OVRRiftForContext(PVOID context, HANDLE driverHandle)
{
OVR_UNUSED( driverHandle );
OVR::Win32::DisplayShim* con = (OVR::Win32::DisplayShim*)context;
return con->ChildUid;
}
开发者ID:ArthurTorrente,项目名称:4A_Anim_Numerique_Genetic_Algorithm,代码行数:7,代码来源:OVR_Win32_ShimFunctions.cpp
示例5: OVR_UNUSED
void OvrVideoMenu::Open_Impl( OvrGuiSys & guiSys )
{
OVR_UNUSED( guiSys );
ButtonCoolDown = BUTTON_COOL_DOWN_SECONDS;
OpenTime = vrapi_GetTimeInSeconds();
}
示例6: pParams
//-------------------------------------------------------------------------------------
// ***** Texture
//
Texture::Texture(RenderParams* rp, int fmt, const Sizei texSize,
ID3D1xSamplerState* sampler, int samples)
: pParams(rp), Tex(NULL), TexSv(NULL), TexRtv(NULL), TexDsv(NULL),
TextureSize(texSize),
Sampler(sampler),
Samples(samples)
{
OVR_UNUSED(fmt);
}
示例7: DeleteCriticalSection
void PerformanceTimer::Shutdown()
{
DeleteCriticalSection(&TimeCS);
#if defined(OVR_OS_WIN32) // Desktop Windows only
MMRESULT mmr = timeEndPeriod(1);
OVR_ASSERT(TIMERR_NOERROR == mmr);
OVR_UNUSED(mmr);
#endif
}
示例8: OVR_UNUSED
bool MutexImpl::IsLockedByAnotherThread(Mutex* pmutex)
{
OVR_UNUSED(pmutex);
// There could be multiple interpretations of IsLocked with respect to current thread
if (LockCount == 0)
return 0;
if (pthread_self() != LockedBy)
return 1;
return 0;
}
示例9: OVR_UNUSED
void HIDDevice::OnOverlappedEvent(HANDLE hevent)
{
OVR_UNUSED(hevent);
OVR_ASSERT(hevent == ReadOverlapped.hEvent);
if (processReadResult())
{
// Proceed to read again.
initializeRead();
}
}
示例10: OVR_UNUSED
//-----------------------------------------------------------------------------
void HIDDevice::closeDevice(bool wasUnplugged)
{
OVR_UNUSED(wasUnplugged);
OVR_ASSERT(DeviceHandle >= 0);
HIDManager->DevManager->pThread->RemoveSelectFd(this,-1);
hid_close(DeviceHandle);
DeviceHandle = NULL;
LogText("OVR::Linux::HIDDevice - HID Device Closed '%s'\n", DevDesc.Path.ToCStr());
}
示例11: OVR_UNUSED
Matrix4f OvrSceneView::GetEyeProjectionMatrix( const int eye, const float fovDegreesX, const float fovDegreesY ) const
{
OVR_UNUSED( eye );
// We may want to make per-eye projection matrices if we move away from nearly-centered lenses.
// Use an infinite projection matrix because, except for things right up against the near plane,
// it provides better precision:
// "Tightening the Precision of Perspective Rendering"
// Paul Upchurch, Mathieu Desbrun
// Journal of Graphics Tools, Volume 16, Issue 1, 2012
return ovrMatrix4f_CreateProjectionFov( fovDegreesX, fovDegreesY, 0.0f, 0.0f, Znear, 0.0f );
}
示例12: OVR_DEBUG_LOG
void RefCountNTSImplCore::checkInvalidDelete(RefCountNTSImplCore *pmem)
{
#ifdef OVR_BUILD_DEBUG
if (pmem->RefCount != 0)
{
OVR_DEBUG_LOG( ("Invalid delete call on ref-counted object at %p. Please use Release()", pmem) );
OVR_ASSERT(0);
}
#else
OVR_UNUSED( pmem );
#endif
}
示例13: MMapFree
void MMapFree(void* memory, size_t size)
{
#if defined(OVR_OS_MS)
OVR_UNUSED(size);
VirtualFree(memory, 0, MEM_RELEASE);
#elif defined(OVR_OS_MAC) || defined(OVR_OS_UNIX)
size_t pageSize = getpagesize();
size = (((size + (pageSize - 1)) / pageSize) * pageSize);
munmap(memory, size); // Must supply the size to munmap.
#endif
}
示例14: OVR_UNUSED
String VideoBrowser::GetPanelTitle( OvrGuiSys & guiSys, const OvrMetaDatum & panelData ) const
{
OVR_UNUSED( guiSys );
const OvrVideosMetaDatum * const videosDatum = static_cast< const OvrVideosMetaDatum * const >( &panelData );
if ( videosDatum != NULL )
{
String outStr;
Videos.GetLocale().GetString( videosDatum->Title.ToCStr(), videosDatum->Title.ToCStr(), outStr );
return outStr;
}
return String();
}
示例15: getFrequency
void PerformanceTimer::Initialize()
{
::InitializeCriticalSection(&TimeCS);
MMTimeWrapCounter = 0;
getFrequency();
#if defined(OVR_OS_WIN32) // Desktop Windows only
// Set Vista flag. On Vista, we can just use QPC() without all the extra work
OSVERSIONINFOEXW ver;
ZeroMemory(&ver, sizeof(OSVERSIONINFOEXW));
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
ver.dwMajorVersion = 6; // Vista+
DWORDLONG condMask = 0;
VER_SET_CONDITION(condMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
// VerifyVersionInfo returns true if the OS meets the conditions set above
UsingVistaOrLater = ::VerifyVersionInfoW(&ver, VER_MAJORVERSION, condMask) != 0;
#else
UsingVistaOrLater = true;
#endif
if (!UsingVistaOrLater)
{
#if defined(OVR_OS_WIN32) // Desktop Windows only
// The following has the effect of setting the NT timer resolution (NtSetTimerResolution) to 1 millisecond.
MMRESULT mmr = timeBeginPeriod(1);
OVR_ASSERT(TIMERR_NOERROR == mmr);
OVR_UNUSED(mmr);
#endif
#if defined(OVR_BUILD_DEBUG) && defined(OVR_OS_WIN32)
HMODULE hNtDll = ::LoadLibraryW(L"NtDll.dll");
if (hNtDll)
{
pNtQueryTimerResolution = (NtQueryTimerResolutionType)::GetProcAddress(hNtDll, "NtQueryTimerResolution");
//pNtSetTimerResolution = (NtSetTimerResolutionType)::GetProcAddress(hNtDll, "NtSetTimerResolution");
if (pNtQueryTimerResolution)
{
ULONG MinimumResolution; // in 100-ns units
ULONG MaximumResolution;
ULONG ActualResolution;
pNtQueryTimerResolution(&MinimumResolution, &MaximumResolution, &ActualResolution);
OVR_DEBUG_LOG(("NtQueryTimerResolution = Min %ld us, Max %ld us, Current %ld us", MinimumResolution / 10, MaximumResolution / 10, ActualResolution / 10));
}
::FreeLibrary(hNtDll);
}
#endif
}
}