-
-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2227 from jeseibel/1.20.3-dh-api
Replace Distant Horizons mixins with API calls
- Loading branch information
Showing
11 changed files
with
580 additions
and
402 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
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
60 changes: 60 additions & 0 deletions
60
src/main/java/net/coderbot/iris/compat/dh/DhFrameBufferWrapper.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,60 @@ | ||
package net.coderbot.iris.compat.dh; | ||
|
||
import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiFramebuffer; | ||
import net.coderbot.iris.gl.framebuffer.GlFramebuffer; | ||
import org.lwjgl.opengl.GL32; | ||
|
||
public class DhFrameBufferWrapper implements IDhApiFramebuffer | ||
{ | ||
private final GlFramebuffer framebuffer; | ||
|
||
|
||
public DhFrameBufferWrapper(GlFramebuffer framebuffer) | ||
{ | ||
this.framebuffer = framebuffer; | ||
} | ||
|
||
|
||
|
||
@Override | ||
public boolean overrideThisFrame() | ||
{ | ||
return true; | ||
} | ||
|
||
@Override | ||
public void bind() | ||
{ | ||
this.framebuffer.bind(); | ||
} | ||
|
||
@Override | ||
public void addDepthAttachment(int i, boolean b) | ||
{ | ||
// ignore | ||
} | ||
@Override | ||
public int getId() | ||
{ | ||
return this.framebuffer.getId(); | ||
} | ||
@Override | ||
public int getStatus() | ||
{ | ||
this.bind(); | ||
int status = GL32.glCheckFramebufferStatus(GL32.GL_FRAMEBUFFER); | ||
return status; | ||
} | ||
@Override | ||
public void addColorAttachment(int i, int i1) | ||
{ | ||
// ignore | ||
} | ||
@Override | ||
public void destroy() | ||
{ | ||
// ignore | ||
//this.framebuffer.destroy(); | ||
} | ||
|
||
} |
Oops, something went wrong.