コード例 #1
0
        public SharedMeshData(int bufferNumber)
        {
            sharedMemories = new SharedMemoryAccess[5];

            sharedMemories[0] = new SharedMemoryAccess(meshInfoMutexName + bufferNumber, meshInfoFileName + bufferNumber);
            sharedMemories[1] = new SharedMemoryAccess(verticesMutexName + bufferNumber, verticesFileName + bufferNumber);
            sharedMemories[2] = new SharedMemoryAccess(normalsMutexName + bufferNumber, normalsFileName + bufferNumber);
            sharedMemories[3] = new SharedMemoryAccess(facesMutexName + bufferNumber, facesFileName + bufferNumber);
            sharedMemories[4] = new SharedMemoryAccess(colorsMutexName + bufferNumber, colorsFileName + bufferNumber);
        }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        if (activeMeshes == null)
        {
            activeMeshes = new Dictionary <int, GameObject>();
        }

        try
        {
            cameraPosSharedMemory   = new SharedMemoryAccess(cameraPosMutexName, cameraPosFileName);
            sharedMeshBuffers[0]    = new SharedMeshData(0);
            sharedMeshBuffers[1]    = new SharedMeshData(1);
            sharedMemoryInitialized = true;
        }
        catch (Exception e)
        {
            UIManager.WriteToLogger("Client not found.");
            Debug.Log("Client not found.");
            return;
        }

        UIManager.WriteToLogger("Client found. Wait shared memory allocation.");
        Debug.Log("Client found. Wait for shared memory allocation.");
    }
コード例 #3
0
 public void InitSharedMemory()
 {
     sharedMemories[0] = new SharedMemoryAccess(meshInfoMutexName + number, meshInfoFileName + number);
     sharedMemories[1] = new SharedMemoryAccess(verticesMutexName + number, verticesFileName + number);
 }