package rendering
Constants
FontJustifyLeft
FontJustify(iota)
FontJustifyCenter
FontJustifyRight
FontBaselineBottom
FontBaseline(iota)
FontBaselineCenter
FontBaselineTop
FontBold
FontFace("OpenSans-Bold")
FontBoldItalic
FontFace("OpenSans-BoldItalic")
FontExtraBold
FontFace("OpenSans-ExtraBold")
FontExtraBoldItalic
FontFace("OpenSans-ExtraBoldItalic")
FontItalic
FontFace("OpenSans-Italic")
FontLight
FontFace("OpenSans-Light")
FontLightItalic
FontFace("OpenSans-LightItalic")
FontRegular
FontFace("OpenSans-Regular")
FontSemiBold
FontFace("OpenSans-SemiBold")
FontSemiBoldItalic
FontFace("OpenSans-SemiBoldItalic")
MaxJoints
50
MaxSkinInstances
50
GPUSuccess
iota
GPUNotReady
GPUTimeout
GPUEventSet
GPUEventReset
GPUIncomplete
GPUErrorOutOfHostMemory
GPUErrorOutOfDeviceMemory
GPUErrorInitializationFailed
GPUErrorDeviceLost
GPUErrorMemoryMapFailed
GPUErrorLayerNotPresent
GPUErrorExtensionNotPresent
GPUErrorFeatureNotPresent
GPUErrorIncompatibleDriver
GPUErrorTooManyObjects
GPUErrorFormatNotSupported
GPUErrorFragmentedPool
GPUErrorOutOfPoolMemory
GPUErrorInvalidExternalHandle
GPUErrorSurfaceLost
GPUErrorNativeWindowInUse
GPUSuboptimal
GPUErrorOutOfDate
GPUErrorIncompatibleDisplay
GPUErrorValidationFailed
GPUErrorInvalidShaderNv
GPUErrorInvalidDrmFormatModifierPlaneLayout
GPUErrorFragmentation
GPUErrorNotPermitted
MaxLocalLights
20
MaxCascades
3
LightTypeDirectional
LightType(iota)
LightTypePoint
LightTypeSpot
QuadPivotCenter
QuadPivot(iota)
QuadPivotLeft
QuadPivotTop
QuadPivotRight
QuadPivotBottom
QuadPivotBottomLeft
QuadPivotBottomRight
QuadPivotTopLeft
QuadPivotTopRight
QuaternionSize
[int(unsafe](../int(unsafe).[Sizeof(matrix](../int(unsafe#Sizeof(matrix)
CubeMapSides
6
BytesInPixel
4
MaxCommandPools
5
MaxSecondaryCommands
25
DefaultFontEMSize
GPUWholeSize
(^uintptr(0))
GenerateUniqueTextureKey
""
Variables
StringVkFormat
map[string]vulkan_const.Format{
StringVkBlendFactor
map[string]vulkan_const.BlendFactor{
StringVkBlendOp
map[string]vulkan_const.BlendOp{
StringVkLogicOp
map[string]vulkan_const.LogicOp{
StringVkCompareOp
map[string]vulkan_const.CompareOp{
StringVkStencilOp
map[string]vulkan_const.StencilOp{
StringVkPrimitiveTopology
map[string]vulkan_const.PrimitiveTopology{
StringVkPolygonMode
map[string]vulkan_const.PolygonMode{
StringVkCullModeFlagBits
map[string]vulkan_const.CullModeFlagBits{
StringVkFrontFace
map[string]vulkan_const.FrontFace{
StringVkSampleCountFlagBits
map[string]GPUSampleCountFlags{
StringVkPatchControlPoints
map[string]uint32{
StringVkAttachmentLoadOp
map[string]GPUAttachmentLoadOp{
StringVkAttachmentStoreOp
map[string]GPUAttachmentStoreOp{
StringVkImageLayout
map[string]GPUImageLayout{
StringVkPipelineStageFlagBits
map[string]vulkan_const.PipelineStageFlagBits{
StringVkAccessFlagBits
map[string]GPUAccessFlags{
StringVkShaderStageFlagBits
map[string]vulkan_const.ShaderStageFlagBits{
StringVkPipelineBindPoint
map[string]vulkan_const.PipelineBindPoint{
StringVkDependencyFlagBits
map[string]vulkan_const.DependencyFlagBits{
StringVkColorComponentFlagBits
map[string]vulkan_const.ColorComponentFlagBits{
StringVkPipelineCreateFlagBits
map[string]vulkan_const.PipelineCreateFlagBits{
StringVkImageTiling
map[string]GPUImageTiling{
StringVkFilter
map[string]GPUFilter{
StringVkImageUsageFlagBits
map[string]GPUImageUsageFlags{
StringVkMemoryPropertyFlagBits
map[string]GPUMemoryPropertyFlags{
StringVkImageAspectFlagBits
map[string]GPUImageAspectFlags{
StringVkMap
map[string]any{
Functions
SetupLightMaterials
TextureKeys
VertexFaceNormal
Types
BoneTransform
struct
CommandRecorder
struct
NewCommandRecorder
CommandRecorder.Begin
CommandRecorder.Destroy
CommandRecorder.End
CommandRecorder.Reset
CommandRecorderSecondary
struct
NewCommandRecorderSecondary
func NewCommandRecorderSecondary(device *GPUDevice, rp *RenderPass, subpassIdx int) (CommandRecorderSecondary, error)
CommandRecorderSecondary.Begin
ComputeShaderBuffer
struct
ComputeShaderBuffer.Initialize
func (b *ComputeShaderBuffer) Initialize(device *GPUDevice, size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags) error
ComputeShaderBuffer.WriteDescriptors
ComputeTask
struct
DescriptorSetLayoutStructure
struct
DescriptorSetLayoutStructureType
struct
type DescriptorSetLayoutStructureType struct {
Type vulkan_const.DescriptorType
Flags vulkan_const.ShaderStageFlagBits
Count, Binding uint32
}
DrawInstance
interface
type DrawInstance interface {
Base() *ShaderDataBase
SkinningHeader() *SkinnedShaderDataHeader
Destroy()
IsDestroyed() bool
Activate()
Deactivate()
IsInView() bool
Size() int
SetModel(model matrix.Mat4)
UpdateModel(viewCuller ViewCuller, container collision.AABB)
DataPointer() unsafe.Pointer
// Returns true if it should write the data, otherwise false
UpdateBoundData() bool
BoundDataPointer() unsafe.Pointer
InstanceBoundDataSize() int
SelectLights(lights LightsForRender)
// Has unexported methods.
}
ReflectDuplicateDrawInstance
DrawInstanceGroup
struct
type DrawInstanceGroup struct {
Mesh *Mesh
InstanceDriverData
MaterialInstance *Material
Instances []DrawInstance
// Has unexported fields.
}
NewDrawInstanceGroup
DrawInstanceGroup.AddInstance
DrawInstanceGroup.AlterPadding
DrawInstanceGroup.AnyVisible
DrawInstanceGroup.Clear
DrawInstanceGroup.Destroy
DrawInstanceGroup.IsEmpty
DrawInstanceGroup.IsReady
DrawInstanceGroup.TotalSize
DrawInstanceGroup.UpdateData
DrawInstanceGroup.VisibleCount
DrawInstanceGroup.VisibleSize
Drawing
struct
type Drawing struct {
Material *Material
Mesh *Mesh
ShaderData DrawInstance
Transform *matrix.Transform
Sort int
ViewCuller ViewCuller
}
Drawing.IsValid
Drawings
struct
NewDrawings
Drawings.AddDrawing
Drawings.AddDrawings
Drawings.Clear
Drawings.Destroy
Drawings.HasDrawings
Drawings.PreparePending
Drawings.Render
FontBaseline
FontCache
struct
NewFontCache
FontCache.Destroy
FontCache.EMSize
FontCache.Init
FontCache.LineCountWithin
FontCache.MeasureCharacter
FontCache.MeasureString
FontCache.MeasureStringWithin
func (cache *FontCache) MeasureStringWithin(face FontFace, text string, scale, maxWidth float32, lineHeight float32) matrix.Vec2
FontCache.PointOffsetWithin
func (cache *FontCache) PointOffsetWithin(face FontFace, text string, point matrix.Vec2, scale, maxWidth float32) int
FontCache.PreloadFace
FontCache.RenderMeshes
text string, x, y, z, scale, maxWidth float32, fgColor, bgColor matrix.Color, justify FontJustify, baseline FontBaseline, rootScale matrix.Vec3, instanced, is3D bool, face FontFace, lineHeight float32, cam *cameras.Container) []Drawing
FontCache.StringRectsWithinNew
func (cache *FontCache) StringRectsWithinNew(face FontFace, text string, scale, maxWidth float32) []matrix.Vec4
FontCache.TransparentMaterial
FontFace
FontFace.AsBold
FontFace.AsExtraBold
FontFace.AsItalic
FontFace.AsLight
FontFace.AsMedium
FontFace.AsRegular
FontFace.AsSemiBold
FontFace.Base
FontFace.IsBold
FontFace.IsExtraBold
FontFace.IsItalic
FontFace.RemoveBold
FontFace.RemoveItalic
FontJustify
FuncPipeline
type FuncPipeline func(device *GPUDevice, shader *Shader, shaderStages []vk.PipelineShaderStageCreateInfo) bool
GPUAccessFlags
const ( GPUAccessIndirectCommandReadBit GPUAccessFlags = (1 << iota) GPUAccessIndexReadBit GPUAccessVertexAttributeReadBit GPUAccessUniformReadBit GPUAccessInputAttachmentReadBit GPUAccessShaderReadBit GPUAccessShaderWriteBit GPUAccessColorAttachmentReadBit GPUAccessColorAttachmentWriteBit GPUAccessDepthStencilAttachmentReadBit GPUAccessDepthStencilAttachmentWriteBit GPUAccessTransferReadBit GPUAccessTransferWriteBit GPUAccessHostReadBit GPUAccessHostWriteBit GPUAccessMemoryReadBit GPUAccessMemoryWriteBit GPUAccessTransformFeedbackWriteBit GPUAccessTransformFeedbackCounterReadBit GPUAccessTransformFeedbackCounterWriteBit GPUAccessConditionalRenderingReadBit GPUAccessCommandProcessReadBitNvx GPUAccessCommandProcessWriteBitNvx GPUAccessColorAttachmentReadNoncoherentBit GPUAccessShadingRateImageReadBitNv GPUAccessAccelerationStructureReadBitNvx GPUAccessAccelerationStructureWriteBitNvx )
GPUApplication
struct
type GPUApplication struct {
Name string
Version GPUApplicationVersion
Instances []*GPUApplicationInstance
}
GPUApplication.ApplicationVersion
GPUApplication.CreateInstance
func (g *GPUApplication) CreateInstance(window RenderingContainer, assets assets.Database) (*GPUApplicationInstance, error)
GPUApplication.Destroy
GPUApplication.EngineVersion
GPUApplication.FirstInstance
GPUApplication.Instance
GPUApplication.IsValid
GPUApplication.Setup
GPUApplicationInstance
struct
type GPUApplicationInstance struct {
GPUInstance
Surface GPUSurface
Devices []GPUDevice
// Has unexported fields.
}
GPUApplicationInstance.Destroy
GPUApplicationInstance.Initialize
func (g *GPUApplicationInstance) Initialize(window RenderingContainer, app *GPUApplication, assets assets.Database) error
GPUApplicationInstance.PhysicalDevice
GPUApplicationInstance.PrimaryDevice
GPUApplicationInstance.SelectPhysicalDevice
func (g *GPUApplicationInstance) SelectPhysicalDevice(method func(options []GPUPhysicalDevice) int) error
GPUApplicationInstance.SetupCaches
GPUApplicationInstance.SetupDebug
GPUApplicationInstance.SetupLogicalDevice
GPUApplicationVersion
struct
GPUAttachmentLoadOp
const ( GPUAttachmentLoadOpLoad GPUAttachmentLoadOp = iota GPUAttachmentLoadOpClear GPUAttachmentLoadOpDontCare )
GPUAttachmentStoreOp
const ( GPUAttachmentStoreOpStore GPUAttachmentStoreOp = iota GPUAttachmentStoreOpDontCare )
GPUBuffer
struct
GPUBufferUsageFlags
const ( GPUBufferUsageTransferSrcBit GPUBufferUsageFlags = (1 << iota) GPUBufferUsageTransferDstBit GPUBufferUsageUniformTexelBufferBit GPUBufferUsageStorageTexelBufferBit GPUBufferUsageUniformBufferBit GPUBufferUsageStorageBufferBit GPUBufferUsageIndexBufferBit GPUBufferUsageVertexBufferBit GPUBufferUsageIndirectBufferBit GPUBufferUsageTransformFeedbackBufferBit GPUBufferUsageTransformFeedbackCounterBufferBit GPUBufferUsageConditionalRenderingBit GPUBufferUsageRaytracingBitNvx )
GPUColorSpace
const ( GPUColorSpaceSrgbNonlinear GPUColorSpace = iota GPUColorSpaceDisplayP3Nonlinear GPUColorSpaceExtendedSrgbLinear GPUColorSpaceDciP3Linear GPUColorSpaceDciP3Nonlinear GPUColorSpaceBt709Linear GPUColorSpaceBt709Nonlinear GPUColorSpaceBt2020Linear GPUColorSpaceHdr10St2084 GPUColorSpaceDolbyvision GPUColorSpaceHdr10Hlg GPUColorSpaceAdobergbLinear GPUColorSpaceAdobergbNonlinear GPUColorSpacePassThrough GPUColorSpaceExtendedSrgbNonlinear )
GPUCompositeAlphaFlags
const ( GPUCompositeAlphaOpaqueBit GPUCompositeAlphaFlags = (1 << iota) GPUCompositeAlphaPreMultipliedBit GPUCompositeAlphaPostMultipliedBit GPUCompositeAlphaInheritBit )
GPUDescriptorImageInfo
struct
type GPUDescriptorImageInfo struct {
Sampler GPUSampler
ImageView GPUImageView
ImageLayout GPUImageLayout
}
GPUDescriptorPool
struct
GPUDescriptorSet
struct
GPUDescriptorSetLayout
struct
GPUDevice
struct
type GPUDevice struct {
PhysicalDevice GPUPhysicalDevice
LogicalDevice GPULogicalDevice
Painter GPUPainter
// Has unexported fields.
}
GPUDevice.BlitTargets
GPUDevice.CopyBuffer
GPUDevice.CopyBufferToImage
func (g *GPUDevice) CopyBufferToImage(buffer GPUBuffer, image GPUImage, width, height uint32, layerCount int)
GPUDevice.CreateBuffer
func (g *GPUDevice) CreateBuffer(size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags) (GPUBuffer, GPUDeviceMemory, error)
GPUDevice.CreateFrameBuffer
func (g *GPUDevice) CreateFrameBuffer(renderPass *RenderPass, attachments []GPUImageView, width, height int32) (GPUFrameBuffer, error)
GPUDevice.CreateImage
func (g *GPUDevice) CreateImage(id *TextureId, properties GPUMemoryPropertyFlags, req GPUImageCreateRequest) error
GPUDevice.CreateIndexBuffer
GPUDevice.CreateMesh
GPUDevice.CreateShader
GPUDevice.CreateSwapChain
GPUDevice.CreateTextureSampler
GPUDevice.CreateVertexBuffer
GPUDevice.DestroyBuffer
GPUDevice.DestroyFrameBuffer
GPUDevice.DestroyShaderHandle
GPUDevice.Draw
func (g *GPUDevice) Draw(renderPass *RenderPass, drawings []ShaderDraw, lights LightsForRender, shadows []TextureId)
GPUDevice.FreeMemory
GPUDevice.GenerateMipMaps
func (g *GPUDevice) GenerateMipMaps(texId *TextureId, imageFormat GPUFormat, texWidth, texHeight, mipLevels uint32, filter GPUFilter) error
GPUDevice.MapMemory
func (g *GPUDevice) MapMemory(memory GPUDeviceMemory, offset uintptr, size uintptr, flags GPUMemoryFlags, out *unsafe.Pointer) error
GPUDevice.Memcopy
GPUDevice.MeshIsReady
GPUDevice.QueueCompute
GPUDevice.ReadyFrame
func (g *GPUDevice) ReadyFrame(inst *GPUApplicationInstance, window RenderingContainer, camera cameras.Camera, uiCamera cameras.Camera, lights LightsForRender, runtime float32) bool
GPUDevice.SetupTexture
GPUDevice.SwapFrame
func (g *GPUDevice) SwapFrame(window RenderingContainer, inst *GPUApplicationInstance, width, height int32) bool
GPUDevice.TextureRead
GPUDevice.TextureReadPixel
GPUDevice.TextureWritePixels
GPUDevice.TransitionImageLayout
func (g *GPUDevice) TransitionImageLayout(vt *TextureId, newLayout GPUImageLayout, aspectMask GPUImageAspectFlags, newAccess GPUAccessFlags, cmd *CommandRecorder)
GPUDevice.UnmapMemory
GPUDevice.WriteBufferToImageRegion
GPUDeviceMemory
struct
GPUFence
struct
GPUFilter
const ( GPUFilterNearest GPUFilter = iota GPUFilterLinear GPUFilterCubicImg )
GPUFormat
const ( GPUFormatUndefined GPUFormat = iota GPUFormatR4g4UnormPack8 GPUFormatR4g4b4a4UnormPack16 GPUFormatB4g4r4a4UnormPack16 GPUFormatR5g6b5UnormPack16 GPUFormatB5g6r5UnormPack16 GPUFormatR5g5b5a1UnormPack16 GPUFormatB5g5r5a1UnormPack16 GPUFormatA1r5g5b5UnormPack16 GPUFormatR8Unorm GPUFormatR8Snorm GPUFormatR8Uscaled GPUFormatR8Sscaled GPUFormatR8Uint GPUFormatR8Sint GPUFormatR8Srgb GPUFormatR8g8Unorm GPUFormatR8g8Snorm GPUFormatR8g8Uscaled GPUFormatR8g8Sscaled GPUFormatR8g8Uint GPUFormatR8g8Sint GPUFormatR8g8Srgb GPUFormatR8g8b8Unorm GPUFormatR8g8b8Snorm GPUFormatR8g8b8Uscaled GPUFormatR8g8b8Sscaled GPUFormatR8g8b8Uint GPUFormatR8g8b8Sint GPUFormatR8g8b8Srgb GPUFormatB8g8r8Unorm GPUFormatB8g8r8Snorm GPUFormatB8g8r8Uscaled GPUFormatB8g8r8Sscaled GPUFormatB8g8r8Uint GPUFormatB8g8r8Sint GPUFormatB8g8r8Srgb GPUFormatR8g8b8a8Unorm GPUFormatR8g8b8a8Snorm GPUFormatR8g8b8a8Uscaled GPUFormatR8g8b8a8Sscaled GPUFormatR8g8b8a8Uint GPUFormatR8g8b8a8Sint GPUFormatR8g8b8a8Srgb GPUFormatB8g8r8a8Unorm GPUFormatB8g8r8a8Snorm GPUFormatB8g8r8a8Uscaled GPUFormatB8g8r8a8Sscaled GPUFormatB8g8r8a8Uint GPUFormatB8g8r8a8Sint GPUFormatB8g8r8a8Srgb GPUFormatA8b8g8r8UnormPack32 GPUFormatA8b8g8r8SnormPack32 GPUFormatA8b8g8r8UscaledPack32 GPUFormatA8b8g8r8SscaledPack32 GPUFormatA8b8g8r8UintPack32 GPUFormatA8b8g8r8SintPack32 GPUFormatA8b8g8r8SrgbPack32 GPUFormatA2r10g10b10UnormPack32 GPUFormatA2r10g10b10SnormPack32 GPUFormatA2r10g10b10UscaledPack32 GPUFormatA2r10g10b10SscaledPack32 GPUFormatA2r10g10b10UintPack32 GPUFormatA2r10g10b10SintPack32 GPUFormatA2b10g10r10UnormPack32 GPUFormatA2b10g10r10SnormPack32 GPUFormatA2b10g10r10UscaledPack32 GPUFormatA2b10g10r10SscaledPack32 GPUFormatA2b10g10r10UintPack32 GPUFormatA2b10g10r10SintPack32 GPUFormatR16Unorm GPUFormatR16Snorm GPUFormatR16Uscaled GPUFormatR16Sscaled GPUFormatR16Uint GPUFormatR16Sint GPUFormatR16Sfloat GPUFormatR16g16Unorm GPUFormatR16g16Snorm GPUFormatR16g16Uscaled GPUFormatR16g16Sscaled GPUFormatR16g16Uint GPUFormatR16g16Sint GPUFormatR16g16Sfloat GPUFormatR16g16b16Unorm GPUFormatR16g16b16Snorm GPUFormatR16g16b16Uscaled GPUFormatR16g16b16Sscaled GPUFormatR16g16b16Uint GPUFormatR16g16b16Sint GPUFormatR16g16b16Sfloat GPUFormatR16g16b16a16Unorm GPUFormatR16g16b16a16Snorm GPUFormatR16g16b16a16Uscaled GPUFormatR16g16b16a16Sscaled GPUFormatR16g16b16a16Uint GPUFormatR16g16b16a16Sint GPUFormatR16g16b16a16Sfloat GPUFormatR32Uint GPUFormatR32Sint GPUFormatR32Sfloat GPUFormatR32g32Uint GPUFormatR32g32Sint GPUFormatR32g32Sfloat GPUFormatR32g32b32Uint GPUFormatR32g32b32Sint GPUFormatR32g32b32Sfloat GPUFormatR32g32b32a32Uint GPUFormatR32g32b32a32Sint GPUFormatR32g32b32a32Sfloat GPUFormatR64Uint GPUFormatR64Sint GPUFormatR64Sfloat GPUFormatR64g64Uint GPUFormatR64g64Sint GPUFormatR64g64Sfloat GPUFormatR64g64b64Uint GPUFormatR64g64b64Sint GPUFormatR64g64b64Sfloat GPUFormatR64g64b64a64Uint GPUFormatR64g64b64a64Sint GPUFormatR64g64b64a64Sfloat GPUFormatB10g11r11UfloatPack32 GPUFormatE5b9g9r9UfloatPack32 GPUFormatD16Unorm GPUFormatX8D24UnormPack32 GPUFormatD32Sfloat GPUFormatS8Uint GPUFormatD16UnormS8Uint GPUFormatD24UnormS8Uint GPUFormatD32SfloatS8Uint GPUFormatBc1RgbUnormBlock GPUFormatBc1RgbSrgbBlock GPUFormatBc1RgbaUnormBlock GPUFormatBc1RgbaSrgbBlock GPUFormatBc2UnormBlock GPUFormatBc2SrgbBlock GPUFormatBc3UnormBlock GPUFormatBc3SrgbBlock GPUFormatBc4UnormBlock GPUFormatBc4SnormBlock GPUFormatBc5UnormBlock GPUFormatBc5SnormBlock GPUFormatBc6hUfloatBlock GPUFormatBc6hSfloatBlock GPUFormatBc7UnormBlock GPUFormatBc7SrgbBlock GPUFormatEtc2R8g8b8UnormBlock GPUFormatEtc2R8g8b8SrgbBlock GPUFormatEtc2R8g8b8a1UnormBlock GPUFormatEtc2R8g8b8a1SrgbBlock GPUFormatEtc2R8g8b8a8UnormBlock GPUFormatEtc2R8g8b8a8SrgbBlock GPUFormatEacR11UnormBlock GPUFormatEacR11SnormBlock GPUFormatEacR11g11UnormBlock GPUFormatEacR11g11SnormBlock GPUFormatAstc4x4UnormBlock GPUFormatAstc4x4SrgbBlock GPUFormatAstc5x4UnormBlock GPUFormatAstc5x4SrgbBlock GPUFormatAstc5x5UnormBlock GPUFormatAstc5x5SrgbBlock GPUFormatAstc6x5UnormBlock GPUFormatAstc6x5SrgbBlock GPUFormatAstc6x6UnormBlock GPUFormatAstc6x6SrgbBlock GPUFormatAstc8x5UnormBlock GPUFormatAstc8x5SrgbBlock GPUFormatAstc8x6UnormBlock GPUFormatAstc8x6SrgbBlock GPUFormatAstc8x8UnormBlock GPUFormatAstc8x8SrgbBlock GPUFormatAstc10x5UnormBlock GPUFormatAstc10x5SrgbBlock GPUFormatAstc10x6UnormBlock GPUFormatAstc10x6SrgbBlock GPUFormatAstc10x8UnormBlock GPUFormatAstc10x8SrgbBlock GPUFormatAstc10x10UnormBlock GPUFormatAstc10x10SrgbBlock GPUFormatAstc12x10UnormBlock GPUFormatAstc12x10SrgbBlock GPUFormatAstc12x12UnormBlock GPUFormatAstc12x12SrgbBlock GPUFormatG8b8g8r8422Unorm GPUFormatB8g8r8g8422Unorm GPUFormatG8B8R83plane420Unorm GPUFormatG8B8r82plane420Unorm GPUFormatG8B8R83plane422Unorm GPUFormatG8B8r82plane422Unorm GPUFormatG8B8R83plane444Unorm GPUFormatR10x6UnormPack16 GPUFormatR10x6g10x6Unorm2pack16 GPUFormatR10x6g10x6b10x6a10x6Unorm4pack16 GPUFormatG10x6b10x6g10x6r10x6422Unorm4pack16 GPUFormatB10x6g10x6r10x6g10x6422Unorm4pack16 GPUFormatG10x6B10x6R10x63plane420Unorm3pack16 GPUFormatG10x6B10x6r10x62plane420Unorm3pack16 GPUFormatG10x6B10x6R10x63plane422Unorm3pack16 GPUFormatG10x6B10x6r10x62plane422Unorm3pack16 GPUFormatG10x6B10x6R10x63plane444Unorm3pack16 GPUFormatR12x4UnormPack16 GPUFormatR12x4g12x4Unorm2pack16 GPUFormatR12x4g12x4b12x4a12x4Unorm4pack16 GPUFormatG12x4b12x4g12x4r12x4422Unorm4pack16 GPUFormatB12x4g12x4r12x4g12x4422Unorm4pack16 GPUFormatG12x4B12x4R12x43plane420Unorm3pack16 GPUFormatG12x4B12x4r12x42plane420Unorm3pack16 GPUFormatG12x4B12x4R12x43plane422Unorm3pack16 GPUFormatG12x4B12x4r12x42plane422Unorm3pack16 GPUFormatG12x4B12x4R12x43plane444Unorm3pack16 GPUFormatG16b16g16r16422Unorm GPUFormatB16g16r16g16422Unorm GPUFormatG16B16R163plane420Unorm GPUFormatG16B16r162plane420Unorm GPUFormatG16B16R163plane422Unorm GPUFormatG16B16r162plane422Unorm GPUFormatG16B16R163plane444Unorm GPUFormatPvrtc12bppUnormBlockImg GPUFormatPvrtc14bppUnormBlockImg GPUFormatPvrtc22bppUnormBlockImg GPUFormatPvrtc24bppUnormBlockImg GPUFormatPvrtc12bppSrgbBlockImg GPUFormatPvrtc14bppSrgbBlockImg GPUFormatPvrtc22bppSrgbBlockImg GPUFormatPvrtc24bppSrgbBlockImg )
GPUFormatFeatureFlags
const ( GPUFormatFeatureSampledImageBit GPUFormatFeatureFlags = iota GPUFormatFeatureStorageImageBit GPUFormatFeatureStorageImageAtomicBit GPUFormatFeatureUniformTexelBufferBit GPUFormatFeatureStorageTexelBufferBit GPUFormatFeatureStorageTexelBufferAtomicBit GPUFormatFeatureVertexBufferBit GPUFormatFeatureColorAttachmentBit GPUFormatFeatureColorAttachmentBlendBit GPUFormatFeatureDepthStencilAttachmentBit GPUFormatFeatureBlitSrcBit GPUFormatFeatureBlitDstBit GPUFormatFeatureSampledImageFilterLinearBit GPUFormatFeatureTransferSrcBit GPUFormatFeatureTransferDstBit GPUFormatFeatureMidpointChromaSamplesBit GPUFormatFeatureSampledImageYcbcrConversionLinearFilterBit GPUFormatFeatureSampledImageYcbcrConversionSeparateReconstructionFilterBit GPUFormatFeatureSampledImageYcbcrConversionChromaReconstructionExplicitBit GPUFormatFeatureSampledImageYcbcrConversionChromaReconstructionExplicitForceableBit GPUFormatFeatureDisjointBit GPUFormatFeatureCositedChromaSamplesBit GPUFormatFeatureSampledImageFilterCubicBitImg GPUFormatFeatureSampledImageFilterMinmaxBit )
GPUFormatProperties
struct
type GPUFormatProperties struct {
LinearTilingFeatures GPUFormatFeatureFlags
OptimalTilingFeatures GPUFormatFeatureFlags
BufferFeatures GPUFormatFeatureFlags
}
GPUFrameBuffer
struct
GPUHandle
struct
GPUHandle.HandleAddr
GPUHandle.IsValid
GPUHandle.Reset
GPUImage
struct
GPUImageAspectFlags
const ( GPUImageAspectColorBit GPUImageAspectFlags = (1 << iota) GPUImageAspectDepthBit GPUImageAspectStencilBit GPUImageAspectMetadataBit GPUImageAspectPlane0Bit GPUImageAspectPlane1Bit GPUImageAspectPlane2Bit GPUImageAspectMemoryPlane0Bit GPUImageAspectMemoryPlane1Bit GPUImageAspectMemoryPlane2Bit GPUImageAspectMemoryPlane3Bit )
GPUImageCreateFlags
const ( GPUImageCreateSparseBindingBit GPUImageCreateFlags = (1 << iota) GPUImageCreateSparseResidencyBit GPUImageCreateSparseAliasedBit GPUImageCreateMutableFormatBit GPUImageCreateCubeCompatibleBit GPUImageCreateAliasBit GPUImageCreateSplitInstanceBindRegionsBit GPUImageCreate2dArrayCompatibleBit GPUImageCreateBlockTexelViewCompatibleBit GPUImageCreateExtendedUsageBit GPUImageCreateProtectedBit GPUImageCreateDisjointBit GPUImageCreateCornerSampledBitNv GPUImageCreateSampleLocationsCompatibleDepthBit )
GPUImageCreateRequest
struct
type GPUImageCreateRequest struct {
Flags GPUImageCreateFlags
ImageType GPUImageType
Format GPUFormat
Extent matrix.Vec3i
MipLevels uint32
ArrayLayers uint32
Samples GPUSampleCountFlags
Tiling GPUImageTiling
Usage GPUImageUsageFlags
}
GPUImageLayout
const ( GPUImageLayoutUndefined GPUImageLayout = iota GPUImageLayoutGeneral GPUImageLayoutColorAttachmentOptimal GPUImageLayoutDepthStencilAttachmentOptimal GPUImageLayoutDepthStencilReadOnlyOptimal GPUImageLayoutShaderReadOnlyOptimal GPUImageLayoutTransferSrcOptimal GPUImageLayoutTransferDstOptimal GPUImageLayoutPreinitialized GPUImageLayoutDepthReadOnlyStencilAttachmentOptimal GPUImageLayoutDepthAttachmentStencilReadOnlyOptimal GPUImageLayoutPresentSrc GPUImageLayoutSharedPresent GPUImageLayoutShadingRateOptimalNv )
GPUImageTiling
const ( GPUImageTilingOptimal GPUImageTiling = iota GPUImageTilingLinear GPUImageTilingDrmFormatModifier )
GPUImageType
const ( GPUImageType1d GPUImageType = iota GPUImageType2d GPUImageType3d )
GPUImageUsageFlags
const ( GPUImageUsageTransferSrcBit GPUImageUsageFlags = (1 << iota) GPUImageUsageTransferDstBit GPUImageUsageSampledBit GPUImageUsageStorageBit GPUImageUsageColorAttachmentBit GPUImageUsageDepthStencilAttachmentBit GPUImageUsageTransientAttachmentBit GPUImageUsageInputAttachmentBit GPUImageUsageShadingRateImageBitNv )
GPUImageView
struct
GPUImageViewType
const ( GPUImageViewType1d GPUImageViewType = iota GPUImageViewType2d GPUImageViewType3d GPUImageViewTypeCube GPUImageViewType1dArray GPUImageViewType2dArray GPUImageViewTypeCubeArray )
GPUImageWriteRequest
struct
GPUInstance
struct
GPUInstance.Destroy
GPUInstance.IsValid
GPUInstance.Setup
GPULight
struct
type GPULight struct {
Matrix [cubeMapSides]matrix.Mat4
Position matrix.Vec3
Direction matrix.Vec3
// Has unexported fields.
}
GPULightInfo
struct
type GPULightInfo struct {
Position matrix.Vec3
Intensity float32
Direction matrix.Vec3
Cutoff float32
Ambient matrix.Vec3
OuterCutoff float32
Diffuse matrix.Vec3
Constant float32
Specular matrix.Vec3
Linear float32
Quadratic float32
NearPlane float32
FarPlane float32
Type int32
// Has unexported fields.
}
GPULogicalDevice
struct
GPULogicalDevice.CreateImageView
func (g *GPULogicalDevice) CreateImageView(id *TextureId, aspectFlags GPUImageAspectFlags, viewType GPUImageViewType) error
GPULogicalDevice.Destroy
GPULogicalDevice.DestroyFence
GPULogicalDevice.DestroyGroup
GPULogicalDevice.DestroySemaphore
GPULogicalDevice.FreeTexture
GPULogicalDevice.ImageMemoryRequirements
GPULogicalDevice.RemakeSwapChain
func (g *GPULogicalDevice) RemakeSwapChain(window RenderingContainer, inst *GPUApplicationInstance, device *GPUDevice) error
GPULogicalDevice.Setup
func (g *GPULogicalDevice) Setup(inst *GPUApplicationInstance, physicalDevice *GPUPhysicalDevice) error
GPULogicalDevice.SetupDebug
GPULogicalDevice.WaitForFences
GPULogicalDevice.WaitForRender
GPULogicalDevice.WaitIdle
GPUMemoryFlags
const ( GPUMemoryMapPlacedBit GPUMemoryFlags = (1 << iota) )
GPUMemoryHeap
struct
GPUMemoryHeapFlags
const ( GPUMemoryHeapDeviceLocalBit GPUMemoryHeapFlags = (1 << iota) GPUMemoryHeapMultiInstanceBit )
GPUMemoryPropertyFlags
const ( GPUMemoryPropertyDeviceLocalBit GPUMemoryPropertyFlags = (1 << iota) GPUMemoryPropertyHostVisibleBit GPUMemoryPropertyHostCoherentBit GPUMemoryPropertyHostCachedBit GPUMemoryPropertyLazilyAllocatedBit GPUMemoryPropertyProtectedBit )
GPUMemoryRequirements
struct
GPUMemoryType
struct
GPUPainter
struct
GPUPainter.DestroyDescriptorPools
GPUPhysicalDevice
struct
type GPUPhysicalDevice struct {
Features GPUPhysicalDeviceFeatures
Properties GPUPhysicalDeviceProperties
QueueFamilies []GPUQueueFamily
Extensions []GPUPhysicalDeviceExtension
SurfaceFormats []GPUSurfaceFormat
PresentModes []GPUPresentMode
SurfaceCapabilities GPUSurfaceCapabilities
// Has unexported fields.
}
ListPhysicalGpuDevices
GPUPhysicalDevice.FindComputeFamiliy
GPUPhysicalDevice.FindGraphicsFamiliy
GPUPhysicalDevice.FindMemoryType
func (g *GPUPhysicalDevice) FindMemoryType(typeFilter uint32, properties GPUMemoryPropertyFlags) int
GPUPhysicalDevice.FindPresentFamily
GPUPhysicalDevice.FindSupportedFormat
func (g *GPUPhysicalDevice) FindSupportedFormat(candidates []GPUFormat, tiling GPUImageTiling, features GPUFormatFeatureFlags) GPUFormat
GPUPhysicalDevice.FormatIsTileable
GPUPhysicalDevice.FormatProperties
GPUPhysicalDevice.IsExtensionSupported
GPUPhysicalDevice.IsValid
GPUPhysicalDevice.MaxUsableSampleCount
GPUPhysicalDevice.PadBufferSize
GPUPhysicalDevice.RefreshSurfaceCapabilities
GPUPhysicalDeviceExtension
struct
GPUPhysicalDeviceFeatures
struct
type GPUPhysicalDeviceFeatures struct {
RobustBufferAccess bool
FullDrawIndexUint32 bool
ImageCubeArray bool
IndependentBlend bool
GeometryShader bool
TessellationShader bool
SampleRateShading bool
DualSrcBlend bool
LogicOp bool
MultiDrawIndirect bool
DrawIndirectFirstInstance bool
DepthClamp bool
DepthBiasClamp bool
FillModeNonSolid bool
DepthBounds bool
WideLines bool
LargePoints bool
AlphaToOne bool
MultiViewport bool
SamplerAnisotropy bool
TextureCompressionETC2 bool
TextureCompressionASTC_LDR bool
TextureCompressionBC bool
OcclusionQueryPrecise bool
PipelineStatisticsQuery bool
VertexPipelineStoresAndAtomics bool
FragmentStoresAndAtomics bool
ShaderTessellationAndGeometryPointSize bool
ShaderImageGatherExtended bool
ShaderStorageImageExtendedFormats bool
ShaderStorageImageMultisample bool
ShaderStorageImageReadWithoutFormat bool
ShaderStorageImageWriteWithoutFormat bool
ShaderUniformBufferArrayDynamicIndexing bool
ShaderSampledImageArrayDynamicIndexing bool
ShaderStorageBufferArrayDynamicIndexing bool
ShaderStorageImageArrayDynamicIndexing bool
ShaderClipDistance bool
ShaderCullDistance bool
ShaderFloat64 bool
ShaderInt64 bool
ShaderInt16 bool
ShaderResourceResidency bool
ShaderResourceMinLod bool
SparseBinding bool
SparseResidencyBuffer bool
SparseResidencyImage2D bool
SparseResidencyImage3D bool
SparseResidency2Samples bool
SparseResidency4Samples bool
SparseResidency8Samples bool
SparseResidency16Samples bool
SparseResidencyAliased bool
VariableMultisampleRate bool
InheritedQueries bool
}
GPUPhysicalDeviceLimits
struct
type GPUPhysicalDeviceLimits struct {
MaxImageDimension1D uint32
MaxImageDimension2D uint32
MaxImageDimension3D uint32
MaxImageDimensionCube uint32
MaxImageArrayLayers uint32
MaxTexelBufferElements uint32
MaxUniformBufferRange uint32
MaxStorageBufferRange uint32
MaxPushConstantsSize uint32
MaxMemoryAllocationCount uint32
MaxSamplerAllocationCount uint32
BufferImageGranularity uintptr
SparseAddressSpaceSize uintptr
MaxBoundDescriptorSets uint32
MaxPerStageDescriptorSamplers uint32
MaxPerStageDescriptorUniformBuffers uint32
MaxPerStageDescriptorStorageBuffers uint32
MaxPerStageDescriptorSampledImages uint32
MaxPerStageDescriptorStorageImages uint32
MaxPerStageDescriptorInputAttachments uint32
MaxPerStageResources uint32
MaxDescriptorSetSamplers uint32
MaxDescriptorSetUniformBuffers uint32
MaxDescriptorSetUniformBuffersDynamic uint32
MaxDescriptorSetStorageBuffers uint32
MaxDescriptorSetStorageBuffersDynamic uint32
MaxDescriptorSetSampledImages uint32
MaxDescriptorSetStorageImages uint32
MaxDescriptorSetInputAttachments uint32
MaxVertexInputAttributes uint32
MaxVertexInputBindings uint32
MaxVertexInputAttributeOffset uint32
MaxVertexInputBindingStride uint32
MaxVertexOutputComponents uint32
MaxTessellationGenerationLevel uint32
MaxTessellationPatchSize uint32
MaxTessellationControlPerVertexInputComponents uint32
MaxTessellationControlPerVertexOutputComponents uint32
MaxTessellationControlPerPatchOutputComponents uint32
MaxTessellationControlTotalOutputComponents uint32
MaxTessellationEvaluationInputComponents uint32
MaxTessellationEvaluationOutputComponents uint32
MaxGeometryShaderInvocations uint32
MaxGeometryInputComponents uint32
MaxGeometryOutputComponents uint32
MaxGeometryOutputVertices uint32
MaxGeometryTotalOutputComponents uint32
MaxFragmentInputComponents uint32
MaxFragmentOutputAttachments uint32
MaxFragmentDualSrcAttachments uint32
MaxFragmentCombinedOutputResources uint32
MaxComputeSharedMemorySize uint32
MaxComputeWorkGroupCount [3]uint32
MaxComputeWorkGroupInvocations uint32
MaxComputeWorkGroupSize [3]uint32
SubPixelPrecisionBits uint32
SubTexelPrecisionBits uint32
MipmapPrecisionBits uint32
MaxDrawIndexedIndexValue uint32
MaxDrawIndirectCount uint32
MaxSamplerLodBias float32
MaxSamplerAnisotropy float32
MaxViewports uint32
MaxViewportDimensions [2]uint32
ViewportBoundsRange [2]float32
ViewportSubPixelBits uint32
MinMemoryMapAlignment uint
MinTexelBufferOffsetAlignment uintptr
MinUniformBufferOffsetAlignment uintptr
MinStorageBufferOffsetAlignment uintptr
MinTexelOffset int32
MaxTexelOffset uint32
MinTexelGatherOffset int32
MaxTexelGatherOffset uint32
MinInterpolationOffset float32
MaxInterpolationOffset float32
SubPixelInterpolationOffsetBits uint32
MaxFramebufferWidth uint32
MaxFramebufferHeight uint32
MaxFramebufferLayers uint32
FramebufferColorSampleCounts GPUSampleCountFlags
FramebufferDepthSampleCounts GPUSampleCountFlags
FramebufferStencilSampleCounts GPUSampleCountFlags
FramebufferNoAttachmentsSampleCounts GPUSampleCountFlags
MaxColorAttachments uint32
SampledImageColorSampleCounts GPUSampleCountFlags
SampledImageIntegerSampleCounts GPUSampleCountFlags
SampledImageDepthSampleCounts GPUSampleCountFlags
SampledImageStencilSampleCounts GPUSampleCountFlags
StorageImageSampleCounts GPUSampleCountFlags
MaxSampleMaskWords uint32
TimestampComputeAndGraphics bool
TimestampPeriod float32
MaxClipDistances uint32
MaxCullDistances uint32
MaxCombinedClipAndCullDistances uint32
DiscreteQueuePriorities uint32
PointSizeRange [2]float32
LineWidthRange [2]float32
PointSizeGranularity float32
LineWidthGranularity float32
StrictLines bool
StandardSampleLocations bool
OptimalBufferCopyOffsetAlignment uintptr
OptimalBufferCopyRowPitchAlignment uintptr
NonCoherentAtomSize uintptr
}
GPUPhysicalDeviceMemoryProperties
struct
type GPUPhysicalDeviceMemoryProperties struct {
MemoryTypes []GPUMemoryType
MemoryHeaps []GPUMemoryHeap
}
GPUPhysicalDeviceProperties
struct
type GPUPhysicalDeviceProperties struct {
ApiVersion uint32
DriverVersion uint32
VendorID uint32
DeviceID uint32
DeviceType GPUPhysicalDeviceType
DeviceName string
PipelineCacheUUID string
Limits GPUPhysicalDeviceLimits
SparseProperties GPUPhysicalDeviceSparseProperties
}
GPUPhysicalDeviceSparseProperties
struct
type GPUPhysicalDeviceSparseProperties struct {
ResidencyStandard2DBlockShape bool
ResidencyStandard2DMultisampleBlockShape bool
ResidencyStandard3DBlockShape bool
ResidencyAlignedMipSize bool
ResidencyNonResidentStrict bool
}
GPUPhysicalDeviceType
const ( GPUPhysicalDeviceTypeOther GPUPhysicalDeviceType = iota GPUPhysicalDeviceTypeIntegratedGpu GPUPhysicalDeviceTypeDiscreteGpu GPUPhysicalDeviceTypeVirtualGpu GPUPhysicalDeviceTypeCpu )
GPUPipeline
struct
GPUPipelineLayout
struct
GPUPipelineStageFlags
const ( GPUPipelineStageTopOfPipeBit GPUPipelineStageFlags = (1 << iota) GPUPipelineStageDrawIndirectBit GPUPipelineStageVertexInputBit GPUPipelineStageVertexShaderBit GPUPipelineStageTessellationControlShaderBit GPUPipelineStageTessellationEvaluationShaderBit GPUPipelineStageGeometryShaderBit GPUPipelineStageFragmentShaderBit GPUPipelineStageEarlyFragmentTestsBit GPUPipelineStageLateFragmentTestsBit GPUPipelineStageColorAttachmentOutputBit GPUPipelineStageComputeShaderBit GPUPipelineStageTransferBit GPUPipelineStageBottomOfPipeBit GPUPipelineStageHostBit GPUPipelineStageAllGraphicsBit GPUPipelineStageAllCommandsBit GPUPipelineStageTransformFeedbackBit GPUPipelineStageConditionalRenderingBit GPUPipelineStageCommandProcessBitNvx GPUPipelineStageShadingRateImageBitNv GPUPipelineStageRaytracingBitNvx GPUPipelineStageTaskShaderBitNv GPUPipelineStageMeshShaderBitNv )
GPUPresentMode
const ( GPUPresentModeImmediate GPUPresentMode = iota GPUPresentModeMailbox GPUPresentModeFifo GPUPresentModeFifoRelaxed GPUPresentModeSharedDemandRefresh GPUPresentModeSharedContinuousRefresh )
GPUQueue
struct
GPUQueueFamily
struct
type GPUQueueFamily struct {
Index int
MinImageTransferGranularity matrix.Vec3i
IsGraphics bool
IsCompute bool
IsTransfer bool
IsSparseBinding bool
IsProtected bool
HasPresentSupport bool
}
InvalidGPUQueueFamily
GPUQueueFamily.IsValid
GPUResult
GPUSampleCountFlags
const ( GPUSampleCount1Bit GPUSampleCountFlags = (1 << iota) GPUSampleCount2Bit GPUSampleCount4Bit GPUSampleCount8Bit GPUSampleCount16Bit GPUSampleCount32Bit GPUSampleCount64Bit GPUSampleSwapChainCount )
GPUSampler
struct
GPUSemaphore
struct
GPUShaderModule
struct
GPUSurface
struct
GPUSurface.Create
GPUSurface.Destroy
GPUSurfaceCapabilities
struct
type GPUSurfaceCapabilities struct {
MinImageCount uint32
MaxImageCount uint32
CurrentExtent matrix.Vec2i
MinImageExtent matrix.Vec2i
MaxImageExtent matrix.Vec2i
MaxImageArrayLayers uint32
SupportedTransforms GPUSurfaceTransformFlags
CurrentTransform GPUSurfaceTransformFlags
SupportedCompositeAlpha GPUCompositeAlphaFlags
SupportedUsageFlags GPUImageUsageFlags
}
GPUSurfaceFormat
struct
GPUSurfaceTransformFlags
const ( GPUSurfaceTransformIdentityBit GPUSurfaceTransformFlags = (1 << iota) GPUSurfaceTransformRotate90Bit GPUSurfaceTransformRotate180Bit GPUSurfaceTransformRotate270Bit GPUSurfaceTransformHorizontalMirrorBit GPUSurfaceTransformHorizontalMirrorRotate90Bit GPUSurfaceTransformHorizontalMirrorRotate180Bit GPUSurfaceTransformHorizontalMirrorRotate270Bit GPUSurfaceTransformInheritBit )
GPUSwapChain
struct
type GPUSwapChain struct {
GPUHandle
Images []TextureId
Extent matrix.Vec2i
Depth TextureId
Color TextureId
FrameBuffers []GPUFrameBuffer
// Has unexported fields.
}
GPUSwapChain.CopyAndReset
GPUSwapChain.CreateColor
GPUSwapChain.CreateDepth
GPUSwapChain.CreateFrameBuffer
GPUSwapChain.Destroy
GPUSwapChain.SelectExtent
func (g *GPUSwapChain) SelectExtent(window RenderingContainer, device *GPUPhysicalDevice) matrix.Vec2i
GPUSwapChain.SelectPresentMode
GPUSwapChain.SelectSurfaceFormat
GPUSwapChain.Setup
func (g *GPUSwapChain) Setup(window RenderingContainer, inst *GPUApplicationInstance, device *GPUDevice) error
GPUSwapChain.SetupImageViews
GPUSwapChain.SetupRenderPass
GPUSwapChain.SetupSyncObjects
GPUSwapChainSupportDetails
struct
GlobalShaderData
struct
type GlobalShaderData struct {
View matrix.Mat4
Projection matrix.Mat4
UIView matrix.Mat4
UIProjection matrix.Mat4
CameraPosition matrix.Vec4
UICameraPosition matrix.Vec3
Time float32
ScreenSize matrix.Vec2
CascadeCount int32
CascadePlaneDistances [4]float32
VertLights [MaxLocalLights]GPULight
LightInfos [MaxLocalLights]GPULightInfo
// Has unexported fields.
}
InstanceCopyData
struct
InstanceCopyDataNew
InstanceDriverData
struct
InstanceGroupSkinningData
struct
Light
struct
NewLight
func NewLight(device *GPUDevice, assetDb assets.Database, materialCache *MaterialCache, lightType LightType) Light
Light.Direction
Light.FrameDirty
Light.IsValid
Light.ResetFrameDirty
Light.SetAmbient
Light.SetCastsShadows
Light.SetConstant
Light.SetCutoff
Light.SetDiffuse
Light.SetDirection
Light.SetIntensity
Light.SetLinear
Light.SetOuterCutoff
Light.SetPosition
Light.SetQuadratic
Light.SetSpecular
Light.Type
Light.WorldSpace
LightShadowShaderData
struct
LightShadowShaderData.Size
LightType
LightsForRender
struct
Material
struct
type Material struct {
Id string
Shader *Shader
Textures []*Texture
Instances map[string]*Material
Root weak.Pointer[Material]
PrepassMaterial weak.Pointer[Material]
IsLit bool
ReceivesShadows bool
CastsShadows bool
// Has unexported fields.
}
Material.CreateInstance
Material.Destroy
Material.HasTransparentSuffix
Material.RenderPass
Material.SelectRoot
MaterialCache
struct
NewMaterialCache
MaterialCache.AddMaterial
MaterialCache.Destroy
MaterialCache.FindMaterial
MaterialCache.Material
MaterialData
struct
type MaterialData struct {
Shader string `options:""` // Blank = fallback
RenderPass string `options:""` // Blank = fallback
ShaderPipeline string `options:"" label:"Pipeline"` // Blank = fallback
Textures []MaterialTextureData
PrepassMaterial string
IsLit bool
ReceivesShadows bool
CastsShadows bool
}
MaterialData.Compile
MaterialData.CompileExt
func (d *MaterialData) CompileExt(assets assets.Database, device *GPUDevice, copyShader bool) (*Material, error)
MaterialTextureData
struct
type MaterialTextureData struct {
Label string `static:"true"`
Texture string `content:"Texture"`
Filter string `options:"StringVkFilter"`
}
MaterialTextureData.FilterToVK
Mesh
struct
NewMesh
NewMeshArrow
func NewMeshArrow(cache *MeshCache, shaftLength, shaftRadius, tipHeight, tipRadius float32, segments int) *Mesh
NewMeshCapsule
NewMeshCapsule creates a capsule mesh (cylinder with hemispherical ends) with the specified radius and height. The capsule is aligned along the Y-axis, with hemispheres at y=height/2 and y=-height/2. segments controls the number of subdivisions around the circumference, rings controls the number of rings per hemisphere.
NewMeshCircleWire
NewMeshCircleWire creates a wireframe circle (line loop) mesh. It follows the same pattern as the other wireframe mesh generators (e.g. NewMeshWireCube, NewMeshWireSphereLatLon, etc.).
NewMeshCone
NewMeshCube
NewMeshCubeInverse
NewMeshCylinder
NewMeshFrustum
NewMeshFrustumBox
NewMeshGrid
NewMeshLine
NewMeshOffsetQuad
NewMeshPlane
NewMeshPoint
NewMeshQuad
NewMeshQuadAnchored
NewMeshScreenQuad
NewMeshSkyboxCube
NewMeshSphere
NewMeshTexturableCube
NewMeshTriangle
NewMeshUnitQuad
NewMeshWireCone
NewMeshWireCube
NewMeshWireCylinder
func NewMeshWireCylinder(cache *MeshCache, radius, height float32, segments, heightSegments int) *Mesh
NewMeshWireQuad
NewMeshWireSphere
Mesh.Bounds
Mesh.DelayedCreate
Mesh.IsReady
Mesh.Key
Mesh.SetKey
MeshCache
struct
NewMeshCache
MeshCache.AddMesh
Try to add the mesh to the cache, if it already exists, return the existing mesh
MeshCache.CreatePending
MeshCache.Destroy
MeshCache.FindMesh
MeshCache.Mesh
MeshCache.RemoveMesh
MeshCleanup
struct
MeshCullMode
const ( MeshCullModeBack MeshCullMode = iota MeshCullModeFront MeshCullModeNone )
MeshDrawMode
const ( MeshDrawModePoints MeshDrawMode = iota MeshDrawModeLines MeshDrawModeTriangles MeshDrawModePatches )
MeshId
struct
MeshId.IsValid
PointShadow
struct
QuadPivot
RenderCaches
interface
type RenderCaches interface {
ShaderCache() *ShaderCache
TextureCache() *TextureCache
MeshCache() *MeshCache
FontCache() *FontCache
MaterialCache() *MaterialCache
AssetDatabase() assets.Database
}
RenderPass
struct
NewRenderPass
RenderPass.Destroy
RenderPass.ExecuteSecondaryCommands
RenderPass.Height
RenderPass.IsShadowPass
RenderPass.Recontstruct
RenderPass.SelectOutputAttachment
RenderPass.SelectOutputAttachmentWithSuffix
RenderPass.Texture
RenderPass.Width
RenderPassAttachmentDescription
struct
type RenderPassAttachmentDescription struct {
Format string `options:"StringVkFormat"`
Samples string `options:"StringVkSampleCountFlagBits"`
LoadOp string `options:"StringVkAttachmentLoadOp"`
StoreOp string `options:"StringVkAttachmentStoreOp"`
StencilLoadOp string `options:"StringVkAttachmentLoadOp"`
StencilStoreOp string `options:"StringVkAttachmentStoreOp"`
InitialLayout string `options:"StringVkImageLayout"`
FinalLayout string `options:"StringVkImageLayout"`
Image RenderPassAttachmentImage
}
RenderPassAttachmentDescription.FinalLayoutToVK
RenderPassAttachmentDescription.FormatToVK
RenderPassAttachmentDescription.InitialLayoutToVK
RenderPassAttachmentDescription.LoadOpToVK
RenderPassAttachmentDescription.SamplesToVK
func (ad *RenderPassAttachmentDescription) SamplesToVK(device *GPUPhysicalDevice) GPUSampleCountFlags
RenderPassAttachmentDescription.StencilLoadOpToVK
RenderPassAttachmentDescription.StencilStoreOpToVK
RenderPassAttachmentDescription.StoreOpToVK
RenderPassAttachmentDescriptionCompiled
struct
type RenderPassAttachmentDescriptionCompiled struct {
Format GPUFormat
Samples GPUSampleCountFlags
LoadOp GPUAttachmentLoadOp
StoreOp GPUAttachmentStoreOp
StencilLoadOp GPUAttachmentLoadOp
StencilStoreOp GPUAttachmentStoreOp
InitialLayout GPUImageLayout
FinalLayout GPUImageLayout
Image RenderPassAttachmentImageCompiled
}
RenderPassAttachmentDescriptionCompiled.IsDepthFormat
RenderPassAttachmentImage
struct
type RenderPassAttachmentImage struct {
Name string
ExistingImage string
MipLevels uint32
LayerCount uint32
Tiling string `options:"StringVkImageTiling"`
Filter string `options:"StringVkFilter"`
Usage []string `options:"StringVkImageUsageFlagBits"`
MemoryProperty []string `options:"StringVkMemoryPropertyFlagBits"`
Aspect []string `options:"StringVkImageAspectFlagBits"`
Access []string `options:"StringVkAccessFlagBits"`
Clear RenderPassAttachmentImageClear `tip:"AttachmentImageClear"`
}
RenderPassAttachmentImage.AccessToVK
RenderPassAttachmentImage.AspectToVK
RenderPassAttachmentImage.FilterToVK
RenderPassAttachmentImage.IsInvalid
RenderPassAttachmentImage.MemoryPropertyToVK
RenderPassAttachmentImage.TilingToVK
RenderPassAttachmentImage.UsageToVK
RenderPassAttachmentImageClear
struct
type RenderPassAttachmentImageClear struct {
R float32
G float32
B float32
A float32
Depth float32
Stencil uint32
}
RenderPassAttachmentImageCompiled
struct
type RenderPassAttachmentImageCompiled struct {
Name string
ExistingImage string
MipLevels uint32
LayerCount uint32
Tiling GPUImageTiling
Filter GPUFilter
Usage GPUImageUsageFlags
MemoryProperty GPUMemoryPropertyFlags
Aspect GPUImageAspectFlags
Access GPUAccessFlags
}
RenderPassAttachmentImageCompiled.IsInvalid
RenderPassAttachmentReference
struct
type RenderPassAttachmentReference struct {
Attachment uint32
Layout string `options:"StringVkImageLayout"`
}
RenderPassAttachmentReference.LayoutToVK
RenderPassAttachmentReferenceCompiled
struct
type RenderPassAttachmentReferenceCompiled struct {
Attachment uint32
Layout vulkan_const.ImageLayout
}
RenderPassData
struct
type RenderPassData struct {
Name string
Sort int
AttachmentDescriptions []RenderPassAttachmentDescription
SubpassDescriptions []RenderPassSubpassDescription
SubpassDependencies []RenderPassSubpassDependency
Width int
Height int
SkipCombine bool
}
NewRenderPassData
RenderPassData.Compile
RenderPassDataCompiled
struct
type RenderPassDataCompiled struct {
Name string
Sort int
Width int
Height int
AttachmentDescriptions []RenderPassAttachmentDescriptionCompiled
SubpassDescriptions []RenderPassSubpassDescriptionCompiled
SubpassDependencies []RenderPassSubpassDependencyCompiled
ImageClears []vk.ClearValue
Subpass []RenderPassSubpassDataCompiled
SkipCombine bool
}
RenderPassDataCompiled.ConstructRenderPass
RenderPassGroup
struct
RenderPassSubpass
struct
RenderPassSubpassData
struct
type RenderPassSubpassData struct {
Shader string `options:""`
ShaderPipeline string `options:""`
SampledImages []RenderPassSubpassImageData
}
RenderPassSubpassDataCompiled
struct
type RenderPassSubpassDataCompiled struct {
Shader string
ShaderPipeline string
SampledImages []int
}
RenderPassSubpassDependency
struct
type RenderPassSubpassDependency struct {
SrcSubpass int64
DstSubpass int64
SrcStageMask []string `options:"StringVkPipelineStageFlagBits"`
DstStageMask []string `options:"StringVkPipelineStageFlagBits"`
SrcAccessMask []string `options:"StringVkAccessFlagBits"`
DstAccessMask []string `options:"StringVkAccessFlagBits"`
DependencyFlags []string `options:"StringVkDependencyFlagBits"`
}
RenderPassSubpassDependency.DependencyFlagsToVK
RenderPassSubpassDependency.DstAccessMaskToVK
RenderPassSubpassDependency.DstStageMaskToVK
RenderPassSubpassDependency.SrcAccessMaskToVK
RenderPassSubpassDependency.SrcStageMaskToVK
RenderPassSubpassDependencyCompiled
struct
type RenderPassSubpassDependencyCompiled struct {
SrcSubpass uint32
DstSubpass uint32
SrcStageMask vk.PipelineStageFlags
DstStageMask vk.PipelineStageFlags
SrcAccessMask vk.AccessFlags
DstAccessMask vk.AccessFlags
DependencyFlags vk.DependencyFlags
}
RenderPassSubpassDescription
struct
type RenderPassSubpassDescription struct {
PipelineBindPoint string `options:"StringVkPipelineBindPoint"`
ColorAttachmentReferences []RenderPassAttachmentReference
InputAttachmentReferences []RenderPassAttachmentReference
ResolveAttachments []RenderPassAttachmentReference
DepthStencilAttachment []RenderPassAttachmentReference // 1 max
PreserveAttachments []uint32 // TODO
Subpass RenderPassSubpassData
}
RenderPassSubpassDescription.PipelineBindPointToVK
RenderPassSubpassDescriptionCompiled
struct
type RenderPassSubpassDescriptionCompiled struct {
PipelineBindPoint vulkan_const.PipelineBindPoint
ColorAttachmentReferences []RenderPassAttachmentReferenceCompiled
InputAttachmentReferences []RenderPassAttachmentReferenceCompiled
ResolveAttachments []RenderPassAttachmentReferenceCompiled
DepthStencilAttachment []RenderPassAttachmentReferenceCompiled // 1 max
PreserveAttachments []uint32 // TODO
}
RenderPassSubpassImageData
struct
RenderingContainer
interface
type RenderingContainer interface {
GetDrawableSize() (int32, int32)
GetInstanceExtensions() []string
PlatformWindow() unsafe.Pointer
PlatformInstance() unsafe.Pointer
}
Shader
struct
type Shader struct {
RenderId ShaderId
Material MaterialData
DriverData ShaderDriverData
Type ShaderType
// Has unexported fields.
}
NewShader
Shader.AddSubShader
Shader.DelayedCreate
Shader.Reload
Shader.RemoveSubShader
Shader.ShaderDataName
Shader.SubShader
ShaderBuffer
struct
ShaderCache
struct
NewShaderCache
ShaderCache.AddShader
ShaderCache.CreatePending
ShaderCache.Destroy
ShaderCache.ReloadShader
ShaderCache.Shader
ShaderCleanup
struct
ShaderData
struct
type ShaderData struct {
Name string
EnableDebug bool
Vertex string `options:""`
VertexFlags string `tip:"CompileFlags"`
Fragment string `options:""`
FragmentFlags string `tip:"CompileFlags"`
Geometry string `options:""`
GeometryFlags string `tip:"CompileFlags"`
TessellationControl string `options:""`
TessellationControlFlags string `tip:"CompileFlags"`
TessellationEvaluation string `options:""`
TessellationEvaluationFlags string `tip:"CompileFlags"`
Compute string `options:""`
ComputeFlags string `tip:"CompileFlags"`
LayoutGroups []ShaderLayoutGroup `visible:"false"`
SamplerLabels []string
VertexSpv string
FragmentSpv string
GeometrySpv string
TessellationControlSpv string
TessellationEvaluationSpv string
ComputeSpv string
}
ShaderData.Compile
ShaderDataBase
struct
NewShaderDataBase
ShaderDataBase.Activate
ShaderDataBase.Base
ShaderDataBase.BoundDataPointer
ShaderDataBase.CancelDestroy
ShaderDataBase.DataPointer
ShaderDataBase.Deactivate
ShaderDataBase.Destroy
ShaderDataBase.InstanceBoundDataSize
ShaderDataBase.IsDestroyed
ShaderDataBase.IsInView
ShaderDataBase.Model
ShaderDataBase.ModelPtr
ShaderDataBase.SelectLights
ShaderDataBase.SetModel
ShaderDataBase.Setup
ShaderDataBase.SkinningHeader
ShaderDataBase.Transform
ShaderDataBase.UpdateBoundData
ShaderDataBase.UpdateModel
ShaderDataCombine
struct
ShaderDataCombine.Size
ShaderDataCompiled
struct
type ShaderDataCompiled struct {
Name string
Vertex string
Fragment string
Geometry string
TessellationControl string
TessellationEvaluation string
Compute string
LayoutGroups []ShaderLayoutGroup
SamplerLabels []string
}
ShaderDataCompiled.IsCompute
ShaderDataCompiled.SelectLayout
ShaderDataCompiled.Stride
ShaderDataCompiled.ToAttributeDescription
func (sd *ShaderDataCompiled) ToAttributeDescription(locationStart uint32) []vk.VertexInputAttributeDescription
ShaderDataCompiled.ToDescriptorSetLayoutStructure
ShaderDataCompiled.WorkGroups
ShaderDraw
struct
NewShaderDraw
ShaderDraw.AddInstanceGroup
ShaderDraw.Clear
ShaderDraw.Destroy
ShaderDraw.Filter
ShaderDriverData
struct
type ShaderDriverData struct {
DescriptorSetLayoutStructure
Stride uint32
AttributeDescriptions []vk.VertexInputAttributeDescription
}
NewShaderDriverData
ShaderId
struct
ShaderId.IsValid
ShaderLayout
struct
type ShaderLayout struct {
Location int // -1 if not set
Binding int // -1 if not set
Count int // 1 if not set
Set int // -1 if not set
InputAttachment int // -1 if not set
Type string // float, vec3, mat4, etc.
Name string
Source string // in, out, uniform, buffer
Fields []ShaderLayoutStructField
}
ShaderLayout.Capacity
ShaderLayout.DescriptorType
ShaderLayout.FullName
ShaderLayout.IsBuffer
ShaderLayout.Stride
ShaderLayoutGroup
struct
ShaderLayoutGroup.DescriptorFlag
ShaderLayoutStructField
struct
ShaderPipelineColorBlend
struct
type ShaderPipelineColorBlend struct {
LogicOpEnable bool
LogicOp string `options:"StringVkLogicOp"`
BlendConstants0 float32 `tip:"BlendConstants"`
BlendConstants1 float32 `tip:"BlendConstants"`
BlendConstants2 float32 `tip:"BlendConstants"`
BlendConstants3 float32 `tip:"BlendConstants"`
}
ShaderPipelineColorBlend.LogicOpToVK
ShaderPipelineColorBlendAttachments
struct
type ShaderPipelineColorBlendAttachments struct {
BlendEnable bool
SrcColorBlendFactor string `options:"StringVkBlendFactor"`
DstColorBlendFactor string `options:"StringVkBlendFactor"`
ColorBlendOp string `options:"StringVkBlendOp"`
SrcAlphaBlendFactor string `options:"StringVkBlendFactor"`
DstAlphaBlendFactor string `options:"StringVkBlendFactor"`
AlphaBlendOp string `options:"StringVkBlendOp"`
ColorWriteMask []string `options:"StringVkColorComponentFlagBits"`
}
ShaderPipelineColorBlendAttachments.AlphaBlendOpToVK
ShaderPipelineColorBlendAttachments.BlendEnableToVK
ShaderPipelineColorBlendAttachments.ColorBlendOpToVK
ShaderPipelineColorBlendAttachments.ColorWriteMaskToVK
func (a *ShaderPipelineColorBlendAttachments) ColorWriteMaskToVK() vulkan_const.ColorComponentFlagBits
ShaderPipelineColorBlendAttachments.DstAlphaBlendFactorToVK
ShaderPipelineColorBlendAttachments.DstColorBlendFactorToVK
ShaderPipelineColorBlendAttachments.ListAlphaBlendOp
ShaderPipelineColorBlendAttachments.ListColorBlendOp
ShaderPipelineColorBlendAttachments.ListDstAlphaBlendFactor
ShaderPipelineColorBlendAttachments.ListDstColorBlendFactor
ShaderPipelineColorBlendAttachments.ListSrcAlphaBlendFactor
ShaderPipelineColorBlendAttachments.ListSrcColorBlendFactor
ShaderPipelineColorBlendAttachments.SrcAlphaBlendFactorToVK
ShaderPipelineColorBlendAttachments.SrcColorBlendFactorToVK
ShaderPipelineColorBlendAttachmentsCompiled
struct
type ShaderPipelineColorBlendAttachmentsCompiled struct {
BlendEnable vk.Bool32
SrcColorBlendFactor vulkan_const.BlendFactor
DstColorBlendFactor vulkan_const.BlendFactor
ColorBlendOp vulkan_const.BlendOp
SrcAlphaBlendFactor vulkan_const.BlendFactor
DstAlphaBlendFactor vulkan_const.BlendFactor
AlphaBlendOp vulkan_const.BlendOp
ColorWriteMask vk.ColorComponentFlags
}
ShaderPipelineColorBlendCompiled
struct
type ShaderPipelineColorBlendCompiled struct {
LogicOpEnable vk.Bool32
LogicOp vulkan_const.LogicOp
BlendConstants [4]float32
}
ShaderPipelineData
struct
type ShaderPipelineData struct {
Name string
InputAssembly ShaderPipelineInputAssembly
Rasterization ShaderPipelinePipelineRasterization
Multisample ShaderPipelinePipelineMultisample
ColorBlend ShaderPipelineColorBlend
ColorBlendAttachments []ShaderPipelineColorBlendAttachments
DepthStencil ShaderPipelineDepthStencil
Tessellation ShaderPipelineTessellation
GraphicsPipeline ShaderPipelineGraphicsPipeline
PushConstant ShaderPipelinePushConstant
}
ShaderPipelineData.AlphaToCoverageEnableToVK
ShaderPipelineData.AlphaToOneEnableToVK
ShaderPipelineData.BackStencilOpStateToVK
ShaderPipelineData.BlendConstants
ShaderPipelineData.Compile
ShaderPipelineData.DepthBiasEnableToVK
ShaderPipelineData.DepthBoundsTestEnableToVK
ShaderPipelineData.DepthClampEnableToVK
ShaderPipelineData.DepthTestEnableToVK
ShaderPipelineData.DepthWriteEnableToVK
ShaderPipelineData.FrontStencilOpStateToVK
TODO: This and the BackStencilOpStateToVK are duplicates because of a bad structure setup, please fix later
ShaderPipelineData.ListBackCompareOp
ShaderPipelineData.ListBackDepthFailOp
ShaderPipelineData.ListBackFailOp
ShaderPipelineData.ListBackPassOp
ShaderPipelineData.ListBlendFactor
ShaderPipelineData.ListBlendOp
ShaderPipelineData.ListCullMode
ShaderPipelineData.ListDepthCompareOp
ShaderPipelineData.ListFrontCompareOp
ShaderPipelineData.ListFrontDepthFailOp
ShaderPipelineData.ListFrontFace
ShaderPipelineData.ListFrontFailOp
ShaderPipelineData.ListFrontPassOp
ShaderPipelineData.ListLogicOp
ShaderPipelineData.ListPatchControlPoints
ShaderPipelineData.ListPolygonMode
ShaderPipelineData.ListRasterizationSamples
ShaderPipelineData.ListTopology
ShaderPipelineData.LogicOpEnableToVK
ShaderPipelineData.PrimitiveRestartToVK
ShaderPipelineData.RasterizerDiscardEnableToVK
ShaderPipelineData.SampleShadingEnableToVK
ShaderPipelineData.StencilTestEnableToVK
ShaderPipelineDataCompiled
struct
type ShaderPipelineDataCompiled struct {
Name string
InputAssembly ShaderPipelineInputAssemblyCompiled
Rasterization ShaderPipelinePipelineRasterizationCompiled
Multisample ShaderPipelinePipelineMultisampleCompiled
ColorBlend ShaderPipelineColorBlendCompiled
ColorBlendAttachments []ShaderPipelineColorBlendAttachmentsCompiled
DepthStencil ShaderPipelineDepthStencilCompiled
Tessellation ShaderPipelineTessellationCompiled
GraphicsPipeline ShaderPipelineGraphicsPipelineCompiled
PushConstant ShaderPipelinePushConstantCompiled
}
ShaderPipelineDataCompiled.ConstructPipeline
func (s *ShaderPipelineDataCompiled) ConstructPipeline(device *GPUDevice, shader *Shader, renderPass *RenderPass, stages []vk.PipelineShaderStageCreateInfo) bool
ShaderPipelineDepthStencil
struct
type ShaderPipelineDepthStencil struct {
DepthTestEnable bool
DepthWriteEnable bool
DepthCompareOp string `options:"StringVkCompareOp"`
DepthBoundsTestEnable bool
StencilTestEnable bool
FrontFailOp string `options:"StringVkStencilOp" tip:"FailOp"`
FrontPassOp string `options:"StringVkStencilOp" tip:"PassOp"`
FrontDepthFailOp string `options:"StringVkStencilOp" tip:"DepthFailOp"`
FrontCompareOp string `options:"StringVkCompareOp" tip:"CompareOp"`
FrontCompareMask uint32 `tip:"CompareMask"`
FrontWriteMask uint32 `tip:"WriteMask"`
FrontReference uint32 `tip:"Reference"`
BackFailOp string `options:"StringVkStencilOp" tip:"FailOp"`
BackPassOp string `options:"StringVkStencilOp" tip:"PassOp"`
BackDepthFailOp string `options:"StringVkStencilOp" tip:"DepthFailOp"`
BackCompareOp string `options:"StringVkCompareOp" tip:"CompareOp"`
BackCompareMask uint32 `tip:"CompareMask"`
BackWriteMask uint32 `tip:"WriteMask"`
BackReference uint32 `tip:"Reference"`
MinDepthBounds float32
MaxDepthBounds float32
}
ShaderPipelineDepthStencilCompiled
struct
type ShaderPipelineDepthStencilCompiled struct {
DepthTestEnable vk.Bool32
DepthWriteEnable vk.Bool32
DepthCompareOp vulkan_const.CompareOp
DepthBoundsTestEnable vk.Bool32
StencilTestEnable vk.Bool32
Front vk.StencilOpState
Back vk.StencilOpState
MinDepthBounds float32
MaxDepthBounds float32
}
ShaderPipelineGraphicsPipeline
struct
type ShaderPipelineGraphicsPipeline struct {
Subpass uint32
PipelineCreateFlags []string `options:"StringVkPipelineCreateFlagBits"`
}
ShaderPipelineGraphicsPipeline.PipelineCreateFlagsToVK
ShaderPipelineGraphicsPipelineCompiled
struct
type ShaderPipelineGraphicsPipelineCompiled struct {
Subpass uint32
PipelineCreateFlags vk.PipelineCreateFlags
}
ShaderPipelineInputAssembly
struct
type ShaderPipelineInputAssembly struct {
Topology string `options:"StringVkPrimitiveTopology"`
PrimitiveRestart bool
}
ShaderPipelineInputAssembly.TopologyToVK
ShaderPipelineInputAssemblyCompiled
struct
type ShaderPipelineInputAssemblyCompiled struct {
Topology vulkan_const.PrimitiveTopology
PrimitiveRestart vk.Bool32
}
ShaderPipelinePipelineMultisample
struct
type ShaderPipelinePipelineMultisample struct {
RasterizationSamples string `options:"StringVkSampleCountFlagBits"`
SampleShadingEnable bool
MinSampleShading float32
AlphaToCoverageEnable bool
AlphaToOneEnable bool
}
ShaderPipelinePipelineMultisample.RasterizationSamplesToVK
func (s *ShaderPipelinePipelineMultisample) RasterizationSamplesToVK(device *GPUPhysicalDevice) GPUSampleCountFlags
ShaderPipelinePipelineMultisampleCompiled
struct
type ShaderPipelinePipelineMultisampleCompiled struct {
RasterizationSamples vulkan_const.SampleCountFlagBits
SampleShadingEnable vk.Bool32
MinSampleShading float32
AlphaToCoverageEnable vk.Bool32
AlphaToOneEnable vk.Bool32
}
ShaderPipelinePipelineRasterization
struct
type ShaderPipelinePipelineRasterization struct {
DepthClampEnable bool
RasterizerDiscardEnable bool
PolygonMode string `options:"StringVkPolygonMode"`
CullMode string `options:"StringVkCullModeFlagBits"`
FrontFace string `options:"StringVkFrontFace"`
DepthBiasEnable bool
DepthBiasConstantFactor float32
DepthBiasClamp float32
DepthBiasSlopeFactor float32
LineWidth float32
}
ShaderPipelinePipelineRasterization.CullModeToVK
ShaderPipelinePipelineRasterization.FrontFaceToVK
ShaderPipelinePipelineRasterization.PolygonModeToVK
ShaderPipelinePipelineRasterizationCompiled
struct
type ShaderPipelinePipelineRasterizationCompiled struct {
DepthClampEnable vk.Bool32
DiscardEnable vk.Bool32
PolygonMode vulkan_const.PolygonMode
CullMode vk.CullModeFlags
FrontFace vulkan_const.FrontFace
DepthBiasEnable vk.Bool32
DepthBiasConstantFactor float32
DepthBiasClamp float32
DepthBiasSlopeFactor float32
LineWidth float32
}
ShaderPipelinePushConstant
struct
type ShaderPipelinePushConstant struct {
Size uint32
StageFlags []string `options:"StringVkAccessFlagBits"`
}
ShaderPipelinePushConstant.ShaderStageFlagsToVK
ShaderPipelinePushConstantCompiled
struct
ShaderPipelineTessellation
struct
type ShaderPipelineTessellation struct {
PatchControlPoints string `options:"StringVkPatchControlPoints"`
}
ShaderPipelineTessellation.PatchControlPointsToVK
ShaderPipelineTessellationCompiled
struct
ShaderType
const ( ShaderTypeGraphics ShaderType = iota ShaderTypeCompute )
SkinnedShaderDataHeader
struct
SkinnedShaderDataHeader.BoneByIndex
SkinnedShaderDataHeader.CreateBones
SkinnedShaderDataHeader.FindBone
SkinnedShaderDataHeader.HasBones
SkinnedShaderDataHeader.SkinNamedDataInstanceSize
SkinnedShaderDataHeader.SkinNamedDataPointer
SkinnedShaderDataHeader.SkinUpdateNamedData
TextShaderData
struct
type TextShaderData struct {
ShaderDataBase
UVs matrix.Vec4
FgColor matrix.Color
BgColor matrix.Color
Scissor matrix.Vec4
PxRange matrix.Vec2
}
TextShaderData.Size
Texture
struct
type Texture struct {
Key string
TexturePixelCache []byte
RenderId TextureId
Channels int
Filter int
MipLevels int
Width int
Height int
CacheInvalid bool
// Has unexported fields.
}
NewTexture
NewTextureFromImage
NewTextureFromMemory
func NewTextureFromMemory(key string, data []byte, width, height int, filter TextureFilter) (*Texture, error)
Texture.DelayedCreate
Texture.ReadAllPixels
Texture.ReadPendingDataForTransparency
Texture.ReadPixel
Texture.Reload
Texture.SetPendingDataDimensions
Texture.Size
Texture.WritePixels
TextureCache
struct
NewTextureCache
TextureCache.CreatePending
TextureCache.Destroy
TextureCache.ForceRemoveTexture
TextureCache.InsertRawTexture
func (t *TextureCache) InsertRawTexture(key string, data []byte, width, height int, filter TextureFilter) (*Texture, error)
TextureCache.InsertTexture
TextureCache.ReloadTexture
TextureCache.Texture
TextureCleanup
struct
TextureColorFormat
const ( TextureColorFormatRgbaUnorm TextureColorFormat = iota TextureColorFormatRgbUnorm TextureColorFormatRgbaSrgb TextureColorFormatRgbSrgb TextureColorFormatLuminance )
TextureData
struct
type TextureData struct {
Mem []byte
InternalFormat TextureInputType
Format TextureColorFormat
Type TextureMemType
Width int
Height int
InputType TextureFileFormat
Dimensions TextureDimensions
}
ReadRawTextureData
TexturePixelsFromAsset
TextureDimensions
const ( TextureDimensions2 TextureDimensions = iota TextureDimensions1 TextureDimensions3 TextureDimensionsCube )
TextureFileFormat
const ( TextureFileFormatAstc TextureFileFormat = iota TextureFileFormatPng TextureFileFormatRaw )
TextureFilter
const ( TextureFilterLinear TextureFilter = iota TextureFilterNearest TextureFilterMax )
TextureId
struct
type TextureId struct {
Image GPUImage
Memory GPUDeviceMemory
View GPUImageView
Sampler GPUSampler
Format GPUFormat
MipLevels uint32
Layout GPUImageLayout
Access GPUAccessFlags
Samples GPUSampleCountFlags
Width int
Height int
LayerCount int
}
TextureId.IsValid
TextureInputType
const ( TextureInputTypeCompressedRgbaAstc4x4 TextureInputType = iota TextureInputTypeCompressedRgbaAstc5x4 TextureInputTypeCompressedRgbaAstc5x5 TextureInputTypeCompressedRgbaAstc6x5 TextureInputTypeCompressedRgbaAstc6x6 TextureInputTypeCompressedRgbaAstc8x5 TextureInputTypeCompressedRgbaAstc8x6 TextureInputTypeCompressedRgbaAstc8x8 TextureInputTypeCompressedRgbaAstc10x5 TextureInputTypeCompressedRgbaAstc10x6 TextureInputTypeCompressedRgbaAstc10x8 TextureInputTypeCompressedRgbaAstc10x10 TextureInputTypeCompressedRgbaAstc12x10 TextureInputTypeCompressedRgbaAstc12x12 TextureInputTypeRgba8 TextureInputTypeRgb8 TextureInputTypeLuminance )
TextureMemType
const ( TextureMemTypeUnsignedByte TextureMemType = iota )
Vertex
struct
type Vertex struct {
Position matrix.Vec3
Normal matrix.Vec3
Tangent matrix.Vec4
UV0 matrix.Vec2
Color matrix.Color
JointIds matrix.Vec4i
JointWeights matrix.Vec4
MorphTarget matrix.Vec3
}
MeshPlaneData
MeshQuadData
ViewCuller
interface