Complete GL20 interface (#642)
This commit is contained in:
parent
1af38a7306
commit
ce87e89b4f
@ -20,7 +20,6 @@ dependencies {
|
|||||||
implementation project(':vtm-android-gdx')
|
implementation project(':vtm-android-gdx')
|
||||||
implementation project(':vtm-gdx')
|
implementation project(':vtm-gdx')
|
||||||
implementation project(':vtm-gdx-poi3d')
|
implementation project(':vtm-gdx-poi3d')
|
||||||
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
|
||||||
|
|
||||||
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-armeabi-v7a'
|
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-armeabi-v7a'
|
||||||
|
@ -3,6 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
|
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -19,6 +20,8 @@ package org.oscim.gdx;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.opengl.GLES20;
|
import android.opengl.GLES20;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.backends.android.AndroidGL20;
|
||||||
|
|
||||||
import org.oscim.backend.GL;
|
import org.oscim.backend.GL;
|
||||||
|
|
||||||
import java.nio.Buffer;
|
import java.nio.Buffer;
|
||||||
@ -28,6 +31,8 @@ import java.nio.IntBuffer;
|
|||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL implements GL {
|
public class AndroidGL implements GL {
|
||||||
|
|
||||||
|
private static final AndroidGL20 androidGL = new AndroidGL20();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachShader(int program, int shader) {
|
public void attachShader(int program, int shader) {
|
||||||
GLES20.glAttachShader(program, shader);
|
GLES20.glAttachShader(program, shader);
|
||||||
@ -103,11 +108,21 @@ public class AndroidGL implements GL {
|
|||||||
return GLES20.glCreateShader(type);
|
return GLES20.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
androidGL.glDeleteBuffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteBuffers(int n, IntBuffer buffers) {
|
public void deleteBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glDeleteBuffers(n, buffers);
|
GLES20.glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
androidGL.glDeleteFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glDeleteFramebuffers(n, framebuffers);
|
GLES20.glDeleteFramebuffers(n, framebuffers);
|
||||||
@ -118,6 +133,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glDeleteProgram(program);
|
GLES20.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
androidGL.glDeleteRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
||||||
@ -160,6 +180,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
return androidGL.glGenBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genBuffers(int n, IntBuffer buffers) {
|
public void genBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glGenBuffers(n, buffers);
|
GLES20.glGenBuffers(n, buffers);
|
||||||
@ -170,11 +195,21 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGenerateMipmap(target);
|
GLES20.glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
return androidGL.glGenFramebuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glGenFramebuffers(n, framebuffers);
|
GLES20.glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
return androidGL.glGenRenderbuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glGenRenderbuffers(n, renderbuffers);
|
GLES20.glGenRenderbuffers(n, renderbuffers);
|
||||||
@ -187,14 +222,12 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
public String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {
|
||||||
//return GLES20.glGetActiveUniform(program, index, bufsize, length, size, type, name);
|
return androidGL.glGetActiveUniform(program, index, size, type);
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
public void getAttachedShaders(int program, int maxcount, Buffer count, IntBuffer shaders) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glGetAttachedShaders(program, maxcount, count, shaders);
|
||||||
//GLES20.glGetAttachedShaders(program, maxcount, count, shaders);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -204,8 +237,7 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBooleanv(int pname, Buffer params) {
|
public void getBooleanv(int pname, Buffer params) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glGetBooleanv(pname, params);
|
||||||
//GLES20.glGetBooleanv(pname, params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -260,11 +292,6 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GLES20.glGetTexParameterfv(target, pname, params);
|
GLES20.glGetTexParameterfv(target, pname, params);
|
||||||
@ -308,8 +335,7 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
public void getVertexAttribPointerv(int index, int pname, Buffer pointer) {
|
||||||
//GLES20.glGetVertexAttribPointerv(index, pname, pointer);
|
androidGL.glGetVertexAttribPointerv(index, pname, pointer);
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -431,6 +457,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
GLES20.glUniform1i(location, x);
|
GLES20.glUniform1i(location, x);
|
||||||
@ -443,6 +474,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
GLES20.glUniform2f(location, x, y);
|
GLES20.glUniform2f(location, x, y);
|
||||||
@ -455,6 +491,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
GLES20.glUniform2i(location, x, y);
|
GLES20.glUniform2i(location, x, y);
|
||||||
@ -467,6 +508,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
GLES20.glUniform3f(location, x, y, z);
|
GLES20.glUniform3f(location, x, y, z);
|
||||||
@ -479,6 +525,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
GLES20.glUniform3i(location, x, y, z);
|
GLES20.glUniform3i(location, x, y, z);
|
||||||
@ -491,6 +542,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
GLES20.glUniform4f(location, x, y, z, w);
|
GLES20.glUniform4f(location, x, y, z, w);
|
||||||
@ -501,6 +557,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glUniform4fv(location, count, v);
|
GLES20.glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
GLES20.glUniform4i(location, x, y, z, w);
|
GLES20.glUniform4i(location, x, y, z, w);
|
||||||
@ -513,24 +574,44 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
GLES20.glUseProgram(program);
|
GLES20.glUseProgram(program);
|
||||||
@ -656,15 +737,13 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void compressedTexImage2D(int target, int level, int internalformat, int width,
|
public void compressedTexImage2D(int target, int level, int internalformat, int width,
|
||||||
int height, int border, int imageSize, Buffer data) {
|
int height, int border, int imageSize, Buffer data) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset,
|
public void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset,
|
||||||
int width, int height, int format, int imageSize, Buffer data) {
|
int width, int height, int format, int imageSize, Buffer data) {
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
androidGL.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -691,6 +770,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
androidGL.glDeleteTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
GLES20.glDepthFunc(func);
|
GLES20.glDepthFunc(func);
|
||||||
@ -757,6 +841,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
return androidGL.glGenTexture();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return GLES20.glGetError();
|
return GLES20.glGetError();
|
||||||
@ -837,8 +926,7 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
||||||
int height, int format, int type, Buffer pixels) {
|
int height, int format, int type, Buffer pixels) {
|
||||||
GLES20
|
GLES20.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||||
.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -25,6 +26,9 @@ import java.nio.Buffer;
|
|||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Unimplemented methods: https://github.com/libgdx/libgdx/blob/master/gdx/jni/android/AndroidGL20.cpp
|
||||||
|
*/
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL implements GL {
|
public class AndroidGL implements GL {
|
||||||
|
|
||||||
@ -103,11 +107,21 @@ public class AndroidGL implements GL {
|
|||||||
return GLES20.glCreateShader(type);
|
return GLES20.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteBuffers(int n, IntBuffer buffers) {
|
public void deleteBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glDeleteBuffers(n, buffers);
|
GLES20.glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glDeleteFramebuffers(n, framebuffers);
|
GLES20.glDeleteFramebuffers(n, framebuffers);
|
||||||
@ -118,6 +132,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glDeleteProgram(program);
|
GLES20.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
GLES20.glDeleteRenderbuffers(n, renderbuffers);
|
||||||
@ -160,6 +179,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
GLES20.glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genBuffers(int n, IntBuffer buffers) {
|
public void genBuffers(int n, IntBuffer buffers) {
|
||||||
GLES20.glGenBuffers(n, buffers);
|
GLES20.glGenBuffers(n, buffers);
|
||||||
@ -170,11 +194,21 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGenerateMipmap(target);
|
GLES20.glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
GLES20.glGenFramebuffers(n, framebuffers);
|
GLES20.glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
GLES20.glGenRenderbuffers(n, renderbuffers);
|
GLES20.glGenRenderbuffers(n, renderbuffers);
|
||||||
@ -260,11 +294,6 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
GLES20.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("missing implementation");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
public void getTexParameterfv(int target, int pname, FloatBuffer params) {
|
||||||
GLES20.glGetTexParameterfv(target, pname, params);
|
GLES20.glGetTexParameterfv(target, pname, params);
|
||||||
@ -431,6 +460,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
GLES20.glUniform1i(location, x);
|
GLES20.glUniform1i(location, x);
|
||||||
@ -443,6 +477,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
GLES20.glUniform2f(location, x, y);
|
GLES20.glUniform2f(location, x, y);
|
||||||
@ -455,6 +494,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
GLES20.glUniform2i(location, x, y);
|
GLES20.glUniform2i(location, x, y);
|
||||||
@ -467,6 +511,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
GLES20.glUniform3f(location, x, y, z);
|
GLES20.glUniform3f(location, x, y, z);
|
||||||
@ -479,6 +528,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
GLES20.glUniform3i(location, x, y, z);
|
GLES20.glUniform3i(location, x, y, z);
|
||||||
@ -491,6 +545,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
GLES20.glUniform4f(location, x, y, z, w);
|
GLES20.glUniform4f(location, x, y, z, w);
|
||||||
@ -501,6 +560,11 @@ public class AndroidGL implements GL {
|
|||||||
GLES20.glUniform4fv(location, count, v);
|
GLES20.glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
GLES20.glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
GLES20.glUniform4i(location, x, y, z, w);
|
GLES20.glUniform4i(location, x, y, z, w);
|
||||||
@ -513,24 +577,44 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
GLES20.glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
GLES20.glUniformMatrix2fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
GLES20.glUniformMatrix3fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
GLES20.glUniformMatrix4fv(location, count, transpose, value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
GLES20.glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
GLES20.glUseProgram(program);
|
GLES20.glUseProgram(program);
|
||||||
@ -691,6 +775,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
GLES20.glDepthFunc(func);
|
GLES20.glDepthFunc(func);
|
||||||
@ -757,6 +846,11 @@ public class AndroidGL implements GL {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
throw new UnsupportedOperationException("missing implementation");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return GLES20.glGetError();
|
return GLES20.glGetError();
|
||||||
@ -837,8 +931,7 @@ public class AndroidGL implements GL {
|
|||||||
@Override
|
@Override
|
||||||
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int width,
|
||||||
int height, int format, int type, Buffer pixels) {
|
int height, int format, int type, Buffer pixels) {
|
||||||
GLES20
|
GLES20.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||||
.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2016 devemux86
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright 2011 See AUTHORS file.
|
* Copyright 2011 See AUTHORS file.
|
||||||
* <p/>
|
* <p/>
|
||||||
@ -38,6 +54,8 @@ import java.nio.ShortBuffer;
|
|||||||
/**
|
/**
|
||||||
* An implementation of the {@link GL20} interface based on LWJGL. Note that LWJGL shaders and OpenGL ES shaders will not be 100%
|
* An implementation of the {@link GL20} interface based on LWJGL. Note that LWJGL shaders and OpenGL ES shaders will not be 100%
|
||||||
* compatible. Some glGetXXX methods are not implemented.
|
* compatible. Some glGetXXX methods are not implemented.
|
||||||
|
* <p>
|
||||||
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL20.java
|
||||||
*
|
*
|
||||||
* @author mzechner
|
* @author mzechner
|
||||||
*/
|
*/
|
||||||
@ -241,6 +259,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL15.glDeleteBuffers(buffers);
|
GL15.glDeleteBuffers(buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteBuffer(int buffer) {
|
public void deleteBuffer(int buffer) {
|
||||||
GL15.glDeleteBuffers(buffer);
|
GL15.glDeleteBuffers(buffer);
|
||||||
}
|
}
|
||||||
@ -250,6 +269,7 @@ public class LwjglGL20 implements GL {
|
|||||||
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers);
|
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteFramebuffer(int framebuffer) {
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer);
|
EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer);
|
||||||
}
|
}
|
||||||
@ -264,6 +284,7 @@ public class LwjglGL20 implements GL {
|
|||||||
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers);
|
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteRenderbuffer(int renderbuffer) {
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
|
EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
|
||||||
}
|
}
|
||||||
@ -278,6 +299,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL11.glDeleteTextures(textures);
|
GL11.glDeleteTextures(textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteTexture(int texture) {
|
public void deleteTexture(int texture) {
|
||||||
GL11.glDeleteTextures(texture);
|
GL11.glDeleteTextures(texture);
|
||||||
}
|
}
|
||||||
@ -370,6 +392,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL15.glGenBuffers(buffers);
|
GL15.glGenBuffers(buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genBuffer() {
|
public int genBuffer() {
|
||||||
return GL15.glGenBuffers();
|
return GL15.glGenBuffers();
|
||||||
}
|
}
|
||||||
@ -379,6 +402,7 @@ public class LwjglGL20 implements GL {
|
|||||||
EXTFramebufferObject.glGenFramebuffersEXT(framebuffers);
|
EXTFramebufferObject.glGenFramebuffersEXT(framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genFramebuffer() {
|
public int genFramebuffer() {
|
||||||
return EXTFramebufferObject.glGenFramebuffersEXT();
|
return EXTFramebufferObject.glGenFramebuffersEXT();
|
||||||
}
|
}
|
||||||
@ -388,6 +412,7 @@ public class LwjglGL20 implements GL {
|
|||||||
EXTFramebufferObject.glGenRenderbuffersEXT(renderbuffers);
|
EXTFramebufferObject.glGenRenderbuffersEXT(renderbuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genRenderbuffer() {
|
public int genRenderbuffer() {
|
||||||
return EXTFramebufferObject.glGenRenderbuffersEXT();
|
return EXTFramebufferObject.glGenRenderbuffersEXT();
|
||||||
}
|
}
|
||||||
@ -397,6 +422,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL11.glGenTextures(textures);
|
GL11.glGenTextures(textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int genTexture() {
|
public int genTexture() {
|
||||||
return GL11.glGenTextures();
|
return GL11.glGenTextures();
|
||||||
}
|
}
|
||||||
@ -764,6 +790,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform1(location, v);
|
GL20.glUniform1(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1fv(int location, int count, float[] v, int offset) {
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform1(location, toFloatBuffer(v, offset, count));
|
GL20.glUniform1(location, toFloatBuffer(v, offset, count));
|
||||||
}
|
}
|
||||||
@ -778,6 +805,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform1(location, v);
|
GL20.glUniform1(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform1iv(int location, int count, int[] v, int offset) {
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform1(location, toIntBuffer(v, offset, count));
|
GL20.glUniform1(location, toIntBuffer(v, offset, count));
|
||||||
}
|
}
|
||||||
@ -792,6 +820,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform2(location, v);
|
GL20.glUniform2(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2fv(int location, int count, float[] v, int offset) {
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform2(location, toFloatBuffer(v, offset, count << 1));
|
GL20.glUniform2(location, toFloatBuffer(v, offset, count << 1));
|
||||||
}
|
}
|
||||||
@ -806,6 +835,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform2(location, v);
|
GL20.glUniform2(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform2iv(int location, int count, int[] v, int offset) {
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform2(location, toIntBuffer(v, offset, count << 1));
|
GL20.glUniform2(location, toIntBuffer(v, offset, count << 1));
|
||||||
}
|
}
|
||||||
@ -820,6 +850,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform3(location, v);
|
GL20.glUniform3(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3fv(int location, int count, float[] v, int offset) {
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform3(location, toFloatBuffer(v, offset, count * 3));
|
GL20.glUniform3(location, toFloatBuffer(v, offset, count * 3));
|
||||||
}
|
}
|
||||||
@ -834,6 +865,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform3(location, v);
|
GL20.glUniform3(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform3iv(int location, int count, int[] v, int offset) {
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform3(location, toIntBuffer(v, offset, count * 3));
|
GL20.glUniform3(location, toIntBuffer(v, offset, count * 3));
|
||||||
}
|
}
|
||||||
@ -848,6 +880,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform4(location, v);
|
GL20.glUniform4(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4fv(int location, int count, float[] v, int offset) {
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
GL20.glUniform4(location, toFloatBuffer(v, offset, count << 2));
|
GL20.glUniform4(location, toFloatBuffer(v, offset, count << 2));
|
||||||
}
|
}
|
||||||
@ -862,6 +895,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniform4(location, v);
|
GL20.glUniform4(location, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniform4iv(int location, int count, int[] v, int offset) {
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
GL20.glUniform4(location, toIntBuffer(v, offset, count << 2));
|
GL20.glUniform4(location, toIntBuffer(v, offset, count << 2));
|
||||||
}
|
}
|
||||||
@ -871,6 +905,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniformMatrix2(location, transpose, value);
|
GL20.glUniformMatrix2(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix2(location, transpose, toFloatBuffer(value, offset, count << 2));
|
GL20.glUniformMatrix2(location, transpose, toFloatBuffer(value, offset, count << 2));
|
||||||
}
|
}
|
||||||
@ -880,6 +915,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniformMatrix3(location, transpose, value);
|
GL20.glUniformMatrix3(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix3(location, transpose, toFloatBuffer(value, offset, count * 9));
|
GL20.glUniformMatrix3(location, transpose, toFloatBuffer(value, offset, count * 9));
|
||||||
}
|
}
|
||||||
@ -889,6 +925,7 @@ public class LwjglGL20 implements GL {
|
|||||||
GL20.glUniformMatrix4(location, transpose, value);
|
GL20.glUniformMatrix4(location, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
GL20.glUniformMatrix4(location, transpose, toFloatBuffer(value, offset, count << 4));
|
GL20.glUniformMatrix4(location, transpose, toFloatBuffer(value, offset, count << 4));
|
||||||
}
|
}
|
||||||
@ -988,8 +1025,4 @@ public class LwjglGL20 implements GL {
|
|||||||
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, int ptr) {
|
public void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, int ptr) {
|
||||||
GL20.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
|
GL20.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 Longri
|
* Copyright 2016 Longri
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* 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
|
* 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);
|
iOSGL.glDeleteTextures(n, textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
iOSGL.glDeleteTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
iOSGL.glDepthFunc(func);
|
iOSGL.glDepthFunc(func);
|
||||||
@ -193,6 +199,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glGenTextures(n, textures);
|
iOSGL.glGenTextures(n, textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
return iOSGL.glGenTexture();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return iOSGL.glGetError();
|
return iOSGL.glGetError();
|
||||||
@ -338,6 +349,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glDeleteBuffers(n, buffers);
|
iOSGL.glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
iOSGL.glDeleteFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
||||||
iOSGL.glGetBufferParameteriv(target, pname, params);
|
iOSGL.glGetBufferParameteriv(target, pname, params);
|
||||||
@ -443,6 +459,11 @@ public class IosGL implements GL {
|
|||||||
return iOSGL.glCreateShader(type);
|
return iOSGL.glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
iOSGL.glDeleteBuffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
iOSGL.glDeleteFramebuffers(n, framebuffers);
|
iOSGL.glDeleteFramebuffers(n, framebuffers);
|
||||||
@ -453,6 +474,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glDeleteProgram(program);
|
iOSGL.glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
iOSGL.glDeleteRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
iOSGL.glDeleteRenderbuffers(
|
iOSGL.glDeleteRenderbuffers(
|
||||||
@ -501,20 +527,34 @@ public class IosGL implements GL {
|
|||||||
level);
|
level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
return iOSGL.glGenBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateMipmap(int target) {
|
public void generateMipmap(int target) {
|
||||||
iOSGL.glGenerateMipmap(target);
|
iOSGL.glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
return iOSGL.glGenFramebuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
iOSGL.glGenFramebuffers(n, framebuffers);
|
iOSGL.glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
return iOSGL.glGenRenderbuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
iOSGL
|
iOSGL.glGenRenderbuffers(n, renderbuffers);
|
||||||
.glGenRenderbuffers(n, renderbuffers);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -602,11 +642,6 @@ public class IosGL implements GL {
|
|||||||
precision);
|
precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getUniformfv(int program, int location, FloatBuffer params) {
|
public void getUniformfv(int program, int location, FloatBuffer params) {
|
||||||
iOSGL.glGetUniformfv(program, location, params);
|
iOSGL.glGetUniformfv(program, location, params);
|
||||||
@ -720,6 +755,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform1fv(location, count, v);
|
iOSGL.glUniform1fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
iOSGL.glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
iOSGL.glUniform1i(location, x);
|
iOSGL.glUniform1i(location, x);
|
||||||
@ -730,6 +770,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform1iv(location, count, v);
|
iOSGL.glUniform1iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
iOSGL.glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
iOSGL.glUniform2f(location, x, y);
|
iOSGL.glUniform2f(location, x, y);
|
||||||
@ -740,6 +785,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform2fv(location, count, v);
|
iOSGL.glUniform2fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
iOSGL.glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
iOSGL.glUniform2i(location, x, y);
|
iOSGL.glUniform2i(location, x, y);
|
||||||
@ -750,6 +800,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform2iv(location, count, v);
|
iOSGL.glUniform2iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
iOSGL.glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
iOSGL.glUniform3f(location, x, y, z);
|
iOSGL.glUniform3f(location, x, y, z);
|
||||||
@ -760,6 +815,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform3fv(location, count, v);
|
iOSGL.glUniform3fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
iOSGL.glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
iOSGL.glUniform3i(location, x, y, z);
|
iOSGL.glUniform3i(location, x, y, z);
|
||||||
@ -770,6 +830,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform3iv(location, count, v);
|
iOSGL.glUniform3iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
uniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
iOSGL.glUniform4f(location, x, y, z, w);
|
iOSGL.glUniform4f(location, x, y, z, w);
|
||||||
@ -780,6 +845,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform4fv(location, count, v);
|
iOSGL.glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
iOSGL.glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
iOSGL.glUniform4i(location, x, y, z, w);
|
iOSGL.glUniform4i(location, x, y, z, w);
|
||||||
@ -790,6 +860,11 @@ public class IosGL implements GL {
|
|||||||
iOSGL.glUniform4iv(location, count, v);
|
iOSGL.glUniform4iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
iOSGL.glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
iOSGL.glUniformMatrix2fv(
|
iOSGL.glUniformMatrix2fv(
|
||||||
@ -799,6 +874,11 @@ public class IosGL implements GL {
|
|||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
iOSGL.glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
iOSGL.glUniformMatrix3fv(
|
iOSGL.glUniformMatrix3fv(
|
||||||
@ -808,6 +888,11 @@ public class IosGL implements GL {
|
|||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
iOSGL.glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
iOSGL.glUniformMatrix4fv(
|
iOSGL.glUniformMatrix4fv(
|
||||||
@ -817,6 +902,11 @@ public class IosGL implements GL {
|
|||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
iOSGL.glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
iOSGL.glUseProgram(program);
|
iOSGL.glUseProgram(program);
|
||||||
|
@ -1,5 +1,20 @@
|
|||||||
package org.oscim.gdx.client;
|
/*
|
||||||
|
* Copyright 2014 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright 2011 See AUTHORS file.
|
* Copyright 2011 See AUTHORS file.
|
||||||
* <p/>
|
* <p/>
|
||||||
@ -16,6 +31,8 @@ package org.oscim.gdx.client;
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
package org.oscim.gdx.client;
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.gwt.GwtGL20;
|
import com.badlogic.gdx.backends.gwt.GwtGL20;
|
||||||
import com.badlogic.gdx.graphics.Pixmap;
|
import com.badlogic.gdx.graphics.Pixmap;
|
||||||
import com.google.gwt.typedarrays.client.Uint8ArrayNative;
|
import com.google.gwt.typedarrays.client.Uint8ArrayNative;
|
||||||
@ -37,15 +54,10 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
this.gl = gl;
|
this.gl = gl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public void glGetShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void glTexImage2D(int target, int level, int internalformat, int width, int height,
|
public void glTexImage2D(int target, int level, int internalformat, int width, int height,
|
||||||
int border, int format, int type, Buffer pixels) {
|
int border, int format, int type, Buffer pixels) {
|
||||||
|
/*glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);*/
|
||||||
if (pixels == null) {
|
if (pixels == null) {
|
||||||
gl.texImage2D(target, level, internalformat,
|
gl.texImage2D(target, level, internalformat,
|
||||||
width, height, border, format,
|
width, height, border, format,
|
||||||
@ -165,6 +177,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glDeleteTextures(n, textures);
|
glDeleteTextures(n, textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTexture(int texture) {
|
||||||
|
glDeleteTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void depthFunc(int func) {
|
public void depthFunc(int func) {
|
||||||
glDepthFunc(func);
|
glDepthFunc(func);
|
||||||
@ -220,6 +237,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glGenTextures(n, textures);
|
glGenTextures(n, textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genTexture() {
|
||||||
|
return glGenTexture();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getError() {
|
public int getError() {
|
||||||
return glGetError();
|
return glGetError();
|
||||||
@ -356,6 +378,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glDeleteBuffers(n, buffers);
|
glDeleteBuffers(n, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFramebuffer(int framebuffer) {
|
||||||
|
glDeleteFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
public void getBufferParameteriv(int target, int pname, IntBuffer params) {
|
||||||
glGetBufferParameteriv(target, pname, params);
|
glGetBufferParameteriv(target, pname, params);
|
||||||
@ -461,6 +488,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
return glCreateShader(type);
|
return glCreateShader(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBuffer(int buffer) {
|
||||||
|
glDeleteBuffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
public void deleteFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
glDeleteFramebuffers(n, framebuffers);
|
glDeleteFramebuffers(n, framebuffers);
|
||||||
@ -471,6 +503,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glDeleteProgram(program);
|
glDeleteProgram(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteRenderbuffer(int renderbuffer) {
|
||||||
|
glDeleteRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
glDeleteRenderbuffers(n, renderbuffers);
|
glDeleteRenderbuffers(n, renderbuffers);
|
||||||
@ -508,16 +545,31 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genBuffer() {
|
||||||
|
return glGenBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateMipmap(int target) {
|
public void generateMipmap(int target) {
|
||||||
glGenerateMipmap(target);
|
glGenerateMipmap(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genFramebuffer() {
|
||||||
|
return glGenFramebuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
public void genFramebuffers(int n, IntBuffer framebuffers) {
|
||||||
glGenFramebuffers(n, framebuffers);
|
glGenFramebuffers(n, framebuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int genRenderbuffer() {
|
||||||
|
return glGenRenderbuffer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
public void genRenderbuffers(int n, IntBuffer renderbuffers) {
|
||||||
glGenRenderbuffers(n, renderbuffers);
|
glGenRenderbuffers(n, renderbuffers);
|
||||||
@ -600,11 +652,6 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
precision);
|
precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source) {
|
|
||||||
throw new UnsupportedOperationException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getUniformfv(int program, int location, FloatBuffer params) {
|
public void getUniformfv(int program, int location, FloatBuffer params) {
|
||||||
glGetUniformfv(program, location, params);
|
glGetUniformfv(program, location, params);
|
||||||
@ -714,6 +761,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform1fv(location, count, v);
|
glUniform1fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1fv(int location, int count, float[] v, int offset) {
|
||||||
|
glUniform1fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform1i(int location, int x) {
|
public void uniform1i(int location, int x) {
|
||||||
glUniform1i(location, x);
|
glUniform1i(location, x);
|
||||||
@ -724,6 +776,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform1iv(location, count, v);
|
glUniform1iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform1iv(int location, int count, int[] v, int offset) {
|
||||||
|
glUniform1iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2f(int location, float x, float y) {
|
public void uniform2f(int location, float x, float y) {
|
||||||
glUniform2f(location, x, y);
|
glUniform2f(location, x, y);
|
||||||
@ -734,6 +791,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform2fv(location, count, v);
|
glUniform2fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2fv(int location, int count, float[] v, int offset) {
|
||||||
|
glUniform2fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform2i(int location, int x, int y) {
|
public void uniform2i(int location, int x, int y) {
|
||||||
glUniform2i(location, x, y);
|
glUniform2i(location, x, y);
|
||||||
@ -744,6 +806,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform2iv(location, count, v);
|
glUniform2iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset) {
|
||||||
|
glUniform2iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3f(int location, float x, float y, float z) {
|
public void uniform3f(int location, float x, float y, float z) {
|
||||||
glUniform3f(location, x, y, z);
|
glUniform3f(location, x, y, z);
|
||||||
@ -754,6 +821,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform3fv(location, count, v);
|
glUniform3fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset) {
|
||||||
|
glUniform3fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform3i(int location, int x, int y, int z) {
|
public void uniform3i(int location, int x, int y, int z) {
|
||||||
glUniform3i(location, x, y, z);
|
glUniform3i(location, x, y, z);
|
||||||
@ -764,6 +836,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform3iv(location, count, v);
|
glUniform3iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform3iv(int location, int count, int[] v, int offset) {
|
||||||
|
glUniform3iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4f(int location, float x, float y, float z, float w) {
|
public void uniform4f(int location, float x, float y, float z, float w) {
|
||||||
glUniform4f(location, x, y, z, w);
|
glUniform4f(location, x, y, z, w);
|
||||||
@ -774,6 +851,11 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform4fv(location, count, v);
|
glUniform4fv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4fv(int location, int count, float[] v, int offset) {
|
||||||
|
glUniform4fv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniform4i(int location, int x, int y, int z, int w) {
|
public void uniform4i(int location, int x, int y, int z, int w) {
|
||||||
glUniform4i(location, x, y, z, w);
|
glUniform4i(location, x, y, z, w);
|
||||||
@ -784,21 +866,41 @@ public class GdxGL extends GwtGL20 implements GL {
|
|||||||
glUniform4iv(location, count, v);
|
glUniform4iv(location, count, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniform4iv(int location, int count, int[] v, int offset) {
|
||||||
|
glUniform4iv(location, count, v, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
glUniformMatrix2fv(location, count, transpose, value);
|
glUniformMatrix2fv(location, count, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
glUniformMatrix2fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
glUniformMatrix3fv(location, count, transpose, value);
|
glUniformMatrix3fv(location, count, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
glUniformMatrix3fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value) {
|
||||||
glUniformMatrix4fv(location, count, transpose, value);
|
glUniformMatrix4fv(location, count, transpose, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) {
|
||||||
|
glUniformMatrix4fv(location, count, transpose, value, offset);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void useProgram(int program) {
|
public void useProgram(int program) {
|
||||||
glUseProgram(program);
|
glUseProgram(program);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -386,6 +387,8 @@ public interface GL {
|
|||||||
|
|
||||||
public void deleteTextures(int n, IntBuffer textures);
|
public void deleteTextures(int n, IntBuffer textures);
|
||||||
|
|
||||||
|
public void deleteTexture(int texture);
|
||||||
|
|
||||||
public void depthFunc(int func);
|
public void depthFunc(int func);
|
||||||
|
|
||||||
public void depthMask(boolean flag);
|
public void depthMask(boolean flag);
|
||||||
@ -408,6 +411,8 @@ public interface GL {
|
|||||||
|
|
||||||
public void genTextures(int n, IntBuffer textures);
|
public void genTextures(int n, IntBuffer textures);
|
||||||
|
|
||||||
|
public int genTexture();
|
||||||
|
|
||||||
public int getError();
|
public int getError();
|
||||||
|
|
||||||
public void getIntegerv(int pname, IntBuffer params);
|
public void getIntegerv(int pname, IntBuffer params);
|
||||||
@ -472,12 +477,18 @@ public interface GL {
|
|||||||
|
|
||||||
public int createShader(int type);
|
public int createShader(int type);
|
||||||
|
|
||||||
|
public void deleteBuffer(int buffer);
|
||||||
|
|
||||||
public void deleteBuffers(int n, IntBuffer buffers);
|
public void deleteBuffers(int n, IntBuffer buffers);
|
||||||
|
|
||||||
|
public void deleteFramebuffer(int framebuffer);
|
||||||
|
|
||||||
public void deleteFramebuffers(int n, IntBuffer framebuffers);
|
public void deleteFramebuffers(int n, IntBuffer framebuffers);
|
||||||
|
|
||||||
public void deleteProgram(int program);
|
public void deleteProgram(int program);
|
||||||
|
|
||||||
|
public void deleteRenderbuffer(int renderbuffer);
|
||||||
|
|
||||||
public void deleteRenderbuffers(int n, IntBuffer renderbuffers);
|
public void deleteRenderbuffers(int n, IntBuffer renderbuffers);
|
||||||
|
|
||||||
public void deleteShader(int shader);
|
public void deleteShader(int shader);
|
||||||
@ -494,12 +505,18 @@ public interface GL {
|
|||||||
|
|
||||||
public void framebufferTexture2D(int target, int attachment, int textarget, int texture, int level);
|
public void framebufferTexture2D(int target, int attachment, int textarget, int texture, int level);
|
||||||
|
|
||||||
|
public int genBuffer();
|
||||||
|
|
||||||
public void genBuffers(int n, IntBuffer buffers);
|
public void genBuffers(int n, IntBuffer buffers);
|
||||||
|
|
||||||
public void generateMipmap(int target);
|
public void generateMipmap(int target);
|
||||||
|
|
||||||
|
public int genFramebuffer();
|
||||||
|
|
||||||
public void genFramebuffers(int n, IntBuffer framebuffers);
|
public void genFramebuffers(int n, IntBuffer framebuffers);
|
||||||
|
|
||||||
|
public int genRenderbuffer();
|
||||||
|
|
||||||
public void genRenderbuffers(int n, IntBuffer renderbuffers);
|
public void genRenderbuffers(int n, IntBuffer renderbuffers);
|
||||||
|
|
||||||
// deviates
|
// deviates
|
||||||
@ -534,8 +551,6 @@ public interface GL {
|
|||||||
|
|
||||||
public void getShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision);
|
public void getShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision);
|
||||||
|
|
||||||
public void getShaderSource(int shader, int bufsize, Buffer length, String source);
|
|
||||||
|
|
||||||
public void getTexParameterfv(int target, int pname, FloatBuffer params);
|
public void getTexParameterfv(int target, int pname, FloatBuffer params);
|
||||||
|
|
||||||
public void getTexParameteriv(int target, int pname, IntBuffer params);
|
public void getTexParameteriv(int target, int pname, IntBuffer params);
|
||||||
@ -595,40 +610,62 @@ public interface GL {
|
|||||||
|
|
||||||
public void uniform1fv(int location, int count, FloatBuffer v);
|
public void uniform1fv(int location, int count, FloatBuffer v);
|
||||||
|
|
||||||
|
public void uniform1fv(int location, int count, float v[], int offset);
|
||||||
|
|
||||||
public void uniform1i(int location, int x);
|
public void uniform1i(int location, int x);
|
||||||
|
|
||||||
public void uniform1iv(int location, int count, IntBuffer v);
|
public void uniform1iv(int location, int count, IntBuffer v);
|
||||||
|
|
||||||
|
public void uniform1iv(int location, int count, int v[], int offset);
|
||||||
|
|
||||||
public void uniform2f(int location, float x, float y);
|
public void uniform2f(int location, float x, float y);
|
||||||
|
|
||||||
public void uniform2fv(int location, int count, FloatBuffer v);
|
public void uniform2fv(int location, int count, FloatBuffer v);
|
||||||
|
|
||||||
|
public void uniform2fv(int location, int count, float v[], int offset);
|
||||||
|
|
||||||
public void uniform2i(int location, int x, int y);
|
public void uniform2i(int location, int x, int y);
|
||||||
|
|
||||||
public void uniform2iv(int location, int count, IntBuffer v);
|
public void uniform2iv(int location, int count, IntBuffer v);
|
||||||
|
|
||||||
|
public void uniform2iv(int location, int count, int[] v, int offset);
|
||||||
|
|
||||||
public void uniform3f(int location, float x, float y, float z);
|
public void uniform3f(int location, float x, float y, float z);
|
||||||
|
|
||||||
public void uniform3fv(int location, int count, FloatBuffer v);
|
public void uniform3fv(int location, int count, FloatBuffer v);
|
||||||
|
|
||||||
|
public void uniform3fv(int location, int count, float[] v, int offset);
|
||||||
|
|
||||||
public void uniform3i(int location, int x, int y, int z);
|
public void uniform3i(int location, int x, int y, int z);
|
||||||
|
|
||||||
public void uniform3iv(int location, int count, IntBuffer v);
|
public void uniform3iv(int location, int count, IntBuffer v);
|
||||||
|
|
||||||
|
public void uniform3iv(int location, int count, int v[], int offset);
|
||||||
|
|
||||||
public void uniform4f(int location, float x, float y, float z, float w);
|
public void uniform4f(int location, float x, float y, float z, float w);
|
||||||
|
|
||||||
public void uniform4fv(int location, int count, FloatBuffer v);
|
public void uniform4fv(int location, int count, FloatBuffer v);
|
||||||
|
|
||||||
|
public void uniform4fv(int location, int count, float v[], int offset);
|
||||||
|
|
||||||
public void uniform4i(int location, int x, int y, int z, int w);
|
public void uniform4i(int location, int x, int y, int z, int w);
|
||||||
|
|
||||||
public void uniform4iv(int location, int count, IntBuffer v);
|
public void uniform4iv(int location, int count, IntBuffer v);
|
||||||
|
|
||||||
|
public void uniform4iv(int location, int count, int v[], int offset);
|
||||||
|
|
||||||
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value);
|
public void uniformMatrix2fv(int location, int count, boolean transpose, FloatBuffer value);
|
||||||
|
|
||||||
|
public void uniformMatrix2fv(int location, int count, boolean transpose, float value[], int offset);
|
||||||
|
|
||||||
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value);
|
public void uniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value);
|
||||||
|
|
||||||
|
public void uniformMatrix3fv(int location, int count, boolean transpose, float value[], int offset);
|
||||||
|
|
||||||
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value);
|
public void uniformMatrix4fv(int location, int count, boolean transpose, FloatBuffer value);
|
||||||
|
|
||||||
|
public void uniformMatrix4fv(int location, int count, boolean transpose, float value[], int offset);
|
||||||
|
|
||||||
public void useProgram(int program);
|
public void useProgram(int program);
|
||||||
|
|
||||||
public void validateProgram(int program);
|
public void validateProgram(int program);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user