本文整理汇总了C++中OVR_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ OVR_UNUSED函数的具体用法?C++ OVR_UNUSED怎么用?C++ OVR_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OVR_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:PLUSToolkit,项目名称:OvrvisionPro,代码行数:32,代码来源:OVR_Atomic.cpp
示例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));
}
开发者ID:BigRobCoder,项目名称:ohmd-plugin,代码行数:28,代码来源:OVR_DeviceImpl.cpp
示例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;
}
开发者ID:8BitRick,项目名称:GearVRNative,代码行数:9,代码来源:SliderComponent.cpp
示例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();
}
开发者ID:yenchenlin,项目名称:gear-vr-360-player,代码行数:8,代码来源:VideoMenu.cpp
示例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);
}
开发者ID:Geocent,项目名称:node-hmd,代码行数:12,代码来源:CAPI_D3D1X_Util.cpp
示例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
}
开发者ID:Michaelangel007,项目名称:openclamdrenderer,代码行数:10,代码来源:OVR_Timer.cpp
示例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;
}
开发者ID:w732,项目名称:LibOVR-2,代码行数:10,代码来源:OVR_ThreadsPthread.cpp
示例9: OVR_UNUSED
void HIDDevice::OnOverlappedEvent(HANDLE hevent)
{
OVR_UNUSED(hevent);
OVR_ASSERT(hevent == ReadOverlapped.hEvent);
if (processReadResult())
{
// Proceed to read again.
initializeRead();
}
}
开发者ID:josephwinston,项目名称:minko,代码行数:11,代码来源:OVR_Win32_HIDDevice.cpp
示例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());
}
开发者ID:sebjf,项目名称:OculusSDK_0.3.2_CentOS,代码行数:13,代码来源:OVR_Linux_HIDDevice.cpp
示例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 );
}
开发者ID:8BitRick,项目名称:GearVRNative,代码行数:12,代码来源:SceneView.cpp
示例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
}
开发者ID:ejeinc,项目名称:Meganekko,代码行数:12,代码来源:OVR_RefCount.cpp
示例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
}
开发者ID:flair2005,项目名称:virtualized-reality-oculus-kinect,代码行数:12,代码来源:OVR_Allocator.cpp
示例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();
}
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:12,代码来源:VideoBrowser.cpp
示例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
}
}
开发者ID:Interaptix,项目名称:OvrvisionPro,代码行数:52,代码来源:OVR_Timer.cpp
示例16: IsDebugMessage
void Log::DefaultLogOutput(const char* formattedText, LogMessageType messageType, int bufferSize)
{
bool debug = IsDebugMessage(messageType);
OVR_UNUSED(bufferSize);
#if defined(OVR_OS_WIN32)
// Under Win32, output regular messages to console if it exists; debug window otherwise.
static DWORD dummyMode;
static bool hasConsole = (GetStdHandle(STD_OUTPUT_HANDLE) != INVALID_HANDLE_VALUE) &&
(GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &dummyMode));
if (!hasConsole || debug)
{
::OutputDebugStringA(formattedText);
}
fputs(formattedText, stdout);
#elif defined(OVR_OS_MS) // Any other Microsoft OSs
::OutputDebugStringA(formattedText);
#elif defined(OVR_OS_ANDROID)
// To do: use bufferSize to deal with the case that Android has a limited output length.
__android_log_write(ANDROID_LOG_INFO, "OVR", formattedText);
#else
fputs(formattedText, stdout);
#endif
if (messageType == Log_Error)
{
#if defined(OVR_OS_WIN32)
if (!ReportEventA(hEventSource, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, &formattedText, NULL))
{
OVR_ASSERT(false);
}
#elif defined(OVR_OS_MS) // Any other Microsoft OSs
// TBD
#elif defined(OVR_OS_ANDROID)
// TBD
#elif defined(OVR_OS_MAC) || defined(OVR_OS_LINUX)
syslog(LOG_ERR, "%s", formattedText);
#else
// TBD
#endif
}
// Just in case.
OVR_UNUSED2(formattedText, debug);
}
开发者ID:h3ll5ur7er,项目名称:SLProject,代码行数:52,代码来源:OVR_Log.cpp
示例17: OVR_UNUSED
void MutexImpl::Unlock(Mutex* pmutex)
{
OVR_UNUSED(pmutex);
LockCount--;
// Release mutex
if ((Recursive ? ReleaseMutex(hMutexOrSemaphore) :
ReleaseSemaphore(hMutexOrSemaphore, 1, NULL)) != 0)
{
// This used to call Wait handlers if LockCount == 0.
}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:13,代码来源:OVR_ThreadsWinAPI.cpp
示例18: OVR_UNUSED
void OculusWorldDemoApp::OnMouseMove(int x, int y, int modifiers)
{
OVR_UNUSED(y);
if(modifiers & Mod_MouseRelative)
{
// Get Delta
int dx = x;
// Apply to rotation. Subtract for right body frame rotation,
// since yaw rotation is positive CCW when looking down on XZ plane.
ThePlayer.BodyYaw -= (Sensitivity * dx) / 360.0f;
}
}
开发者ID:ashariati,项目名称:GRASP_2014,代码行数:13,代码来源:OculusWorldDemo.cpp
示例19: OVR_UNUSED
bool ShaderBase::SetUniformBool(const char* name, int n, const bool* v)
{
OVR_UNUSED(n);
for(unsigned i = 0; i < UniformReflSize; i++)
{
if (!strcmp(UniformRefl[i].Name, name))
{
memcpy(UniformData + UniformRefl[i].Offset, v, UniformRefl[i].Size);
return 1;
}
}
return 0;
}
开发者ID:jason-amju,项目名称:amjulib,代码行数:13,代码来源:CAPI_GL_Util.cpp
示例20: Ren
//-------------------------------------------------------------------------------------
// ***** Texture
//
Texture::Texture(RenderDevice* ren, int fmt, int w, int h) :
Ren(ren),
Tex(NULL),
TexSv(NULL),
TexRtv(NULL),
TexDsv(NULL),
Sampler(NULL),
Width(w),
Height(h),
Samples(0)
{
OVR_UNUSED(fmt);
Sampler = Ren->GetSamplerState(0);
}
开发者ID:OculusRiftInAction,项目名称:OculusSDK,代码行数:18,代码来源:RenderTiny_D3D11_Device.cpp
注:本文中的OVR_UNUSED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论