diff --git a/jme3-core/src/main/java/com/jme3/material/Material.java b/jme3-core/src/main/java/com/jme3/material/Material.java index f8cac2b74..3690713a6 100644 --- a/jme3-core/src/main/java/com/jme3/material/Material.java +++ b/jme3-core/src/main/java/com/jme3/material/Material.java @@ -798,7 +798,7 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable { if(type == VarType.ShaderStorageBufferObject) { final StorageBlock storageBlock = shader.getStorageBlock(name); - storageBlock.setValue(param.getValue()); + storageBlock.setStorageData(param.getValue()); } else { diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java index 8f1cb535e..085d9cadd 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java @@ -108,6 +108,19 @@ public class GLDebugDesktop extends GLDebugES implements GL2, GL3, GL4 { checkError(); } + @Override + public int glGetProgramResourceIndex(int program, int programInterface, String name) { + final int result = gl4.glGetProgramResourceIndex(program, programInterface, name); + checkError(); + return result; + } + + @Override + public void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { + gl4.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + checkError(); + } + public void glBlendEquationSeparate(int colorMode, int alphaMode) { gl.glBlendEquationSeparate(colorMode, alphaMode); checkError(); diff --git a/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java index bb9797cf9..5cc7b091c 100644 --- a/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java +++ b/jme3-jogl/src/main/java/com/jme3/renderer/jogl/JoglGL.java @@ -627,7 +627,7 @@ public class JoglGL implements GL, GL2, GL3, GL4 { public void glPatchParameter(int count) { GLContext.getCurrentGL().getGL3().glPatchParameteri(com.jogamp.opengl.GL3.GL_PATCH_VERTICES, count); } - + @Override public void glDeleteVertexArrays(IntBuffer arrays) { checkLimit(arrays); @@ -643,4 +643,15 @@ public class JoglGL implements GL, GL2, GL3, GL4 { public void glBindBufferBase(final int target, final int index, final int buffer) { GLContext.getCurrentGL().getGL3bc().glBindBufferBase(target, index, buffer); } + + @Override + public int glGetProgramResourceIndex(final int program, final int programInterface, final String name) { + throw new UnsupportedOperationException(); + //return GLContext.getCurrentGL().getGL4bc().glGetProgramResourceIndex(program, programInterface, name); + } + + @Override + public void glShaderStorageBlockBinding(final int program, final int storageBlockIndex, final int storageBlockBinding) { + GLContext.getCurrentGL().getGL4bc().glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + } } diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java index f040d39ca..68d974520 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java @@ -483,7 +483,17 @@ public final class LwjglGL implements GL, GL2, GL3, GL4 { public void glPatchParameter(int count) { GL40.glPatchParameteri(GL40.GL_PATCH_VERTICES,count); } - + + @Override + public int glGetProgramResourceIndex(final int program, final int programInterface, final String name) { + return GL43.glGetProgramResourceIndex(program, programInterface, name); + } + + @Override + public void glShaderStorageBlockBinding(final int program, final int storageBlockIndex, final int storageBlockBinding) { + GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + } + @Override public void glDeleteVertexArrays(IntBuffer arrays) { checkLimit(arrays); diff --git a/jme3-lwjgl3/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java b/jme3-lwjgl3/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java index d8540e39a..e535ee141 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/renderer/lwjgl/LwjglGL.java @@ -616,6 +616,16 @@ public class LwjglGL extends LwjglRender implements GL, GL2, GL3, GL4 { GL40.glPatchParameteri(GL40.GL_PATCH_VERTICES, count); } + @Override + public int glGetProgramResourceIndex(final int program, final int programInterface, final String name) { + return GL43.glGetProgramResourceIndex(program, programInterface, name); + } + + @Override + public void glShaderStorageBlockBinding(final int program, final int storageBlockIndex, final int storageBlockBinding) { + GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + } + @Override public void glDeleteVertexArrays(final IntBuffer arrays) { checkLimit(arrays);