Package com.google.android.filament
Class BufferObject.Builder
- java.lang.Object
-
- com.google.android.filament.BufferObject.Builder
-
- Enclosing class:
- BufferObject
public static class BufferObject.Builder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBufferObject.Builder.BindingType
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferObject.BuilderbindingType(BufferObject.Builder.BindingType bindingType)The binding type for this buffer object.BufferObjectbuild(Engine engine)Creates and returns theBufferObjectobject.BufferObject.Buildersize(int byteCount)Size of the buffer in bytes.
-
-
-
Method Detail
-
size
@NonNull public BufferObject.Builder size(@IntRange(from=1L) int byteCount)
Size of the buffer in bytes.- Parameters:
byteCount- Maximum number of bytes the BufferObject can hold.- Returns:
- A reference to this Builder for chaining calls.
-
bindingType
@NonNull public BufferObject.Builder bindingType(@NonNull BufferObject.Builder.BindingType bindingType)
The binding type for this buffer object. (defaults to VERTEX)- Parameters:
bindingType- Distinguishes between SSBO, VBO, etc. For now this must be VERTEX.- Returns:
- A reference to this Builder for chaining calls.
-
build
@NonNull public BufferObject build(@NonNull Engine engine)
Creates and returns theBufferObjectobject. After creation, the buffer is uninitialized. UseBufferObject.setBuffer(com.google.android.filament.Engine, java.nio.Buffer)to initialize theBufferObject.- Parameters:
engine- reference to theEngineto associate thisBufferObjectwith- Returns:
- the newly created
BufferObjectobject - Throws:
java.lang.IllegalStateException- if the BufferObject could not be created- See Also:
BufferObject.setBuffer(com.google.android.filament.Engine, java.nio.Buffer)
-
-