mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 01:54:04 +09:00
apple m chip workaround (2)
This commit is contained in:
@@ -51,12 +51,22 @@ public class Float16FrameBuffer extends FrameBuffer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Texture createTexture (FrameBufferTextureAttachmentSpec attachmentSpec) {
|
protected Texture createTexture (FrameBufferTextureAttachmentSpec attachmentSpec) {
|
||||||
FloatTextureData data = new FloatTextureData(bufferBuilder.width, bufferBuilder.height, attachmentSpec.internalFormat,
|
if (App.isAppleM) {
|
||||||
attachmentSpec.format, attachmentSpec.type, attachmentSpec.isGpuOnly);
|
GLOnlyTextureData data = new GLOnlyTextureData(bufferBuilder.width, bufferBuilder.height, 0, attachmentSpec.internalFormat,
|
||||||
Texture result = new Texture(data);
|
attachmentSpec.format, attachmentSpec.type);
|
||||||
result.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
|
Texture result = new Texture(data);
|
||||||
result.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
|
result.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
|
||||||
return result;
|
result.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
FloatTextureData data = new FloatTextureData(bufferBuilder.width, bufferBuilder.height, attachmentSpec.internalFormat,
|
||||||
|
attachmentSpec.format, attachmentSpec.type, attachmentSpec.isGpuOnly);
|
||||||
|
Texture result = new Texture(data);
|
||||||
|
result.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
|
||||||
|
result.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user