Class BufferLayout
java.lang.Object
com.jme3.shader.bufferobject.layout.BufferLayout
- Direct Known Subclasses:
- RawLayout,- Std140Layout
Layout serializer for buffers
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
BufferLayoutpublic BufferLayout()
 
- 
- 
Method Details- 
getSerializer
- 
registerSerializerRegister a serializer- Parameters:
- serializer- An object of type- BufferLayout.ObjectSerializer
 
- 
estimateSizeEstimate size of Object when serialized accordingly with std140- Parameters:
- o- the object to serialize
- Returns:
- the size
 
- 
getBasicAlignmentGet basic alignment of Object when serialized accordingly with std140- Parameters:
- o- the object to serialize
- Returns:
- the basic alignment
 
- 
alignpublic int align(int pos, int basicAlignment) Align a position to the given basicAlignment- Parameters:
- pos- the position to align
- basicAlignment- the basic alignment
- Returns:
- the aligned position
 
- 
writeSerialize 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
 
-