-
Notifications
You must be signed in to change notification settings - Fork 811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into snapshot/dev
- Loading branch information
Showing
10 changed files
with
196 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 28 additions & 7 deletions
35
...on/src/main/java/net/caffeinemc/mods/sodium/client/gl/arena/PendingBufferCopyCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
package net.caffeinemc.mods.sodium.client.gl.arena; | ||
|
||
import net.caffeinemc.mods.sodium.client.util.UInt32; | ||
|
||
class PendingBufferCopyCommand { | ||
public final int readOffset; | ||
public final int writeOffset; | ||
private final int readOffset; /* Uint32 */ | ||
private final int writeOffset; /* Uint32 */ | ||
|
||
private int length; | ||
|
||
public int length; | ||
PendingBufferCopyCommand(long readOffset, long writeOffset, long length) { | ||
this.readOffset = UInt32.downcast(readOffset); | ||
this.writeOffset = UInt32.downcast(writeOffset); | ||
this.length = UInt32.downcast(length); | ||
} | ||
|
||
/* Uint32 */ | ||
public long getReadOffset() { | ||
return UInt32.upcast(this.readOffset); | ||
} | ||
|
||
/* Uint32 */ | ||
public long getWriteOffset() { | ||
return UInt32.upcast(this.writeOffset); | ||
} | ||
|
||
/* Uint32 */ | ||
public long getLength() { | ||
return UInt32.upcast(this.length); | ||
} | ||
|
||
PendingBufferCopyCommand(int readOffset, int writeOffset, int length) { | ||
this.readOffset = readOffset; | ||
this.writeOffset = writeOffset; | ||
this.length = length; | ||
public void setLength(long length /* Uint32 */) { | ||
this.length = UInt32.downcast(length); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.