-
Notifications
You must be signed in to change notification settings - Fork 27
/
Frame.java
47 lines (36 loc) · 1.16 KB
/
Frame.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package javavulkantutorial;
import java.nio.LongBuffer;
import static org.lwjgl.system.MemoryStack.stackGet;
/**
* Wraps the needed sync objects for an in flight frame
*
* This frame's sync objects must be deleted manually
* */
public class Frame {
private final long imageAvailableSemaphore;
private final long renderFinishedSemaphore;
private final long fence;
public Frame(long imageAvailableSemaphore, long renderFinishedSemaphore, long fence) {
this.imageAvailableSemaphore = imageAvailableSemaphore;
this.renderFinishedSemaphore = renderFinishedSemaphore;
this.fence = fence;
}
public long imageAvailableSemaphore() {
return imageAvailableSemaphore;
}
public LongBuffer pImageAvailableSemaphore() {
return stackGet().longs(imageAvailableSemaphore);
}
public long renderFinishedSemaphore() {
return renderFinishedSemaphore;
}
public LongBuffer pRenderFinishedSemaphore() {
return stackGet().longs(renderFinishedSemaphore);
}
public long fence() {
return fence;
}
public LongBuffer pFence() {
return stackGet().longs(fence);
}
}