-
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use vertex buffer offsets instead of pointers
- Loading branch information
Showing
5 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
common/src/main/java/net/irisshaders/iris/mixin/MixinByteBufferBuilder.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.irisshaders.iris.mixin; | ||
|
||
import com.mojang.blaze3d.vertex.ByteBufferBuilder; | ||
import net.irisshaders.iris.vertices.MojangBufferAccessor; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(ByteBufferBuilder.class) | ||
public class MixinByteBufferBuilder implements MojangBufferAccessor { | ||
@Shadow | ||
long pointer; | ||
|
||
@Override | ||
public long getPointer() { | ||
return this.pointer; | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
common/src/main/java/net/irisshaders/iris/vertices/MojangBufferAccessor.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package net.irisshaders.iris.vertices; | ||
|
||
public interface MojangBufferAccessor { | ||
long getPointer(); | ||
} |
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