ConfigResettable configures the pool for persistent, resettable command buffers, used for rendering commands.
(dv *Device)
| 34 | // ConfigResettable configures the pool for persistent, |
| 35 | // resettable command buffers, used for rendering commands. |
| 36 | func (cp *CmdPool) ConfigResettable(dv *Device) { |
| 37 | var cmdPool vk.CommandPool |
| 38 | ret := vk.CreateCommandPool(dv.Device, &vk.CommandPoolCreateInfo{ |
| 39 | SType: vk.StructureTypeCommandPoolCreateInfo, |
| 40 | QueueFamilyIndex: dv.QueueIndex, |
| 41 | Flags: vk.CommandPoolCreateFlags(vk.CommandPoolCreateResetCommandBufferBit), |
| 42 | }, nil, &cmdPool) |
| 43 | IfPanic(NewError(ret)) |
| 44 | cp.Pool = cmdPool |
| 45 | } |
| 46 | |
| 47 | // NewBuffer makes a buffer in pool, setting Buff to point to it |
| 48 | // if Buff == nil, returning the buffer. |