updated api.
This commit is contained in:
parent
a71b418c52
commit
2b4790689e
@ -20,6 +20,7 @@ public class BufferObject extends NativeObject {
|
||||
|
||||
public enum Layout {
|
||||
std140,
|
||||
std430,
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,17 @@ import static java.util.Objects.requireNonNull;
|
||||
*/
|
||||
public class BufferObjectField {
|
||||
|
||||
/**
|
||||
* The method to create a new field.
|
||||
*
|
||||
* @param name the field's name.
|
||||
* @param type the field's type.
|
||||
* @return the new field.
|
||||
*/
|
||||
public static BufferObjectField field(final String name, final VarType type) {
|
||||
return new BufferObjectField(name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* The field name.
|
||||
*/
|
||||
|
@ -11,6 +11,10 @@ public class ShaderStorageBufferObject extends BufferObject {
|
||||
super(binding, layout, fields);
|
||||
}
|
||||
|
||||
public ShaderStorageBufferObject(final int binding, final BufferObjectField... fields) {
|
||||
super(binding, Layout.std430, fields);
|
||||
}
|
||||
|
||||
public ShaderStorageBufferObject(final int id) {
|
||||
super(id);
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ package com.jme3.shader;
|
||||
*/
|
||||
public class UniformBufferObject extends BufferObject {
|
||||
|
||||
public UniformBufferObject(final int binding, final Layout layout, final BufferObjectField... fields) {
|
||||
super(binding, layout, fields);
|
||||
public UniformBufferObject(final int binding, final BufferObjectField... fields) {
|
||||
super(binding, Layout.std140, fields);
|
||||
}
|
||||
|
||||
public UniformBufferObject(final int id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user