wait for device
This commit is contained in:
@@ -17,6 +17,10 @@ gnReturnCode gnCreateOutputDeviceFn(gnOutputDevice* outputDevice, gnInstance* in
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
void gnWaitForDeviceFn(gnOutputDevice *device) {
|
||||
[device->outputDevice->executingCommandBuffer waitUntilCompleted];
|
||||
}
|
||||
|
||||
void gnDestroyOutputDeviceFn(gnOutputDevice* device) {
|
||||
for (int i = 0; i < device->outputDevice->queueCount; i++) {
|
||||
[device->outputDevice->queues[i] release];
|
||||
|
||||
@@ -15,5 +15,7 @@ struct gnPlatformOutputDevice_t {
|
||||
int queueCount;
|
||||
id<MTLCommandQueue>* queues;
|
||||
|
||||
id<MTLCommandBuffer> executingCommandBuffer;
|
||||
|
||||
id<MTLRenderPipelineState> framebuffer;
|
||||
} gnPlatformOutputDevice;
|
||||
|
||||
Reference in New Issue
Block a user