Complete GL20 interface (#642)

This commit is contained in:
Gustl22
2019-01-26 21:07:09 +01:00
committed by Emux
parent 1af38a7306
commit ce87e89b4f
8 changed files with 496 additions and 53 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright 2016 Longri
* Copyright 2019 Gustl22
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -138,6 +139,11 @@ public class IosGL implements GL {
iOSGL.glDeleteTextures(n, textures);
}
@Override
public void deleteTexture(int texture) {
iOSGL.glDeleteTexture(texture);
}
@Override
public void depthFunc(int func) {
iOSGL.glDepthFunc(func);
@@ -193,6 +199,11 @@ public class IosGL implements GL {
iOSGL.glGenTextures(n, textures);
}
@Override
public int genTexture() {
return iOSGL.glGenTexture();
}
@Override
public int getError() {
return iOSGL.glGetError();
@@ -338,6 +349,11 @@ public class IosGL implements GL {
iOSGL.glDeleteBuffers(n, buffers);
}
@Override
public void deleteFramebuffer(int framebuffer) {
iOSGL.glDeleteFramebuffer(framebuffer);
}
@Override
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
iOSGL.glGetBufferParameteriv(target, pname, params);
@@ -443,6 +459,11 @@ public class IosGL implements GL {
return iOSGL.glCreateShader(type);
}
@Override
public void deleteBuffer(int buffer) {
iOSGL.glDeleteBuffer(buffer);
}
@Override
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
iOSGL.glDeleteFramebuffers(n, framebuffers);
@@ -453,6 +474,11 @@ public class IosGL implements GL {
iOSGL.glDeleteProgram(program);
}
@Override
public void deleteRenderbuffer(int renderbuffer) {
iOSGL.glDeleteRenderbuffer(renderbuffer);
}
@Override
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
iOSGL.glDeleteRenderbuffers(
@@ -501,20 +527,34 @@ public class IosGL implements GL {
level);
}
@Override
public int genBuffer() {
return iOSGL.glGenBuffer();
}
@Override
public void generateMipmap(int target) {
iOSGL.glGenerateMipmap(target);
}
@Override
public int genFramebuffer() {
return iOSGL.glGenFramebuffer();
}
@Override
public void genFramebuffers(int n, IntBuffer framebuffers) {
iOSGL.glGenFramebuffers(n, framebuffers);
}
@Override
public int genRenderbuffer() {
return iOSGL.glGenRenderbuffer();
}
@Override
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
iOSGL
.glGenRenderbuffers(n, renderbuffers);
iOSGL.glGenRenderbuffers(n, renderbuffers);
}
@Override
@@ -602,11 +642,6 @@ public class IosGL implements GL {
precision);
}
@Override
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
throw new UnsupportedOperationException("Not implemented");
}
@Override
public void getUniformfv(int program, int location, FloatBuffer params) {
iOSGL.glGetUniformfv(program, location, params);
@@ -720,6 +755,11 @@ public class IosGL implements GL {
iOSGL.glUniform1fv(location, count, v);
}
@Override
public void uniform1fv(int location, int count, float[] v, int offset) {
iOSGL.glUniform1fv(location, count, v, offset);
}
@Override
public void uniform1i(int location, int x) {
iOSGL.glUniform1i(location, x);
@@ -730,6 +770,11 @@ public class IosGL implements GL {
iOSGL.glUniform1iv(location, count, v);
}
@Override
public void uniform1iv(int location, int count, int[] v, int offset) {
iOSGL.glUniform1iv(location, count, v, offset);
}
@Override
public void uniform2f(int location, float x, float y) {
iOSGL.glUniform2f(location, x, y);
@@ -740,6 +785,11 @@ public class IosGL implements GL {
iOSGL.glUniform2fv(location, count, v);
}
@Override
public void uniform2fv(int location, int count, float[] v, int offset) {
iOSGL.glUniform2fv(location, count, v, offset);
}
@Override
public void uniform2i(int location, int x, int y) {
iOSGL.glUniform2i(location, x, y);
@@ -750,6 +800,11 @@ public class IosGL implements GL {
iOSGL.glUniform2iv(location, count, v);
}
@Override
public void uniform2iv(int location, int count, int[] v, int offset) {
iOSGL.glUniform2iv(location, count, v, offset);
}
@Override
public void uniform3f(int location, float x, float y, float z) {
iOSGL.glUniform3f(location, x, y, z);
@@ -760,6 +815,11 @@ public class IosGL implements GL {
iOSGL.glUniform3fv(location, count, v);
}
@Override
public void uniform3fv(int location, int count, float[] v, int offset) {
iOSGL.glUniform3fv(location, count, v, offset);
}
@Override
public void uniform3i(int location, int x, int y, int z) {
iOSGL.glUniform3i(location, x, y, z);
@@ -770,6 +830,11 @@ public class IosGL implements GL {
iOSGL.glUniform3iv(location, count, v);
}
@Override
public void uniform3iv(int location, int count, int[] v, int offset) {
uniform3iv(location, count, v, offset);
}
@Override
public void uniform4f(int location, float x, float y, float z, float w) {
iOSGL.glUniform4f(location, x, y, z, w);
@@ -780,6 +845,11 @@ public class IosGL implements GL {
iOSGL.glUniform4fv(location, count, v);
}
@Override
public void uniform4fv(int location, int count, float[] v, int offset) {
iOSGL.glUniform4fv(location, count, v, offset);
}
@Override
public void uniform4i(int location, int x, int y, int z, int w) {
iOSGL.glUniform4i(location, x, y, z, w);
@@ -790,6 +860,11 @@ public class IosGL implements GL {
iOSGL.glUniform4iv(location, count, v);
}
@Override
public void uniform4iv(int location, int count, int[] v, int offset) {
iOSGL.glUniform4iv(location, count, v, offset);
}
@Override
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
iOSGL.glUniformMatrix2fv(
@@ -799,6 +874,11 @@ public class IosGL implements GL {
value);
}
@Override
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
iOSGL.glUniformMatrix2fv(location, count, transpose, value, offset);
}
@Override
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
iOSGL.glUniformMatrix3fv(
@@ -808,6 +888,11 @@ public class IosGL implements GL {
value);
}
@Override
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
iOSGL.glUniformMatrix3fv(location, count, transpose, value, offset);
}
@Override
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
iOSGL.glUniformMatrix4fv(
@@ -817,6 +902,11 @@ public class IosGL implements GL {
value);
}
@Override
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
iOSGL.glUniformMatrix4fv(location, count, transpose, value, offset);
}
@Override
public void useProgram(int program) {
iOSGL.glUseProgram(program);