Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,16 @@ public String glGetProgramInfoLog(int program, int maxLength) {

@Override
public long glGetQueryObjectui64(int query, int pname) {
IntBuffer buff = IntBuffer.allocate(1);
IntBuffer buff = tmpBuff.clear();
//FIXME This is wrong IMO should be glGetQueryObjectui64v with a LongBuffer but it seems the API doesn't provide it.
GLES30.glGetQueryObjectuiv(query, pname, buff);
return buff.get(0);
}

@Override
public int glGetQueryObjectiv(int query, int pname) {
IntBuffer buff = IntBuffer.allocate(1);
GLES30.glGetQueryiv(query, pname, buff);
IntBuffer buff = tmpBuff.clear();
GLES30.glGetQueryObjectuiv(query, pname, buff);
return buff.get(0);
}

Expand Down Expand Up @@ -758,5 +758,10 @@ public void glGenVertexArrays(IntBuffer arrays) {

}

@Override
public String glGetString(int name, int index) {
return GLES30.glGetStringi(name, index);
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ public interface GLES_30 extends GL {

public static final int GL_RGB10_A2 = 0x8059;
public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368;

public static final int GL_NUM_EXTENSIONS = 0x821D;

public void glBindVertexArray(int array);

public void glDeleteVertexArrays(IntBuffer arrays);

public void glGenVertexArrays(IntBuffer arrays);

public String glGetString(final int name, final int index);

}
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ private HashSet<String> loadExtensions() {
gl3.glGetInteger(GL3.GL_NUM_EXTENSIONS, intBuf16);
int extensionCount = intBuf16.get(0);
for (int i = 0; i < extensionCount; i++) {
String extension = gl3.glGetString(GL.GL_EXTENSIONS, i);
String extension = gl3.glGetString(GL3.GL_EXTENSIONS, i);
extensionSet.add(extension);
}
} else if (caps.contains(Caps.OpenGLES30)) {
GLES_30 gles = (GLES_30) gl;
gles.glGetInteger(GLES_30.GL_NUM_EXTENSIONS, intBuf16);
int extensionCount = intBuf16.get(0);
for (int i = 0; i < extensionCount; i++) {
String extension = gles.glGetString(GLES_30.GL_EXTENSIONS, i);
extensionSet.add(extension);
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions jme3-ios/src/main/java/com/jme3/renderer/ios/IosGL.java
Original file line number Diff line number Diff line change
Expand Up @@ -809,5 +809,9 @@ public void glGenVertexArrays(IntBuffer arrays) {
throw new UnsupportedOperationException("Unimplemented method 'glGenVertexArrays'");
}

@Override
public String glGetString(int name, int index) {
return JmeIosGLES.glGetStringi(name, index);
}

}
2 changes: 2 additions & 0 deletions jme3-ios/src/main/java/com/jme3/renderer/ios/JmeIosGLES.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ private JmeIosGLES() {
public static native String glGetShaderInfoLog(int shader);
public static native void glGetShaderiv(int shader, int pname, int[] params, int offset);
public static native String glGetString(int name);

public static native String glGetStringi(int name, int index);
public static native int glGetUniformLocation(int program, String name);
public static native boolean glIsEnabled(int cap);
public static native boolean glIsFramebuffer(int framebuffer);
Expand Down
Loading