Package com.google.android.filament
Class IndexBuffer.Builder
- java.lang.Object
-
- com.google.android.filament.IndexBuffer.Builder
-
- Enclosing class:
- IndexBuffer
public static class IndexBuffer.Builder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexBuffer.Builder.IndexTypeType of the index buffer.
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexBuffer.BuilderbufferType(IndexBuffer.Builder.IndexType indexType)Type of the index buffer, 16-bit or 32-bit.IndexBufferbuild(Engine engine)Creates and returns theIndexBufferobject.IndexBuffer.BuilderindexCount(int indexCount)Size of the index buffer in elements.
-
-
-
Method Detail
-
indexCount
@NonNull public IndexBuffer.Builder indexCount(@IntRange(from=1L) int indexCount)
Size of the index buffer in elements.- Parameters:
indexCount- number of indices theIndexBuffercan hold- Returns:
- this
Builderobject for chaining calls
-
bufferType
@NonNull public IndexBuffer.Builder bufferType(@NonNull IndexBuffer.Builder.IndexType indexType)
Type of the index buffer, 16-bit or 32-bit.- Parameters:
indexType- type of indices stored in theIndexBuffer- Returns:
- this
Builderobject for chaining calls
-
build
@NonNull public IndexBuffer build(@NonNull Engine engine)
Creates and returns theIndexBufferobject. After creation, the index buffer is uninitialized. UseIndexBuffer.setBuffer(com.google.android.filament.Engine, java.nio.Buffer)to initialized theIndexBuffer.- Parameters:
engine- reference to theEngineto associate thisIndexBufferwith- Returns:
- the newly created
IndexBufferobject - Throws:
java.lang.IllegalStateException- if the IndexBuffer could not be created- See Also:
IndexBuffer.setBuffer(com.google.android.filament.Engine, java.nio.Buffer)
-
-