- java.lang.Object
-
- com.io7m.jcoronado.lwjgl.VulkanLWJGLMappedMemory
-
- All Implemented Interfaces:
VulkanMappedMemoryType
,java.lang.AutoCloseable
public final class VulkanLWJGLMappedMemory extends java.lang.Object implements VulkanMappedMemoryType
A section of mapped memory.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
asByteBuffer()
void
close()
Unmap the memory.void
flush()
Flush this mapped memory.void
flushRange(long offset, long size)
Flush the given memory range.boolean
isMapped()
-
-
-
Method Detail
-
isMapped
public boolean isMapped()
- Specified by:
isMapped
in interfaceVulkanMappedMemoryType
- Returns:
true
iffVulkanMappedMemoryType.close()
has not been called
-
flushRange
public void flushRange(long offset, long size) throws VulkanException
Description copied from interface:VulkanMappedMemoryType
Flush the given memory range.- Specified by:
flushRange
in interfaceVulkanMappedMemoryType
- Parameters:
offset
- The offsetsize
- The size- Throws:
VulkanException
- On errors- See Also:
VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)
-
flush
public void flush() throws VulkanException
Description copied from interface:VulkanMappedMemoryType
Flush this mapped memory.- Specified by:
flush
in interfaceVulkanMappedMemoryType
- Throws:
VulkanException
- On errors- See Also:
VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)
-
close
public void close()
Description copied from interface:VulkanMappedMemoryType
Unmap the memory.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceVulkanMappedMemoryType
-
asByteBuffer
public java.nio.ByteBuffer asByteBuffer()
- Specified by:
asByteBuffer
in interfaceVulkanMappedMemoryType
- Returns:
- The mapped memory as a byte buffer
-
-