Class BufferWriter
java.lang.Object
dev.engine.core.gpu.BufferWriter
Writes typed values to a
NativeMemory for GPU buffer upload.
Works with any buffer: UBOs, SSBOs, mapped streaming buffers, staging buffers.
Matrices are written in column-major order (GPU convention). Booleans are written as 4-byte ints (GLSL bool layout). Texture handles are written as uint64 (bindless).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the GPU byte size for a given type.static booleanReturns true if the type is supported by BufferWriter.static voidwrite(NativeMemory mem, long offset, boolean value) static voidwrite(NativeMemory mem, long offset, float value) static voidwrite(NativeMemory mem, long offset, int value) static voidwrite(NativeMemory mem, long offset, Mat4 m) static voidwrite(NativeMemory mem, long offset, Vec2 v) static voidwrite(NativeMemory mem, long offset, Vec3 v) static voidwrite(NativeMemory mem, long offset, Vec4 v) static voidwrite(NativeMemory mem, long offset, Object value) static voidwriteTextureHandle(NativeMemory mem, long offset, long handle)
-
Field Details
-
TEXTURE_HANDLE_SIZE
public static final int TEXTURE_HANDLE_SIZE- See Also:
-
-
Method Details
-
write
-
write
-
write
-
write
-
write
-
write
-
write
-
writeTextureHandle
-
write
-
sizeOf
Returns the GPU byte size for a given type. -
supports
Returns true if the type is supported by BufferWriter.
-