public void next() { if (isReleased) { return; } Log.gpl.d("WVR_TexMngr", "Get texture from queue"); #if UNITY_EDITOR if (Application.isEditor) { // We can test the dictionary in editor. currentPtr = keyArray[keyArrayIndex++]; if (keyArrayIndex >= textures.Count) { keyArrayIndex = 0; } } else #endif { currentPtr = (IntPtr)WaveVR_Utils.WVR_GetAvailableTextureID(queue); } currentRt = GetRenderTextureByPtr(currentPtr); currentDepthPtr = GetDepthByPtr(currentPtr); //Log.d("WVR_TexMngr", "current rt" + currentPtr + " dp" + currentDepthPtr); }
public void next() { if (isReleased) { return; } Profiler.BeginSample("Next"); Log.gpl.d(TextureManager.TAG, "Get texture from queue"); #if UNITY_EDITOR if (Application.isEditor) { // We can test the dictionary in editor. currentPtr = keyArray[keyArrayIndex++]; if (keyArrayIndex >= textures.Count) { keyArrayIndex = 0; } } else #endif { currentPtr = (Int32)WaveVR_Utils.WVR_GetAvailableTextureID(queue); } currentRt = GetRenderTextureByPtr(currentPtr); currentDepthPtr = GetDepthByPtr(currentPtr); //Log.d(TextureManager.TAG, "current rt" + currentPtr + " dp" + currentDepthPtr); if (!CfgValidate(currentRt)) { ReplaceCurrentWithNewTexture(); } Profiler.EndSample(); }
public void next() { #if UNITY_EDITOR if (Application.isEditor) { return; } #endif Log.gpl.d(LOG_TAG, "Get texture from queue"); currentPtr = (IntPtr)WaveVR_Utils.WVR_GetAvailableTextureID(queue); currentRt = GetRenderTextureByPtr(currentPtr); if (currentPtr == IntPtr.Zero) { currentPtr = IntPtr.Zero; } //Log.d(LOG_TAG, "TextureID" + currentPtr.ToInt32()); }
public void next() { if (isReleased) { return; } Profiler.BeginSample("Next"); // If last frame has texture change, do change texture in next frame. This delay help not to crash on old Adreno driver. bool doSkipChange = false; if (isTextureChanged) { isTextureChanged = false; doSkipChange = true; } Log.gpl.d(TextureManager.TAG, "Get texture from queue"); #if UNITY_EDITOR if (Application.isEditor) { // We can test the dictionary in editor. currentPtr = keyArray[keyArrayIndex++]; if (keyArrayIndex >= textures.Count) { keyArrayIndex = 0; } } else #endif { currentPtr = (Int32)WaveVR_Utils.WVR_GetAvailableTextureID(queue); } currentRt = GetRenderTextureByPtr(currentPtr); currentDepthPtr = GetDepthByPtr(currentPtr); //Log.d(TextureManager.TAG, "current rt" + currentPtr + " dp" + currentDepthPtr); if (!doSkipChange && !CfgValidate(currentPtr)) { isTextureChanged = true; ReplaceCurrentWithNewTexture(); } Profiler.EndSample(); }