@Override
    public void setUniformBufferObject(int bindingPoint, BufferObject bufferObject) {
        if (bufferObject.isUpdateNeeded()) {
            updateUniformBufferObjectData(bufferObject);
        }

        if (context.boundBO[bindingPoint] == null || context.boundBO[bindingPoint].get() != bufferObject) {
            gl3.glBindBufferBase(GL3.GL_UNIFORM_BUFFER, bindingPoint, bufferObject.getId());
            bufferObject.setBinding(bindingPoint);
            context.boundBO[bindingPoint] = bufferObject.getWeakRef();
        }

        bufferObject.setBinding(bindingPoint);

        if (debug && caps.contains(Caps.GLDebug)) {
            if (bufferObject.getName() != null) glext.glObjectLabel(GLExt.GL_BUFFER, bufferObject.getId(), bufferObject.getName());
        }

    }
Uploads the given image to the GL driver.

@param img The image to upload
@param type How the data in the image argument should be interpreted.
@param unit The texture slot to be used to upload the image, not important
@param scaleToPot If true, the image will be scaled to power-of-2 dimensions
before being uploaded.
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java