Documentation ¶
Index ¶
- Constants
- Variables
- func CycleTime() uint32
- func CycleTimeFloat() float32
- func DefaultDebugReportCallback() vk.PfnDebugReportCallbackEXT
- func EnumerateExtensions(forLayer string) (m map[string]uint32, err error)
- func EnumerateLayers() (m map[string]uint32, err error)
- func SyncTime() time.Time
- func Timestamp() int64
- func ToSysTime(ms int64) time.Time
- func ToTimestamp(t time.Time) int64
- type BufferMemory
- type ClearValues
- type CommandBuffer
- func (cb CommandBuffer) AllocTempHandle() *vk.CommandBuffer
- func (cb CommandBuffer) Begin(flags vk.CommandBufferUsageFlags) error
- func (cb CommandBuffer) BeginRenderPass(pBeginInfo *vk.RenderPassBeginInfo, subpassContents vk.SubpassContents)
- func (cb CommandBuffer) BindDescriptorSets(pipelineBindPoint vk.PipelineBindPoint, layout vk.PipelineLayout, ...)
- func (cb CommandBuffer) BindPipeline(pipelineBindPoint vk.PipelineBindPoint, pipeline vk.Pipeline)
- func (cb CommandBuffer) BindVertexBuffers(firstBinding, bindingCount uint32, pBuffers *vk.Buffer, ...)
- func (cb CommandBuffer) ClearAttachments(attachmentCount uint32, pAttachments *vk.ClearAttachment, rectCount uint32, ...)
- func (cb CommandBuffer) ClearColorImage(image vk.Image, imageLayout vk.ImageLayout, pColor *vk.ClearColorValue, ...)
- func (cb CommandBuffer) CopyBuffer(srcBuffer, dstBuffer vk.Buffer, regionCount uint32, pRegions *vk.BufferCopy)
- func (cb CommandBuffer) CopyBufferToImage(srcBuffer vk.Buffer, dstImage vk.Image, dstImageLayout vk.ImageLayout, ...)
- func (cb CommandBuffer) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)
- func (cb CommandBuffer) DrawIndexed(indexCount, instanceCount, firstIndex uint32, vertexOffset int32, ...)
- func (cb CommandBuffer) End() error
- func (cb CommandBuffer) EndRenderPass()
- func (cb *CommandBuffer) Free()
- func (cb CommandBuffer) FreeTempHandle(tmpHandle *vk.CommandBuffer)
- func (cb CommandBuffer) PipelineBarrier(srcStageMask, dstStageMask vk.PipelineStageFlags, ...)
- func (cb CommandBuffer) PushConstants(layout vk.PipelineLayout, stageFlags vk.ShaderStageFlags, offset, size uint32, ...)
- func (cb *CommandBuffer) Reset(flags vk.CommandBufferResetFlags)
- func (cmd CommandBuffer) Submit(queue vk.Queue) error
- func (cb CommandBuffer) TransitionImageLayout(image vk.Image, format vk.Format, oldLayout vk.ImageLayout, ...)
- type CommandPool
- type CorePfns
- type DebugPfns
- type DescriptorBinding
- type DescriptorPool
- type DescriptorSetLayoutInfo
- type DescriptorSets
- type Device
- func (dev *Device) Close() error
- func (dev *Device) CreateBuffer(size uint64, usage vk.BufferUsageFlags, ...) (vb *BufferMemory, err error)
- func (dev *Device) CreateCommandPool(queueFamilyIndex uint32, flags vk.CommandPoolCreateFlags) (cp *CommandPool, err error)
- func (dev *Device) CreateDescriptorPool(sizes []vk.DescriptorPoolSize, maxSets uint32) (*DescriptorPool, error)
- func (dev *Device) CreateFence(flags vk.FenceCreateFlags) (fen *Fence, err error)
- func (dev *Device) CreateFontManager(layouts []vk.DescriptorSetLayout) (fman *FontManager, err error)
- func (dev *Device) CreateFramebuffer(image vk.Image, pass vk.RenderPass, format vk.Format, extent vk.Extent2D) (fb *Framebuffer, err error)
- func (dev *Device) CreateImage(ci *vk.ImageCreateInfo, memoryProperties vk.MemoryPropertyFlags) (vb *ImageMemory, err error)
- func (dev *Device) CreateImageView(image vk.Image, imageFormat vk.Format) (*ImageView, error)
- func (dev *Device) CreatePipeline(pipelineInfo PipelineInfo) (pl *Pipeline, err error)
- func (dev *Device) CreatePipelineLayout(setLayouts []vk.DescriptorSetLayout, pushConstantRanges []vk.PushConstantRange) (layout vk.PipelineLayout, err error)
- func (dev *Device) CreateRenderPass(renderPassInfo RenderPassInfo) (renderPass *RenderPass, err error)
- func (dev *Device) CreateSemaphore(flags vk.SemaphoreCreateFlags) (sem *Semaphore, err error)
- func (dev *Device) CreateTextureSampler(samplerInfo vk.SamplerCreateInfo) (smplr *Sampler, err error)
- func (dev *Device) GetQueue(idxFamily uint32) vk.Queue
- func (dev *Device) ResetFences(fens []vk.Fence) error
- func (dev *Device) TransitionImageLayout(image vk.Image, format vk.Format, oldLayout vk.ImageLayout, ...) (err error)
- func (dev *Device) UpdateDescriptorSets(writeCount uint32, pWrites *vk.WriteDescriptorSet, copyCount uint32, ...)
- func (dev *Device) WaitFences(fens []vk.Fence, waitAll bool, timeoutNsecs uint64) error
- type Fence
- type FontManager
- type FontTexture
- type FrameFlight
- type Framebuffer
- type ImageMemory
- type ImageView
- type InputAssembly
- type Instance
- func (inst *Instance) AllocDispatchableHandle() *vk.DispatchableHandle
- func (inst *Instance) AllocNonDispatchableHandle() *vk.NonDispatchableHandle
- func (inst *Instance) Close() error
- func (inst *Instance) CreateSysSurface(data SysSurfaceData) (vkSurface vk.SurfaceKHR, err error)
- func (inst *Instance) EnumPhysicalDevices() (list []*PhysicalDevice, err error)
- func (inst *Instance) FreeDispatchableHandle(p *vk.DispatchableHandle)
- func (inst *Instance) FreeNonDispatchableHandle(p *vk.NonDispatchableHandle)
- func (inst *Instance) LoadDeviceProc(device vk.Device, ppfn interface{}) error
- func (inst *Instance) LoadVulkanProc(ppfn interface{}) error
- type Mat3
- type Mat4
- type PhysicalDevice
- func (phy *PhysicalDevice) CreateLogicalDevice(opts *SurfaceProperties, exts []string) (*Device, error)
- func (phy *PhysicalDevice) EnumerateExtensions(layer string) (m map[string]uint32, err error)
- func (phy *PhysicalDevice) Features() (x vk.PhysicalDeviceFeatures)
- func (phy *PhysicalDevice) FindMemoryType(typeFilter uint32, properties vk.MemoryPropertyFlags) uint32
- func (phy *PhysicalDevice) FindQueueFamilies(win vk.SurfaceKHR) (graphics, present int)
- func (phy *PhysicalDevice) Name() (x string)
- func (phy *PhysicalDevice) PipelineCacheUUID() (x uuid.UUID)
- func (phy *PhysicalDevice) Properties() (x vk.PhysicalDeviceProperties)
- func (phy *PhysicalDevice) ResolveForSurface(sur vk.SurfaceKHR) (x uint32, ropts *SurfaceProperties)
- func (phy *PhysicalDevice) String() string
- type Pipeline
- type PipelineColorBlendAttachmentState
- type PipelineInfo
- type Point
- type Pool
- type PushConstantRange
- type Range
- type RasterizationInfo
- type Rect
- type RenderPass
- type RenderPassInfo
- type Sampler
- type Semaphore
- type ShaderModule
- type Size
- type SubpassInfo
- type Surface
- func (sur *Surface) AcquireNextImage(timeoutNsec uint64, semaphore vk.Semaphore, fence vk.Fence) (imageIndex uint32, err error)
- func (sur *Surface) Close() error
- func (sur *Surface) CreateFlight() (frm *FrameFlight, err error)
- func (sur *Surface) CreateFramebuffers(pass vk.RenderPass, format vk.Format, extent vk.Extent2D) (fbs []*Framebuffer, err error)
- func (sur *Surface) Init(self interface{}, inst *Instance, sys SysSurfaceData) (err error)
- func (sur *Surface) InitTextPipleline() (err error)
- func (sur *Surface) InitUiRenderPass() (err error)
- func (sur *Surface) OnCreateSurface() error
- func (sur *Surface) Pause()
- func (sur *Surface) PauseDur(ms int64)
- func (sur *Surface) Paused() bool
- func (sur *Surface) Recreate(self interface{}) (err error)
- func (sur *Surface) Resume()
- func (sur *Surface) WaitAllFences()
- type SurfaceCapabilities
- type SurfaceHandler
- type SurfaceProperties
- type SysPfns
- type SysSurfaceData
- type Text
- type Uni2D
- type Uni3DMat
- type UniEnvBlock
- type Vec2
- type Vec3
- type Vec4
- type VertexAttribute
- type VertexBinding
- type Viewport
Constants ¶
View Source
const ( MaxTimestamp = 0x7FFFFFFFFFFFFFFF MaxCycleTime = 0x00FFFFFF // 24 bit )
View Source
const ( Version = 1 DefaultVulkanVersion = vk.API_VERSION_1_1 )
Variables ¶
View Source
var (
DefaultAllocator *vk.AllocationCallbacks
)
Functions ¶
func CycleTimeFloat ¶
func CycleTimeFloat() float32
func DefaultDebugReportCallback ¶
func DefaultDebugReportCallback() vk.PfnDebugReportCallbackEXT
func EnumerateExtensions ¶
func EnumerateLayers ¶
func ToTimestamp ¶
Types ¶
type BufferMemory ¶
type BufferMemory struct { Handle vk.Buffer Memory vk.DeviceMemory Device *Device }
func (*BufferMemory) Close ¶
func (vb *BufferMemory) Close() error
func (*BufferMemory) FillMemory ¶
func (vb *BufferMemory) FillMemory(offset, size uint64, flags vk.MemoryMapFlags, pSrc unsafe.Pointer) error
func (*BufferMemory) MapMemory ¶
func (vb *BufferMemory) MapMemory(offset, size uint64, flags vk.MemoryMapFlags) (addr unsafe.Pointer, err error)
func (*BufferMemory) UnmapMemory ¶
func (vb *BufferMemory) UnmapMemory()
type ClearValues ¶
type ClearValues struct {
// contains filtered or unexported fields
}
func (ClearValues) Count ¶
func (cvs ClearValues) Count() int
func (*ClearValues) Free ¶
func (cvs *ClearValues) Free()
func (ClearValues) Get ¶
func (cvs ClearValues) Get(i int) *vk.ClearValue
func (ClearValues) Ptr ¶
func (cvs ClearValues) Ptr() *vk.ClearValue
func (*ClearValues) SetCount ¶
func (cvs *ClearValues) SetCount(n int)
type CommandBuffer ¶
type CommandBuffer struct { Handle vk.CommandBuffer Instance *Instance // for vkCmdXXX commands Pool *CommandPool // for free }
func (CommandBuffer) AllocTempHandle ¶
func (cb CommandBuffer) AllocTempHandle() *vk.CommandBuffer
func (CommandBuffer) Begin ¶
func (cb CommandBuffer) Begin(flags vk.CommandBufferUsageFlags) error
func (CommandBuffer) BeginRenderPass ¶
func (cb CommandBuffer) BeginRenderPass(pBeginInfo *vk.RenderPassBeginInfo, subpassContents vk.SubpassContents)
func (CommandBuffer) BindDescriptorSets ¶
func (cb CommandBuffer) BindDescriptorSets(pipelineBindPoint vk.PipelineBindPoint, layout vk.PipelineLayout, firstSet, descriptorSetCount uint32, pDescriptorSets *vk.DescriptorSet, dynamicOffsetCount uint32, pDynamicOffsets *uint32)
func (CommandBuffer) BindPipeline ¶
func (cb CommandBuffer) BindPipeline(pipelineBindPoint vk.PipelineBindPoint, pipeline vk.Pipeline)
func (CommandBuffer) BindVertexBuffers ¶
func (cb CommandBuffer) BindVertexBuffers(firstBinding, bindingCount uint32, pBuffers *vk.Buffer, pOffsets *vk.DeviceSize)
func (CommandBuffer) ClearAttachments ¶
func (cb CommandBuffer) ClearAttachments(attachmentCount uint32, pAttachments *vk.ClearAttachment, rectCount uint32, pRects *vk.ClearRect)
func (CommandBuffer) ClearColorImage ¶
func (cb CommandBuffer) ClearColorImage(image vk.Image, imageLayout vk.ImageLayout, pColor *vk.ClearColorValue, rangeCount uint32, pRanges *vk.ImageSubresourceRange)
func (CommandBuffer) CopyBuffer ¶
func (cb CommandBuffer) CopyBuffer(srcBuffer, dstBuffer vk.Buffer, regionCount uint32, pRegions *vk.BufferCopy)
func (CommandBuffer) CopyBufferToImage ¶
func (cb CommandBuffer) CopyBufferToImage(srcBuffer vk.Buffer, dstImage vk.Image, dstImageLayout vk.ImageLayout, regionCount uint32, pRegions *vk.BufferImageCopy)
func (CommandBuffer) Draw ¶
func (cb CommandBuffer) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)
func (CommandBuffer) DrawIndexed ¶
func (cb CommandBuffer) DrawIndexed(indexCount, instanceCount, firstIndex uint32, vertexOffset int32, firstInstance uint32)
func (CommandBuffer) End ¶
func (cb CommandBuffer) End() error
func (CommandBuffer) EndRenderPass ¶
func (cb CommandBuffer) EndRenderPass()
func (*CommandBuffer) Free ¶
func (cb *CommandBuffer) Free()
func (CommandBuffer) FreeTempHandle ¶
func (cb CommandBuffer) FreeTempHandle(tmpHandle *vk.CommandBuffer)
func (CommandBuffer) PipelineBarrier ¶
func (cb CommandBuffer) PipelineBarrier(srcStageMask, dstStageMask vk.PipelineStageFlags, dependencyFlags vk.DependencyFlags, memoryBarrierCount uint32, pMemoryBarriers *vk.MemoryBarrier, bufferMemoryBarrierCount uint32, pBufferMemoryBarriers *vk.BufferMemoryBarrier, imageMemoryBarrierCount uint32, pImageMemoryBarriers *vk.ImageMemoryBarrier)
func (CommandBuffer) PushConstants ¶
func (cb CommandBuffer) PushConstants(layout vk.PipelineLayout, stageFlags vk.ShaderStageFlags, offset, size uint32, pValues unsafe.Pointer)
func (*CommandBuffer) Reset ¶
func (cb *CommandBuffer) Reset(flags vk.CommandBufferResetFlags)
func (CommandBuffer) TransitionImageLayout ¶
func (cb CommandBuffer) TransitionImageLayout(image vk.Image, format vk.Format, oldLayout vk.ImageLayout, newLayout vk.ImageLayout)
type CommandPool ¶
type CommandPool struct { Handle vk.CommandPool Device *Device }
func (*CommandPool) Allocate ¶
func (pool *CommandPool) Allocate(lvl vk.CommandBufferLevel) (cb CommandBuffer, err error)
func (*CommandPool) BeginOneShot ¶
func (pool *CommandPool) BeginOneShot(lvl vk.CommandBufferLevel, flags vk.CommandBufferUsageFlags) (cb CommandBuffer, err error)
func (*CommandPool) Close ¶
func (cp *CommandPool) Close() error
type CorePfns ¶
type CorePfns struct { vk.PfnDestroyInstance vk.PfnGetDeviceProcAddr //vk.PfnEnumerateInstanceExtensionProperties vk.PfnDestroySurfaceKHR vk.PfnEnumeratePhysicalDevices vk.PfnGetPhysicalDeviceProperties vk.PfnEnumerateDeviceExtensionProperties vk.PfnGetPhysicalDeviceFeatures // TODO: vk.PfnGetPhysicalDeviceFeatures2 vk.PfnGetPhysicalDeviceQueueFamilyProperties vk.PfnCreateDevice vk.PfnDestroyDevice vk.PfnCreatePipelineCache vk.PfnDestroyPipelineCache vk.PfnGetPipelineCacheData vk.PfnGetDeviceQueue vk.PfnGetPhysicalDeviceSurfaceCapabilitiesKHR vk.PfnGetPhysicalDeviceSurfaceFormatsKHR vk.PfnGetPhysicalDeviceSurfacePresentModesKHR vk.PfnGetPhysicalDeviceSurfaceSupportKHR vk.PfnCreateSwapchainKHR vk.PfnDestroySwapchainKHR vk.PfnGetSwapchainImagesKHR vk.PfnCreateImage vk.PfnDestroyImage vk.PfnCreateImageView vk.PfnDestroyImageView vk.PfnCreateShaderModule vk.PfnDestroyShaderModule vk.PfnCreatePipelineLayout vk.PfnDestroyPipelineLayout vk.PfnCreateGraphicsPipelines vk.PfnDestroyPipeline vk.PfnCreateRenderPass vk.PfnDestroyRenderPass vk.PfnCreateBuffer vk.PfnAllocateMemory vk.PfnBindBufferMemory vk.PfnBindImageMemory vk.PfnGetPhysicalDeviceMemoryProperties vk.PfnGetImageMemoryRequirements vk.PfnGetBufferMemoryRequirements vk.PfnDestroyBuffer vk.PfnFreeMemory vk.PfnMapMemory vk.PfnUnmapMemory vk.PfnCreateFramebuffer vk.PfnDestroyFramebuffer vk.PfnCreateDescriptorSetLayout vk.PfnDestroyDescriptorSetLayout vk.PfnCreateDescriptorPool vk.PfnDestroyDescriptorPool vk.PfnAllocateDescriptorSets vk.PfnUpdateDescriptorSets vk.PfnQueueSubmit vk.PfnQueuePresentKHR vk.PfnQueueWaitIdle vk.PfnAcquireNextImageKHR vk.PfnCreateCommandPool vk.PfnDestroyCommandPool vk.PfnAllocateCommandBuffers vk.PfnFreeCommandBuffers vk.PfnResetCommandBuffer vk.PfnBeginCommandBuffer vk.PfnEndCommandBuffer vk.PfnCmdBeginRenderPass vk.PfnCmdEndRenderPass vk.PfnCmdBindPipeline vk.PfnCmdBindVertexBuffers vk.PfnCmdDraw vk.PfnCmdCopyBuffer vk.PfnCmdBindDescriptorSets vk.PfnCmdDrawIndexed vk.PfnCmdCopyBufferToImage vk.PfnCmdPipelineBarrier vk.PfnCmdClearColorImage vk.PfnCmdClearAttachments vk.PfnCmdPushConstants vk.PfnCreateSemaphore vk.PfnDestroySemaphore vk.PfnCreateFence vk.PfnDestroyFence vk.PfnWaitForFences vk.PfnResetFences vk.PfnGetFenceStatus vk.PfnCreateSampler vk.PfnDestroySampler }
type DebugPfns ¶
type DebugPfns struct { // TODO: vk.PfnDestroyDebugUtilsMessengerEXT // TODO: vk.PfnCreateDebugUtilsMessengerEXT vk.PfnCreateDebugReportCallbackEXT vk.PfnDestroyDebugReportCallbackEXT }
type DescriptorBinding ¶
type DescriptorBinding = vk.DescriptorSetLayoutBinding
type DescriptorPool ¶
type DescriptorPool struct { Handle vk.DescriptorPool Device *Device }
func (*DescriptorPool) AllocateDescriptorSets ¶
func (pool *DescriptorPool) AllocateDescriptorSets(layouts []vk.DescriptorSetLayout) (sets *DescriptorSets, err error)
func (*DescriptorPool) Close ¶
func (pool *DescriptorPool) Close() error
type DescriptorSetLayoutInfo ¶
type DescriptorSetLayoutInfo struct { Flags vk.DescriptorSetLayoutCreateFlags Bindings []DescriptorBinding }
type DescriptorSets ¶
type DescriptorSets struct { Sets *vk.DescriptorSet Count uint32 Device *Device }
func (*DescriptorSets) Close ¶
func (sets *DescriptorSets) Close() error
func (*DescriptorSets) GetVk ¶
func (sets *DescriptorSets) GetVk(i uint32) vk.DescriptorSet
func (*DescriptorSets) GetVkPtr ¶
func (sets *DescriptorSets) GetVkPtr(i uint32) *vk.DescriptorSet
type Device ¶
type Device struct { sync.Mutex Handle vk.Device CmdPoolShortLive *CommandPool CmdPoolLongLive *CommandPool GraphicsQueue vk.Queue PresentQueue vk.Queue Physical *PhysicalDevice Instance *Instance Shaders map[string]*ShaderModule PipelineCache vk.PipelineCache }
func (*Device) CreateBuffer ¶
func (dev *Device) CreateBuffer(size uint64, usage vk.BufferUsageFlags, memoryProperties vk.MemoryPropertyFlags) (vb *BufferMemory, err error)
func (*Device) CreateCommandPool ¶
func (dev *Device) CreateCommandPool(queueFamilyIndex uint32, flags vk.CommandPoolCreateFlags) (cp *CommandPool, err error)
func (*Device) CreateDescriptorPool ¶
func (dev *Device) CreateDescriptorPool(sizes []vk.DescriptorPoolSize, maxSets uint32) (*DescriptorPool, error)
func (*Device) CreateFence ¶
func (dev *Device) CreateFence(flags vk.FenceCreateFlags) (fen *Fence, err error)
func (*Device) CreateFontManager ¶
func (dev *Device) CreateFontManager(layouts []vk.DescriptorSetLayout) (fman *FontManager, err error)
func (*Device) CreateFramebuffer ¶
func (*Device) CreateImage ¶
func (dev *Device) CreateImage(ci *vk.ImageCreateInfo, memoryProperties vk.MemoryPropertyFlags) (vb *ImageMemory, err error)
func (*Device) CreateImageView ¶
func (*Device) CreatePipeline ¶
func (dev *Device) CreatePipeline(pipelineInfo PipelineInfo) (pl *Pipeline, err error)
func (*Device) CreatePipelineLayout ¶
func (dev *Device) CreatePipelineLayout(setLayouts []vk.DescriptorSetLayout, pushConstantRanges []vk.PushConstantRange) (layout vk.PipelineLayout, err error)
func (*Device) CreateRenderPass ¶
func (dev *Device) CreateRenderPass(renderPassInfo RenderPassInfo) (renderPass *RenderPass, err error)
func (*Device) CreateSemaphore ¶
func (dev *Device) CreateSemaphore(flags vk.SemaphoreCreateFlags) (sem *Semaphore, err error)
func (*Device) CreateTextureSampler ¶
func (dev *Device) CreateTextureSampler(samplerInfo vk.SamplerCreateInfo) (smplr *Sampler, err error)
func (*Device) TransitionImageLayout ¶
func (dev *Device) TransitionImageLayout(image vk.Image, format vk.Format, oldLayout vk.ImageLayout, newLayout vk.ImageLayout) (err error)
func (*Device) UpdateDescriptorSets ¶
func (dev *Device) UpdateDescriptorSets(writeCount uint32, pWrites *vk.WriteDescriptorSet, copyCount uint32, pCopies *vk.CopyDescriptorSet)
type Fence ¶
func (*Fence) WaitForever ¶
type FontManager ¶
type FontManager struct { font.Manager Textures []*FontTexture Sampler *Sampler Device *Device // contains filtered or unexported fields }
func (*FontManager) Close ¶
func (fman *FontManager) Close() error
type FontTexture ¶
type FontTexture struct { Image *ImageMemory View *ImageView Sets *DescriptorSets Device *Device }
func (*FontTexture) Close ¶
func (texture *FontTexture) Close() error
type FrameFlight ¶
type FrameFlight struct { Fence *Fence SemRenderFinished *vk.Semaphore SemImageAvailable *vk.Semaphore PresentInfo *vk.PresentInfoKHR SubmitInfo *vk.SubmitInfo CommandBuffer CommandBuffer // main command buffer for this flight // Sets2D *DescriptorSets // Uni2DMat *Uni2DMat Device *Device Surface *Surface }
func (*FrameFlight) Close ¶
func (frm *FrameFlight) Close() error
type Framebuffer ¶
type Framebuffer struct { Handle vk.Framebuffer FrameImage vk.Image FrameView *ImageView Device *Device }
func (*Framebuffer) Close ¶
func (fb *Framebuffer) Close() error
type ImageMemory ¶
type ImageMemory struct { Handle vk.Image Memory vk.DeviceMemory Device *Device }
func (*ImageMemory) Close ¶
func (vb *ImageMemory) Close() error
func (*ImageMemory) FillMemory ¶
func (vb *ImageMemory) FillMemory(offset, size uint64, flags vk.MemoryMapFlags, pSrc unsafe.Pointer) error
func (*ImageMemory) MapMemory ¶
func (vb *ImageMemory) MapMemory(offset, size uint64, flags vk.MemoryMapFlags) (addr unsafe.Pointer, err error)
func (*ImageMemory) UnmapMemory ¶
func (vb *ImageMemory) UnmapMemory()
type InputAssembly ¶
type InputAssembly struct { Flags vk.PipelineInputAssemblyStateCreateFlags Topology vk.PrimitiveTopology Restart bool }
type Instance ¶
type Instance struct { Handle vk.Instance CorePfns SysPfns DebugPfns config.Options // contains filtered or unexported fields }
func (*Instance) AllocDispatchableHandle ¶
func (inst *Instance) AllocDispatchableHandle() *vk.DispatchableHandle
func (*Instance) AllocNonDispatchableHandle ¶
func (inst *Instance) AllocNonDispatchableHandle() *vk.NonDispatchableHandle
func (*Instance) CreateSysSurface ¶
func (inst *Instance) CreateSysSurface(data SysSurfaceData) (vkSurface vk.SurfaceKHR, err error)
func (*Instance) EnumPhysicalDevices ¶
func (inst *Instance) EnumPhysicalDevices() (list []*PhysicalDevice, err error)
func (*Instance) FreeDispatchableHandle ¶
func (inst *Instance) FreeDispatchableHandle(p *vk.DispatchableHandle)
func (*Instance) FreeNonDispatchableHandle ¶
func (inst *Instance) FreeNonDispatchableHandle(p *vk.NonDispatchableHandle)
func (*Instance) LoadDeviceProc ¶
func (*Instance) LoadVulkanProc ¶
type PhysicalDevice ¶
type PhysicalDevice struct { Handle vk.PhysicalDevice vk.PhysicalDeviceFeatures Instance *Instance }
func (*PhysicalDevice) CreateLogicalDevice ¶
func (phy *PhysicalDevice) CreateLogicalDevice(opts *SurfaceProperties, exts []string) (*Device, error)
func (*PhysicalDevice) EnumerateExtensions ¶
func (phy *PhysicalDevice) EnumerateExtensions(layer string) (m map[string]uint32, err error)
func (*PhysicalDevice) Features ¶
func (phy *PhysicalDevice) Features() (x vk.PhysicalDeviceFeatures)
func (*PhysicalDevice) FindMemoryType ¶
func (phy *PhysicalDevice) FindMemoryType(typeFilter uint32, properties vk.MemoryPropertyFlags) uint32
func (*PhysicalDevice) FindQueueFamilies ¶
func (phy *PhysicalDevice) FindQueueFamilies(win vk.SurfaceKHR) (graphics, present int)
func (*PhysicalDevice) Name ¶
func (phy *PhysicalDevice) Name() (x string)
func (*PhysicalDevice) PipelineCacheUUID ¶
func (phy *PhysicalDevice) PipelineCacheUUID() (x uuid.UUID)
func (*PhysicalDevice) Properties ¶
func (phy *PhysicalDevice) Properties() (x vk.PhysicalDeviceProperties)
func (*PhysicalDevice) ResolveForSurface ¶
func (phy *PhysicalDevice) ResolveForSurface(sur vk.SurfaceKHR) (x uint32, ropts *SurfaceProperties)
func (*PhysicalDevice) String ¶
func (phy *PhysicalDevice) String() string
type Pipeline ¶
type Pipeline struct { Handle vk.Pipeline PipelineLayout vk.PipelineLayout SetLayouts []vk.DescriptorSetLayout Shaders []*ShaderModule Device *Device Instance *Instance }
type PipelineColorBlendAttachmentState ¶
type PipelineColorBlendAttachmentState = vk.PipelineColorBlendAttachmentState
type PipelineInfo ¶
type PipelineInfo struct { Shaders []string DescriptorSetLayouts []DescriptorSetLayoutInfo PushConstantRanges []PushConstantRange Bindings []VertexBinding Attributes []VertexAttribute InputAssembly InputAssembly Viewports []Viewport Scissors []vk.Rect2D Rasterization RasterizationInfo ColorBlends []PipelineColorBlendAttachmentState RenderPass vk.RenderPass Subpass uint32 }
type PushConstantRange ¶
type PushConstantRange = vk.PushConstantRange
type RasterizationInfo ¶
type RasterizationInfo struct { Flags vk.PipelineRasterizationStateCreateFlags DepthClampEnable bool RasterizerDiscardEnable bool PolygonMode vk.PolygonMode CullMode vk.CullModeFlags FrontFace vk.FrontFace DepthBiasEnable bool DepthBiasConstantFactor float32 DepthBiasClamp float32 DepthBiasSlopeFactor float32 LineWidth float32 }
type RenderPass ¶
type RenderPass struct { Handle vk.RenderPass Device *Device }
func (*RenderPass) Close ¶
func (p *RenderPass) Close() error
type RenderPassInfo ¶
type RenderPassInfo struct { Flags vk.RenderPassCreateFlags Attachments []vk.AttachmentDescription Subpasses []SubpassInfo SubpassDepends []vk.SubpassDependency }
type ShaderModule ¶
type ShaderModule struct { Handle vk.ShaderModule Device *Device // contains filtered or unexported fields }
func (*ShaderModule) Close ¶
func (sm *ShaderModule) Close() error
func (*ShaderModule) EntryPoint ¶
func (sm *ShaderModule) EntryPoint() string
type SubpassInfo ¶
type SubpassInfo struct { Flags vk.SubpassDescriptionFlags PipelineBindPoint vk.PipelineBindPoint InputAttachments []vk.AttachmentReference ColorAttachments []vk.AttachmentReference ResolveAttachments []vk.AttachmentReference DepthStencilAttachment *vk.AttachmentReference PreserveAttachments []uint32 }
type Surface ¶
type Surface struct { Device *Device Surface vk.SurfaceKHR *SurfaceProperties Swapchain *vk.SwapchainKHR Framebuffers []*Framebuffer FrameFlights []*FrameFlight CurrentFrame uint32 UiRenderPass *RenderPass TextPipeline *Pipeline NeedRecreate bool // contains filtered or unexported fields }
func (*Surface) AcquireNextImage ¶
func (*Surface) CreateFlight ¶
func (sur *Surface) CreateFlight() (frm *FrameFlight, err error)
func (*Surface) CreateFramebuffers ¶
func (sur *Surface) CreateFramebuffers(pass vk.RenderPass, format vk.Format, extent vk.Extent2D) (fbs []*Framebuffer, err error)
func (*Surface) Init ¶
func (sur *Surface) Init(self interface{}, inst *Instance, sys SysSurfaceData) (err error)
func (*Surface) InitTextPipleline ¶
func (*Surface) InitUiRenderPass ¶
func (*Surface) OnCreateSurface ¶
func (*Surface) WaitAllFences ¶
func (sur *Surface) WaitAllFences()
type SurfaceCapabilities ¶
type SurfaceCapabilities = vk.SurfaceCapabilitiesKHR
type SurfaceHandler ¶
type SurfaceHandler interface {
OnCreateSurface() error
}
type SurfaceProperties ¶
type SurfaceProperties struct { SurfaceCapabilities SurfaceFormat vk.SurfaceFormatKHR ImageCount uint32 PresentMode vk.PresentModeKHR GraphicsFamily uint32 PresentFamily uint32 }
type SysPfns ¶
type SysPfns struct { vk.PfnCreateXcbSurfaceKHR vk.PfnGetPhysicalDeviceXcbPresentationSupportKHR }
type SysSurfaceData ¶
type Text ¶
type Text struct { *font.Text Uni2D VB *BufferMemory NumVerts uint32 // contains filtered or unexported fields }
func (*Text) RecordCommands ¶
func (text *Text) RecordCommands(cb CommandBuffer, pl *Pipeline)
type UniEnvBlock ¶
type UniEnvBlock struct { // time in secs T float32 }
type VertexAttribute ¶
type VertexAttribute = vk.VertexInputAttributeDescription
type VertexBinding ¶
type VertexBinding = vk.VertexInputBindingDescription
Source Files ¶
- frame-flight.go
- time.go
- types.go
- uniform.go
- vkx-buffer-memory.go
- vkx-clear-values.go
- vkx-commands.go
- vkx-debug-cgo.go
- vkx-descriptor.go
- vkx-device.go
- vkx-font.go
- vkx-framebuffer.go
- vkx-image.go
- vkx-instance.go
- vkx-pfns.go
- vkx-physical-device.go
- vkx-pipeline.go
- vkx-pool.go
- vkx-renderpass.go
- vkx-sampler.go
- vkx-shader.go
- vkx-surface.go
- vkx-sync.go
- vkx.go
- vkx_linux.go
Click to show internal directories.
Click to hide internal directories.