Class BufferLayout
java.lang.Object
com.jme3.shader.bufferobject.layout.BufferLayout
- Direct Known Subclasses:
 RawLayout,Std140Layout
Layout serializer for buffers
- 
Nested Class Summary
Nested Classes - 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintalign(int pos, int basicAlignment) Align a position to the given basicAlignmentintEstimate size of Object when serialized accordingly with std140intGet basic alignment of Object when serialized accordingly with std140abstract StringgetId()protected BufferLayout.ObjectSerializer<?>getSerializer(Object obj) protected voidregisterSerializer(BufferLayout.ObjectSerializer<?> serializer) Register a serializervoidwrite(ByteBuffer out, Object o) Serialize an object accordingly with the std140 layout and write the result to a BufferObject 
- 
Field Details
- 
serializers
 
 - 
 - 
Constructor Details
- 
BufferLayout
public BufferLayout() 
 - 
 - 
Method Details
- 
getSerializer
 - 
registerSerializer
Register a serializer- Parameters:
 type-
 - 
estimateSize
Estimate size of Object when serialized accordingly with std140- Parameters:
 o- the object to serialize- Returns:
 - the size
 
 - 
getBasicAlignment
Get basic alignment of Object when serialized accordingly with std140- Parameters:
 o- the object to serialize- Returns:
 - the basic alignment
 
 - 
align
public int align(int pos, int basicAlignment) Align a position to the given basicAlignment- Parameters:
 pos- the position to alignbasicAlignment- the basic alignment- Returns:
 - the aligned position
 
 - 
write
Serialize an object accordingly with the std140 layout and write the result to a BufferObject- Parameters:
 out- the output BufferObject where the object will be serialized (starting from the current position)o- the Object to serialize
 - 
getId
 
 -