diff --git a/.gitignore b/.gitignore index eeb6ca770..84afa7f44 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ go.work bin/ logs/ -docs/api external/bin interpreter/kaiju-* *.zip diff --git a/.vscode/launch.json b/.vscode/launch.json index 4d4bca067..e718f4aa4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -49,16 +49,32 @@ "CGO_ENABLED": "1", } }, { - "name": "Documentation Generator", + "name": "Generate Documentation", "type": "go", "request": "launch", "mode": "auto", - "program": "${workspaceFolder}/src/generators/api", + "program": "${workspaceFolder}/src/tools/gendocs.go", + "args": ["${workspaceFolder}/src"], "cwd": "${workspaceFolder}", - "buildFlags": "-tags=generator", "env": { - "CGO_ENABLED": "1", - } + "CGO_ENABLED": "1" + }, + "console": "integratedTerminal", + "showLog": true, + "preLaunchTask": "Install gomarkdoc" + }, { + "name": "Install Dependencies and Generate Docs", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/src/tools/install_and_generate_docs.go", + "args": ["${workspaceFolder}/src"], + "cwd": "${workspaceFolder}", + "env": { + "CGO_ENABLED": "1" + }, + "console": "integratedTerminal", + "showLog": true }, { "name": "Copy Headers", "type": "go", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 47fb16c6f..2b94028be 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -27,7 +27,52 @@ "$go" ], "group": "build", - "detail": "go build ${workspaceFolder}/src", + "detail": "go build ${workspaceFolder}/src" + }, { + "label": "Generate Documentation", + "type": "shell", + "command": "go", + "args": [ + "run", + "${workspaceFolder}/src/tools/gendocs.go", + "${workspaceFolder}/src" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "group": { + "kind": "build", + "isDefault": false + }, + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": false + }, + "problemMatcher": [], + "detail": "Generate API documentation using go doc" + }, { + "label": "Install gomarkdoc", + "type": "shell", + "command": "go", + "args": [ + "install", + "github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": false + }, + "problemMatcher": [], + "detail": "Install gomarkdoc dependency" } ] } \ No newline at end of file diff --git a/docs/api/bootstrap.md b/docs/api/bootstrap.md new file mode 100644 index 000000000..98fe3c0b7 --- /dev/null +++ b/docs/api/bootstrap.md @@ -0,0 +1,51 @@ + + +# bootstrap + +```go +import "kaijuengine.com/bootstrap" +``` + +## Index + +- [func Main\(game GameInterface, platformState any\)](<#Main>) +- [type GameInterface](<#GameInterface>) + + + +## func [Main]() + +```go +func Main(game GameInterface, platformState any) +``` + + + + +## type [GameInterface]() + +GameInterface is the primary interface to implement in order to bootstrap a game/application. + +```go +type GameInterface interface { + // Launch is used to bootstrap a game, the game should fill out this + // function's details to initialize itself. No updates are provided by the + // engine, so it is on the the implementing code to take care of registering + // any udpates with the supplied host. + Launch(*engine.Host) + + // PluginRegistry is used to expose types to be exported for use in Lua. + // Any type returned here will have it's members and functions mapped to + // be called by Lua. You can run the engine with the command line argument + // "generate=pluginapi" to dump a Lua API file and ensure your exposed + // types have been correctly inserted. + PluginRegistry() []reflect.Type + + // ContentDatabase must return the database interface for the engine to use + // when it is trying to access content. You can use exsiting types that + // implement [assets.Database], or you can create your own. + ContentDatabase() (assets.Database, error) +} +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/debug.md b/docs/api/debug.md new file mode 100644 index 000000000..350008ac3 --- /dev/null +++ b/docs/api/debug.md @@ -0,0 +1,112 @@ + + +# debug + +```go +import "kaijuengine.com/debug" +``` + +## Index + +- [Variables](<#variables>) +- [func Assert\(res bool, msg string\)](<#Assert>) +- [func Ensure\(res bool\)](<#Ensure>) +- [func EnsureMsg\(res bool, msg string\)](<#EnsureMsg>) +- [func EnsureNotError\(err error\)](<#EnsureNotError>) +- [func EnsureNotNil\(target any\)](<#EnsureNotNil>) +- [func Halt\(msg string\)](<#Halt>) +- [func Log\(msg string, args ...any\)](<#Log>) +- [func Throw\(message string\)](<#Throw>) +- [func ThrowNotImplemented\(todo string\)](<#ThrowNotImplemented>) + + +## Variables + + + +```go +var NotImplementedError = errors.New("not implemented") +``` + + +## func [Assert]() + +```go +func Assert(res bool, msg string) +``` + + + + +## func [Ensure]() + +```go +func Ensure(res bool) +``` + + + + +## func [EnsureMsg]() + +```go +func EnsureMsg(res bool, msg string) +``` + + + + +## func [EnsureNotError]() + +```go +func EnsureNotError(err error) +``` + + + + +## func [EnsureNotNil]() + +```go +func EnsureNotNil(target any) +``` + + + + +## func [Halt]() + +```go +func Halt(msg string) +``` + + + + +## func [Log]() + +```go +func Log(msg string, args ...any) +``` + + + + +## func [Throw]() + +```go +func Throw(message string) +``` + + + + +## func [ThrowNotImplemented]() + +```go +func ThrowNotImplemented(todo string) +``` + + + +Generated by [gomarkdoc]() diff --git a/docs/api/editor.md b/docs/api/editor.md new file mode 100644 index 000000000..e9974f675 --- /dev/null +++ b/docs/api/editor.md @@ -0,0 +1,480 @@ + + +# editor + +```go +import "kaijuengine.com/editor" +``` + +## Index + +- [Constants](<#constants>) +- [func RegisterPlugin\(key string, plugin editor\_plugin.EditorPlugin\)](<#RegisterPlugin>) +- [type Editor](<#Editor>) + - [func \(ed \*Editor\) BlurInterface\(\)](<#Editor.BlurInterface>) + - [func \(ed \*Editor\) Build\(buildMode project.GameBuildMode\)](<#Editor.Build>) + - [func \(ed \*Editor\) BuildAndRun\(buildMode project.GameBuildMode\)](<#Editor.BuildAndRun>) + - [func \(ed \*Editor\) BuildAndRunCurrentStage\(\)](<#Editor.BuildAndRunCurrentStage>) + - [func \(ed \*Editor\) Cache\(\) \*content\_database.Cache](<#Editor.Cache>) + - [func \(ed \*Editor\) ContentPreviewer\(\) \*content\_previews.ContentPreviewer](<#Editor.ContentPreviewer>) + - [func \(ed \*Editor\) ContentWorkspaceSelected\(\)](<#Editor.ContentWorkspaceSelected>) + - [func \(ed \*Editor\) CreateHtmlUiFile\(name string\)](<#Editor.CreateHtmlUiFile>) + - [func \(ed \*Editor\) CreateNewCamera\(\)](<#Editor.CreateNewCamera>) + - [func \(ed \*Editor\) CreateNewEntity\(\)](<#Editor.CreateNewEntity>) + - [func \(ed \*Editor\) CreateNewLight\(\)](<#Editor.CreateNewLight>) + - [func \(ed \*Editor\) CreateNewStage\(\)](<#Editor.CreateNewStage>) + - [func \(ed \*Editor\) CreatePluginProject\(path string\)](<#Editor.CreatePluginProject>) + - [func \(ed \*Editor\) Events\(\) \*editor\_events.EditorEvents](<#Editor.Events>) + - [func \(ed \*Editor\) FocusInterface\(\)](<#Editor.FocusInterface>) + - [func \(ed \*Editor\) History\(\) \*memento.History](<#Editor.History>) + - [func \(ed \*Editor\) Host\(\) \*engine.Host](<#Editor.Host>) + - [func \(ed \*Editor\) IsInputFocused\(\) bool](<#Editor.IsInputFocused>) + - [func \(ed \*Editor\) OpenCodeEditor\(\)](<#Editor.OpenCodeEditor>) + - [func \(ed \*Editor\) OpenStageInStageWorkspace\(id string\)](<#Editor.OpenStageInStageWorkspace>) + - [func \(ed \*Editor\) Project\(\) \*project.Project](<#Editor.Project>) + - [func \(ed \*Editor\) ProjectFileSystem\(\) \*project\_file\_system.FileSystem](<#Editor.ProjectFileSystem>) + - [func \(ed \*Editor\) RecompileWithPlugins\(plugins \[\]editor\_plugin.PluginInfo, onComplete func\(err error\)\) error](<#Editor.RecompileWithPlugins>) + - [func \(ed \*Editor\) SaveCurrentStage\(\)](<#Editor.SaveCurrentStage>) + - [func \(ed \*Editor\) SaveCurrentStageWithCallback\(cb func\(bool\)\)](<#Editor.SaveCurrentStageWithCallback>) + - [func \(ed \*Editor\) Settings\(\) \*editor\_settings.Settings](<#Editor.Settings>) + - [func \(ed \*Editor\) SettingsWorkspaceSelected\(\)](<#Editor.SettingsWorkspaceSelected>) + - [func \(ed \*Editor\) ShadingWorkspace\(\) \*shading\_workspace.ShadingWorkspace](<#Editor.ShadingWorkspace>) + - [func \(ed \*Editor\) ShadingWorkspaceSelected\(\)](<#Editor.ShadingWorkspaceSelected>) + - [func \(ed \*Editor\) ShowReferences\(id string\)](<#Editor.ShowReferences>) + - [func \(ed \*Editor\) StageView\(\) \*editor\_stage\_view.StageView](<#Editor.StageView>) + - [func \(ed \*Editor\) StageWorkspaceSelected\(\)](<#Editor.StageWorkspaceSelected>) + - [func \(ed \*Editor\) UIWorkspaceSelected\(\)](<#Editor.UIWorkspaceSelected>) + - [func \(ed \*Editor\) UpdateSettings\(\)](<#Editor.UpdateSettings>) + - [func \(ed \*Editor\) VfxWorkspace\(\) \*vfx\_workspace.VfxWorkspace](<#Editor.VfxWorkspace>) + - [func \(ed \*Editor\) VfxWorkspaceSelected\(\)](<#Editor.VfxWorkspaceSelected>) + - [func \(ed \*Editor\) ViewHtmlUi\(id string\)](<#Editor.ViewHtmlUi>) +- [type EditorGame](<#EditorGame>) + - [func \(EditorGame\) ContentDatabase\(\) \(assets.Database, error\)](<#EditorGame.ContentDatabase>) + - [func \(EditorGame\) Launch\(host \*engine.Host\)](<#EditorGame.Launch>) + - [func \(EditorGame\) PluginRegistry\(\) \[\]reflect.Type](<#EditorGame.PluginRegistry>) +- [type WorkspaceState](<#WorkspaceState>) + + +## Constants + + + +```go +const ( + WorkspaceStateNone = WorkspaceState(iota) + WorkspaceStateStage + WorkspaceStateContent + WorkspaceStateShading + WorkspaceStateVfx + WorkspaceStateUI + WorkspaceStateSettings +) +``` + + + +```go +const EditorVersion float64 = 0.0013 +``` + + +## func [RegisterPlugin]() + +```go +func RegisterPlugin(key string, plugin editor_plugin.EditorPlugin) +``` + + + + +## type [Editor]() + +Editor is the entry point structure for the entire editor. It acts as the delegate to the various systems and holds the primary members that make up the bulk of the editor identity. + +The design goal of the editor is different than that of the \[engine.Host\], as it is not intended to be passed around for access to the system. Instead it will supply interface functions that are needed to the systems that it holds internally. + +```go +type Editor struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*Editor\) [BlurInterface]() + +```go +func (ed *Editor) BlurInterface() +``` + +FocusInterface is responsible for disabling the input on the various interfaces that are currently presented to the developer. This primarily includes the menu bar, status bar, and whichever workspace is active. + + +### func \(\*Editor\) [Build]() + +```go +func (ed *Editor) Build(buildMode project.GameBuildMode) +``` + + + + +### func \(\*Editor\) [BuildAndRun]() + +```go +func (ed *Editor) BuildAndRun(buildMode project.GameBuildMode) +``` + + + + +### func \(\*Editor\) [BuildAndRunCurrentStage]() + +```go +func (ed *Editor) BuildAndRunCurrentStage() +``` + + + + +### func \(\*Editor\) [Cache]() + +```go +func (ed *Editor) Cache() *content_database.Cache +``` + + + + +### func \(\*Editor\) [ContentPreviewer]() + +```go +func (ed *Editor) ContentPreviewer() *content_previews.ContentPreviewer +``` + + + + +### func \(\*Editor\) [ContentWorkspaceSelected]() + +```go +func (ed *Editor) ContentWorkspaceSelected() +``` + +ContentWorkspaceSelected will inform the editor that the developer has changed to the content workspace. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [CreateHtmlUiFile]() + +```go +func (ed *Editor) CreateHtmlUiFile(name string) +``` + + + + +### func \(\*Editor\) [CreateNewCamera]() + +```go +func (ed *Editor) CreateNewCamera() +``` + + + + +### func \(\*Editor\) [CreateNewEntity]() + +```go +func (ed *Editor) CreateNewEntity() +``` + + + + +### func \(\*Editor\) [CreateNewLight]() + +```go +func (ed *Editor) CreateNewLight() +``` + + + + +### func \(\*Editor\) [CreateNewStage]() + +```go +func (ed *Editor) CreateNewStage() +``` + + + + +### func \(\*Editor\) [CreatePluginProject]() + +```go +func (ed *Editor) CreatePluginProject(path string) +``` + + + + +### func \(\*Editor\) [Events]() + +```go +func (ed *Editor) Events() *editor_events.EditorEvents +``` + + + + +### func \(\*Editor\) [FocusInterface]() + +```go +func (ed *Editor) FocusInterface() +``` + +FocusInterface is responsible for enabling the input on the various interfaces that are currently presented to the developer. This primarily includes the menu bar, status bar, and whichever workspace is active. + + +### func \(\*Editor\) [History]() + +```go +func (ed *Editor) History() *memento.History +``` + + + + +### func \(\*Editor\) [Host]() + +```go +func (ed *Editor) Host() *engine.Host +``` + + + + +### func \(\*Editor\) [IsInputFocused]() + +```go +func (ed *Editor) IsInputFocused() bool +``` + + + + +### func \(\*Editor\) [OpenCodeEditor]() + +```go +func (ed *Editor) OpenCodeEditor() +``` + +OpenCodeEditor will run a command specified in CodeEditor settings entry directly to the project top level folder. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. func \(ed \*Editor\) OpenVSCodeProject\(\) \{ + + +### func \(\*Editor\) [OpenStageInStageWorkspace]() + +```go +func (ed *Editor) OpenStageInStageWorkspace(id string) +``` + + + + +### func \(\*Editor\) [Project]() + +```go +func (ed *Editor) Project() *project.Project +``` + + + + +### func \(\*Editor\) [ProjectFileSystem]() + +```go +func (ed *Editor) ProjectFileSystem() *project_file_system.FileSystem +``` + + + + +### func \(\*Editor\) [RecompileWithPlugins]() + +```go +func (ed *Editor) RecompileWithPlugins(plugins []editor_plugin.PluginInfo, onComplete func(err error)) error +``` + + + + +### func \(\*Editor\) [SaveCurrentStage]() + +```go +func (ed *Editor) SaveCurrentStage() +``` + +SaveCurrentStage will save the currently open stage file. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [SaveCurrentStageWithCallback]() + +```go +func (ed *Editor) SaveCurrentStageWithCallback(cb func(bool)) +``` + + + + +### func \(\*Editor\) [Settings]() + +```go +func (ed *Editor) Settings() *editor_settings.Settings +``` + + + + +### func \(\*Editor\) [SettingsWorkspaceSelected]() + +```go +func (ed *Editor) SettingsWorkspaceSelected() +``` + +SettingsWorkspaceSelected will inform the editor that the developer has changed to the settings workspace. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [ShadingWorkspace]() + +```go +func (ed *Editor) ShadingWorkspace() *shading_workspace.ShadingWorkspace +``` + + + + +### func \(\*Editor\) [ShadingWorkspaceSelected]() + +```go +func (ed *Editor) ShadingWorkspaceSelected() +``` + +ShadingWorkspaceSelected will inform the editor that the developer has changed to the shading workspace. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [ShowReferences]() + +```go +func (ed *Editor) ShowReferences(id string) +``` + + + + +### func \(\*Editor\) [StageView]() + +```go +func (ed *Editor) StageView() *editor_stage_view.StageView +``` + + + + +### func \(\*Editor\) [StageWorkspaceSelected]() + +```go +func (ed *Editor) StageWorkspaceSelected() +``` + +StageWorkspaceSelected will inform the editor that the developer has changed to the stage workspace. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [UIWorkspaceSelected]() + +```go +func (ed *Editor) UIWorkspaceSelected() +``` + +UIWorkspaceSelected will inform the editor that the developer has changed to the ui workspace. This is an exposed function to meet the interface needs of \[menu\_bar.MenuBarHandler\]. + + +### func \(\*Editor\) [UpdateSettings]() + +```go +func (ed *Editor) UpdateSettings() +``` + + + + +### func \(\*Editor\) [VfxWorkspace]() + +```go +func (ed *Editor) VfxWorkspace() *vfx_workspace.VfxWorkspace +``` + + + + +### func \(\*Editor\) [VfxWorkspaceSelected]() + +```go +func (ed *Editor) VfxWorkspaceSelected() +``` + + + + +### func \(\*Editor\) [ViewHtmlUi]() + +```go +func (ed *Editor) ViewHtmlUi(id string) +``` + + + + +## type [EditorGame]() + +EditorGame satisfies \[bootstrap.GameInterface\] and will allow the engine to bootstrap the editor \(as it would a game\). + +```go +type EditorGame struct{} +``` + + +### func \(EditorGame\) [ContentDatabase]() + +```go +func (EditorGame) ContentDatabase() (assets.Database, error) +``` + + + + +### func \(EditorGame\) [Launch]() + +```go +func (EditorGame) Launch(host *engine.Host) +``` + + + + +### func \(EditorGame\) [PluginRegistry]() + +```go +func (EditorGame) PluginRegistry() []reflect.Type +``` + + + + +## type [WorkspaceState]() + + + +```go +type WorkspaceState = uint8 +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/engine.md b/docs/api/engine.md new file mode 100644 index 000000000..70b7b98f4 --- /dev/null +++ b/docs/api/engine.md @@ -0,0 +1,1154 @@ + + +# engine + +```go +import "kaijuengine.com/engine" +``` + +## Index + +- [Constants](<#constants>) +- [Variables](<#variables>) +- [func LoadLaunchParams\(\)](<#LoadLaunchParams>) +- [func ReflectValueFromJson\(v any, f reflect.Value\)](<#ReflectValueFromJson>) +- [func RegisterEntityData\(value EntityData\) error](<#RegisterEntityData>) +- [type Entity](<#Entity>) + - [func NewEntity\(workGroup \*concurrent.WorkGroup\) \*Entity](<#NewEntity>) + - [func \(e \*Entity\) Activate\(\)](<#Entity.Activate>) + - [func \(e \*Entity\) AddNamedData\(key string, data any\)](<#Entity.AddNamedData>) + - [func \(e \*Entity\) ChildAt\(idx int\) \*Entity](<#Entity.ChildAt>) + - [func \(e \*Entity\) ChildCount\(\) int](<#Entity.ChildCount>) + - [func \(e \*Entity\) Copy\(other \*Entity\)](<#Entity.Copy>) + - [func \(e \*Entity\) Deactivate\(\)](<#Entity.Deactivate>) + - [func \(e \*Entity\) DestroyShaderData\(\)](<#Entity.DestroyShaderData>) + - [func \(e \*Entity\) Duplicate\(workGroup \*concurrent.WorkGroup\) \*Entity](<#Entity.Duplicate>) + - [func \(e \*Entity\) FindByName\(name string\) \*Entity](<#Entity.FindByName>) + - [func \(e \*Entity\) ForceCleanup\(\)](<#Entity.ForceCleanup>) + - [func \(e \*Entity\) HasChildRecursive\(child \*Entity\) bool](<#Entity.HasChildRecursive>) + - [func \(e \*Entity\) HasChildren\(\) bool](<#Entity.HasChildren>) + - [func \(e \*Entity\) HasParent\(parent \*Entity\) bool](<#Entity.HasParent>) + - [func \(e \*Entity\) Id\(\) EntityId](<#Entity.Id>) + - [func \(e \*Entity\) IndexOfChild\(child \*Entity\) int](<#Entity.IndexOfChild>) + - [func \(e \*Entity\) Init\(workGroup \*concurrent.WorkGroup\)](<#Entity.Init>) + - [func \(e \*Entity\) IsActive\(\) bool](<#Entity.IsActive>) + - [func \(e \*Entity\) IsDestroyed\(\) bool](<#Entity.IsDestroyed>) + - [func \(e \*Entity\) IsRoot\(\) bool](<#Entity.IsRoot>) + - [func \(e \*Entity\) Name\(\) string](<#Entity.Name>) + - [func \(e \*Entity\) NamedData\(key string\) \[\]any](<#Entity.NamedData>) + - [func \(e \*Entity\) RemoveNamedData\(key string, data any\)](<#Entity.RemoveNamedData>) + - [func \(e \*Entity\) RemoveNamedDataByName\(key string\)](<#Entity.RemoveNamedDataByName>) + - [func \(e \*Entity\) Root\(\) \*Entity](<#Entity.Root>) + - [func \(e \*Entity\) SetActive\(isActive bool\)](<#Entity.SetActive>) + - [func \(e \*Entity\) SetChildrenOrdered\(\)](<#Entity.SetChildrenOrdered>) + - [func \(e \*Entity\) SetChildrenUnordered\(\)](<#Entity.SetChildrenUnordered>) + - [func \(e \*Entity\) SetName\(name string\)](<#Entity.SetName>) + - [func \(e \*Entity\) SetParent\(newParent \*Entity\)](<#Entity.SetParent>) + - [func \(e \*Entity\) ShaderData\(\) rendering.DrawInstance](<#Entity.ShaderData>) + - [func \(e \*Entity\) StoreShaderData\(sd rendering.DrawInstance\)](<#Entity.StoreShaderData>) +- [type EntityData](<#EntityData>) +- [type EntityId](<#EntityId>) +- [type FrameId](<#FrameId>) +- [type Host](<#Host>) + - [func NewHost\(name string, logStream \*logging.LogStream, assetDb assets.Database\) \*Host](<#NewHost>) + - [func \(host \*Host\) AssetDatabase\(\) assets.Database](<#Host.AssetDatabase>) + - [func \(host \*Host\) Audio\(\) \*audio.Audio](<#Host.Audio>) + - [func \(host \*Host\) Close\(\)](<#Host.Close>) + - [func \(host \*Host\) CollisionManager\(\) \*collision\_system.Manager](<#Host.CollisionManager>) + - [func \(h \*Host\) Deadline\(\) \(time.Time, bool\)](<#Host.Deadline>) + - [func \(host \*Host\) DestroyEntity\(entity \*Entity\)](<#Host.DestroyEntity>) + - [func \(h \*Host\) Done\(\) \<\-chan struct\{\}](<#Host.Done>) + - [func \(h \*Host\) Err\(\) error](<#Host.Err>) + - [func \(host \*Host\) FontCache\(\) \*rendering.FontCache](<#Host.FontCache>) + - [func \(host \*Host\) Frame\(\) FrameId](<#Host.Frame>) + - [func \(host \*Host\) Game\(\) any](<#Host.Game>) + - [func \(host \*Host\) ImportPlugins\(path string\) error](<#Host.ImportPlugins>) + - [func \(host \*Host\) Initialize\(width, height, x, y int, platformState any\) error](<#Host.Initialize>) + - [func \(host \*Host\) InitializeAudio\(\) \(err error\)](<#Host.InitializeAudio>) + - [func \(host \*Host\) InitializeRenderer\(\) error](<#Host.InitializeRenderer>) + - [func \(host \*Host\) Lighting\(\) \*lighting.LightingInformation](<#Host.Lighting>) + - [func \(host \*Host\) MaterialCache\(\) \*rendering.MaterialCache](<#Host.MaterialCache>) + - [func \(host \*Host\) MeshCache\(\) \*rendering.MeshCache](<#Host.MeshCache>) + - [func \(host \*Host\) Name\(\) string](<#Host.Name>) + - [func \(host \*Host\) Physics\(\) \*StagePhysics](<#Host.Physics>) + - [func \(host \*Host\) Plugins\(\) \[\]\*plugins.LuaVM](<#Host.Plugins>) + - [func \(host \*Host\) PrimaryCamera\(\) cameras.Camera](<#Host.PrimaryCamera>) + - [func \(host \*Host\) Render\(\)](<#Host.Render>) + - [func \(host \*Host\) RunAfterFrames\(wait int, call func\(\)\)](<#Host.RunAfterFrames>) + - [func \(host \*Host\) RunAfterNextUIClean\(call func\(\)\)](<#Host.RunAfterNextUIClean>) + - [func \(host \*Host\) RunAfterTime\(wait time.Duration, call func\(\)\)](<#Host.RunAfterTime>) + - [func \(host \*Host\) RunBeforeRender\(call func\(\)\)](<#Host.RunBeforeRender>) + - [func \(host \*Host\) RunNextFrame\(call func\(\)\)](<#Host.RunNextFrame>) + - [func \(host \*Host\) RunOnMainThread\(call func\(\)\)](<#Host.RunOnMainThread>) + - [func \(host \*Host\) Runtime\(\) float64](<#Host.Runtime>) + - [func \(h \*Host\) SetFrameRateLimit\(fps int64\)](<#Host.SetFrameRateLimit>) + - [func \(host \*Host\) SetGame\(game any\)](<#Host.SetGame>) + - [func \(host \*Host\) ShaderCache\(\) \*rendering.ShaderCache](<#Host.ShaderCache>) + - [func \(host \*Host\) StartPhysics\(\)](<#Host.StartPhysics>) + - [func \(host \*Host\) Teardown\(\)](<#Host.Teardown>) + - [func \(host \*Host\) TextureCache\(\) \*rendering.TextureCache](<#Host.TextureCache>) + - [func \(host \*Host\) Threads\(\) \*concurrent.Threads](<#Host.Threads>) + - [func \(host \*Host\) UICamera\(\) cameras.Camera](<#Host.UICamera>) + - [func \(host \*Host\) UIThreads\(\) \*concurrent.Threads](<#Host.UIThreads>) + - [func \(host \*Host\) Update\(deltaTime float64\)](<#Host.Update>) + - [func \(h \*Host\) Value\(key any\) any](<#Host.Value>) + - [func \(h \*Host\) WaitForFrameRate\(\)](<#Host.WaitForFrameRate>) + - [func \(host \*Host\) WorkGroup\(\) \*concurrent.WorkGroup](<#Host.WorkGroup>) +- [type LaunchParameters](<#LaunchParameters>) +- [type StagePhysics](<#StagePhysics>) + - [func \(p \*StagePhysics\) AddEntity\(entity \*Entity, body \*physics.RigidBody\)](<#StagePhysics.AddEntity>) + - [func \(p \*StagePhysics\) Destroy\(\)](<#StagePhysics.Destroy>) + - [func \(p \*StagePhysics\) FindCollision\(hit physics.CollisionHit\) \(\*StagePhysicsEntry, bool\)](<#StagePhysics.FindCollision>) + - [func \(p \*StagePhysics\) IsActive\(\) bool](<#StagePhysics.IsActive>) + - [func \(p \*StagePhysics\) Start\(\)](<#StagePhysics.Start>) + - [func \(p \*StagePhysics\) Update\(threads \*concurrent.Threads, deltaTime float64\)](<#StagePhysics.Update>) + - [func \(p \*StagePhysics\) World\(\) \*physics.World](<#StagePhysics.World>) +- [type StagePhysicsEntry](<#StagePhysicsEntry>) +- [type UpdateId](<#UpdateId>) + - [func \(u \*UpdateId\) IsValid\(\) bool](<#UpdateId.IsValid>) +- [type Updater](<#Updater>) + - [func NewConcurrentUpdater\(threads \*concurrent.Threads\) Updater](<#NewConcurrentUpdater>) + - [func NewUpdater\(\) Updater](<#NewUpdater>) + - [func \(u \*Updater\) AddUpdate\(update func\(float64\)\) UpdateId](<#Updater.AddUpdate>) + - [func \(u \*Updater\) Destroy\(\)](<#Updater.Destroy>) + - [func \(u \*Updater\) IsConcurrent\(\) bool](<#Updater.IsConcurrent>) + - [func \(u \*Updater\) RemoveUpdate\(id \*UpdateId\)](<#Updater.RemoveUpdate>) + - [func \(u \*Updater\) Update\(deltaTime float64\)](<#Updater.Update>) + + +## Constants + + + +```go +const ( + DefaultWindowWidth = 1280 + DefaultWindowHeight = 720 +) +``` + +InvalidFrameId can be used to indicate that a frame id is invalid + +```go +const InvalidFrameId = math.MaxUint64 +``` + +## Variables + + + +```go +var DebugEntityDataRegistry = map[string]EntityData{} +``` + + + +```go +var LaunchParams = LaunchParameters{} +``` + + +## func [LoadLaunchParams]() + +```go +func LoadLaunchParams() +``` + + + + +## func [ReflectValueFromJson]() + +```go +func ReflectValueFromJson(v any, f reflect.Value) +``` + + + + +## func [RegisterEntityData]() + +```go +func RegisterEntityData(value EntityData) error +``` + + + + +## type [Entity]() + +Entity is a struct that represents an arbitrary object in the host system. It contains a 3D transformation and can be a parent of, or a child to, other entities. Entities can also contain arbitrary named data to make it easier to access data that is specific to the entity. + +Child entities are unordered by default, you'll need to call \#Entity.SetChildrenOrdered to make them ordered. It is recommended to leave children unordered unless you have a specific reason to order them. + +```go +type Entity struct { + Transform matrix.Transform + Parent *Entity + Children []*Entity + + OnDestroy events.Event + OnDestroyRequested events.Event + OnActivate events.Event + OnDeactivate events.Event + // contains filtered or unexported fields +} +``` + + +### func [NewEntity]() + +```go +func NewEntity(workGroup *concurrent.WorkGroup) *Entity +``` + +NewEntity creates a new \#Entity struct and returns it + + +### func \(\*Entity\) [Activate]() + +```go +func (e *Entity) Activate() +``` + +Activate will set an active flag on the entity that can be queried with \#Entity.IsActive. It will also set the active flag on all children of the entity. If the entity is already active, this function will do nothing. + + +### func \(\*Entity\) [AddNamedData]() + +```go +func (e *Entity) AddNamedData(key string, data any) +``` + +AddNamedData allows you to add arbitrary data to the entity that can be accessed by a string key. This is useful for storing data that is specific to the entity. + +Named data is stored in a map of slices, so you can add multiple pieces of data to the same key. It is recommended to compile the data into a single structure so the slice length is 1, but sometimes that's not reasonable. + + +### func \(\*Entity\) [ChildAt]() + +```go +func (e *Entity) ChildAt(idx int) *Entity +``` + +ChildAt returns the child entity at the specified index + + +### func \(\*Entity\) [ChildCount]() + +```go +func (e *Entity) ChildCount() int +``` + +ChildCount returns the number of children the entity has + + +### func \(\*Entity\) [Copy]() + +```go +func (e *Entity) Copy(other *Entity) +``` + + + + +### func \(\*Entity\) [Deactivate]() + +```go +func (e *Entity) Deactivate() +``` + +Deactivate will set an active flag on the entity that can be queried with \#Entity.IsActive. It will also set the active flag on all children of the entity. If the entity is already inactive, this function will do nothing. + + +### func \(\*Entity\) [DestroyShaderData]() + +```go +func (e *Entity) DestroyShaderData() +``` + + + + +### func \(\*Entity\) [Duplicate]() + +```go +func (e *Entity) Duplicate(workGroup *concurrent.WorkGroup) *Entity +``` + + + + +### func \(\*Entity\) [FindByName]() + +```go +func (e *Entity) FindByName(name string) *Entity +``` + +FindByName will search the entity and the tree of children for the first entity with the specified name. If no entity is found, nil will be returned. + + +### func \(\*Entity\) [ForceCleanup]() + +```go +func (e *Entity) ForceCleanup() +``` + +ForceCleanup will force the full cleanup of the entity, typically this is to be called in very specific scenarios and not directly in game code. Unless there is a good reason \(like this entity no longer bein gin the host\). + + +### func \(\*Entity\) [HasChildRecursive]() + +```go +func (e *Entity) HasChildRecursive(child *Entity) bool +``` + + + + +### func \(\*Entity\) [HasChildren]() + +```go +func (e *Entity) HasChildren() bool +``` + +HasChildren returns true if the entity has any children + + +### func \(\*Entity\) [HasParent]() + +```go +func (e *Entity) HasParent(parent *Entity) bool +``` + +HasParent will loop through each parent and determine if any of them is the parent Entity supplied. If so, then it will return true, false otherwise. + + +### func \(\*Entity\) [Id]() + +```go +func (e *Entity) Id() EntityId +``` + +ID returns the unique identifier of the entity. The Id is only valid for entities that are not generated through template instantiation. The Id may also be stripped during game runtime if the entity is never externally referenced by any other part of the system. + + +### func \(\*Entity\) [IndexOfChild]() + +```go +func (e *Entity) IndexOfChild(child *Entity) int +``` + + + + +### func \(\*Entity\) [Init]() + +```go +func (e *Entity) Init(workGroup *concurrent.WorkGroup) +``` + + + + +### func \(\*Entity\) [IsActive]() + +```go +func (e *Entity) IsActive() bool +``` + +IsActive will return true if the entity is active, false otherwise + + +### func \(\*Entity\) [IsDestroyed]() + +```go +func (e *Entity) IsDestroyed() bool +``` + +IsDestroyed will return true if the entity is destroyed, false otherwise + + +### func \(\*Entity\) [IsRoot]() + +```go +func (e *Entity) IsRoot() bool +``` + +IsRoot returns true if the entity is the root entity in the hierarchy + + +### func \(\*Entity\) [Name]() + +```go +func (e *Entity) Name() string +``` + +Name returns the name of the entity + + +### func \(\*Entity\) [NamedData]() + +```go +func (e *Entity) NamedData(key string) []any +``` + +NamedData will return the data associated with the specified key. If the key does not exist, nil will be returned. + + +### func \(\*Entity\) [RemoveNamedData]() + +```go +func (e *Entity) RemoveNamedData(key string, data any) +``` + +RemoveNamedData will remove the specified data from the entity's named data map. If the key does not exist, this function will do nothing. + +\*This will remove the entire slice and all of it's data\* + + +### func \(\*Entity\) [RemoveNamedDataByName]() + +```go +func (e *Entity) RemoveNamedDataByName(key string) +``` + +RemoveNamedDataByName will remove all of the stored named data that matches the given key on the entity + + +### func \(\*Entity\) [Root]() + +```go +func (e *Entity) Root() *Entity +``` + +Root will return the root entity of the entity's hierarchy + + +### func \(\*Entity\) [SetActive]() + +```go +func (e *Entity) SetActive(isActive bool) +``` + +SetActive will set the active flag on the entity that can be queried with \#Entity.IsActive. It will also set the active flag on all children of the entity. If the entity is already active, this function will do nothing. + + +### func \(\*Entity\) [SetChildrenOrdered]() + +```go +func (e *Entity) SetChildrenOrdered() +``` + +SetChildrenOrdered sets the children of the entity to be ordered + + +### func \(\*Entity\) [SetChildrenUnordered]() + +```go +func (e *Entity) SetChildrenUnordered() +``` + +SetChildrenUnordered sets the children of the entity to be unordered + + +### func \(\*Entity\) [SetName]() + +```go +func (e *Entity) SetName(name string) +``` + +SetName sets the name of the entity + + +### func \(\*Entity\) [SetParent]() + +```go +func (e *Entity) SetParent(newParent *Entity) +``` + +SetParent will set the parent of the entity. If the entity already has a parent, it will be removed from the parent's children list. If the new parent is nil, the entity will be removed from the hierarchy and will become the root entity. If the new parent is not nil, the entity will be added to the new parent's children list. If the new parent is not active, the entity will be deactivated as well. + +This will also handle the transformation parenting internally + + +### func \(\*Entity\) [ShaderData]() + +```go +func (e *Entity) ShaderData() rendering.DrawInstance +``` + + + + +### func \(\*Entity\) [StoreShaderData]() + +```go +func (e *Entity) StoreShaderData(sd rendering.DrawInstance) +``` + + + + +## type [EntityData]() + + + +```go +type EntityData interface { + Init(entity *Entity, host *Host) +} +``` + + +## type [EntityId]() + +EntityId is a string that represents a unique identifier for an entity. The identifier is only valid for entities that are not generated through template instantiation. The identifier may also be stripped during game runtime if the entity is never externally referenced by any other part of the system. + +```go +type EntityId string +``` + + +## type [FrameId]() + +FrameId is a unique identifier for a frame + +```go +type FrameId = uint64 +``` + + +## type [Host]() + +Host is the mediator to the entire runtime for the game/editor. It is the main entry point for the game loop and is responsible for managing all entities, the window, and the rendering context. The host can be used to create and manage entities, call update functions on the main thread, and access various caches and resources. + +The host is expected to be passed around quite often throughout the program. It is designed to remove things like service locators, singletons, and other global state. You can have multiple hosts in a program to isolate things like windows and game state. + +```go +type Host struct { + Window *windowing.Window + LogStream *logging.LogStream + + Cameras hostCameras + + Drawings rendering.Drawings + + Closing bool + UIUpdater Updater + UILateUpdater Updater + Updater Updater + LateUpdater Updater + + OnClose events.Event + CloseSignal chan struct{} + // contains filtered or unexported fields +} +``` + + +### func [NewHost]() + +```go +func NewHost(name string, logStream *logging.LogStream, assetDb assets.Database) *Host +``` + +NewHost creates a new host with the given name and log stream. The log stream is the log handler that is used by the slog package functions. A Host that is created through NewHost has no function until \#Host.Initialize is called. + +This is primarily called from \#host\_container/New + + +### func \(\*Host\) [AssetDatabase]() + +```go +func (host *Host) AssetDatabase() assets.Database +``` + +AssetDatabase returns the asset database for the host + + +### func \(\*Host\) [Audio]() + +```go +func (host *Host) Audio() *audio.Audio +``` + +Audio returns the audio system for the host + + +### func \(\*Host\) [Close]() + +```go +func (host *Host) Close() +``` + +Close will set the closing flag to true and signal the host to clean up resources and close the window. + + +### func \(\*Host\) [CollisionManager]() + +```go +func (host *Host) CollisionManager() *collision_system.Manager +``` + +CollisionManager returns the collision manager for this host + + +### func \(\*Host\) [Deadline]() + +```go +func (h *Host) Deadline() (time.Time, bool) +``` + +Deadline is here to fulfil context.Context and will return zero and false + + +### func \(\*Host\) [DestroyEntity]() + +```go +func (host *Host) DestroyEntity(entity *Entity) +``` + +DestroyEntity marks the given entity for destruction. The entity will be cleaned up at the beginning of the next frame. + + +### func \(\*Host\) [Done]() + +```go +func (h *Host) Done() <-chan struct{} +``` + +Done is here to fulfil context.Context and will cose the CloseSignal channel + + +### func \(\*Host\) [Err]() + +```go +func (h *Host) Err() error +``` + +Err is here to fulfil context.Context and will return nil or context.Canceled + + +### func \(\*Host\) [FontCache]() + +```go +func (host *Host) FontCache() *rendering.FontCache +``` + +FontCache returns the font cache for the host + + +### func \(\*Host\) [Frame]() + +```go +func (host *Host) Frame() FrameId +``` + +Frame will return the current frame id + + +### func \(\*Host\) [Game]() + +```go +func (host *Host) Game() any +``` + +Game will return the primary game mediator for the running application. In the editor, this would be \*\[editor.Editor\], in the running game, this will be the \*game\_host.GameHost structure that is generated by the editor and filled out by the developer. + + +### func \(\*Host\) [ImportPlugins]() + +```go +func (host *Host) ImportPlugins(path string) error +``` + +ImportPlugins will read all of the plugins that are in the specified folder and prepare them for execution. + + +### func \(\*Host\) [Initialize]() + +```go +func (host *Host) Initialize(width, height, x, y int, platformState any) error +``` + +Initializes the various systems and caches that are mediated through the host. This includes the window, the shader cache, the texture cache, the mesh cache, and the font cache, and the camera systems. + + +### func \(\*Host\) [InitializeAudio]() + +```go +func (host *Host) InitializeAudio() (err error) +``` + + + + +### func \(\*Host\) [InitializeRenderer]() + +```go +func (host *Host) InitializeRenderer() error +``` + + + + +### func \(\*Host\) [Lighting]() + +```go +func (host *Host) Lighting() *lighting.LightingInformation +``` + +Lighting returns a pointer to the internal lighting information + + +### func \(\*Host\) [MaterialCache]() + +```go +func (host *Host) MaterialCache() *rendering.MaterialCache +``` + +MaterialCache returns the font cache for the host + + +### func \(\*Host\) [MeshCache]() + +```go +func (host *Host) MeshCache() *rendering.MeshCache +``` + +MeshCache returns the mesh cache for the host + + +### func \(\*Host\) [Name]() + +```go +func (host *Host) Name() string +``` + +Name returns the name of the host + + +### func \(\*Host\) [Physics]() + +```go +func (host *Host) Physics() *StagePhysics +``` + +Physics returns the stage physics system + + +### func \(\*Host\) [Plugins]() + +```go +func (host *Host) Plugins() []*plugins.LuaVM +``` + +Plugins returns all of the loaded plugins for the host + + +### func \(\*Host\) [PrimaryCamera]() + +```go +func (host *Host) PrimaryCamera() cameras.Camera +``` + + + + +### func \(\*Host\) [Render]() + +```go +func (host *Host) Render() +``` + +Render will render the scene. This starts by preparing any drawings that are pending. It also creates any pending shaders, textures, and meshes before the start of the render. The frame is then readied, buffers swapped, and any transformations that are dirty on entities are then cleaned. + + +### func \(\*Host\) [RunAfterFrames]() + +```go +func (host *Host) RunAfterFrames(wait int, call func()) +``` + +RunAfterFrames will call the given function after the given number of frames have passed from the current frame + + +### func \(\*Host\) [RunAfterNextUIClean]() + +```go +func (host *Host) RunAfterNextUIClean(call func()) +``` + +RunAfterNextUIClean will run the given function on the next frame. + + +### func \(\*Host\) [RunAfterTime]() + +```go +func (host *Host) RunAfterTime(wait time.Duration, call func()) +``` + +RunAfterTime will call the given function after the given number of time has passed from the current frame + + +### func \(\*Host\) [RunBeforeRender]() + +```go +func (host *Host) RunBeforeRender(call func()) +``` + + + + +### func \(\*Host\) [RunNextFrame]() + +```go +func (host *Host) RunNextFrame(call func()) +``` + +RunNextFrame will run the given function on the next frame. This is the same as calling RunAfterFrames\(0, func\(\)\{\}\) + + +### func \(\*Host\) [RunOnMainThread]() + +```go +func (host *Host) RunOnMainThread(call func()) +``` + + + + +### func \(\*Host\) [Runtime]() + +```go +func (host *Host) Runtime() float64 +``` + +Runtime will return how long the host has been running in seconds + + +### func \(\*Host\) [SetFrameRateLimit]() + +```go +func (h *Host) SetFrameRateLimit(fps int64) +``` + +SetFrameRateLimit will set the frame rate limit for the host. If the frame rate is set to 0, then the frame rate limit will be removed. + +If a frame rate is set, then the host will block until the desired frame rate is reached before continuing the update loop. + + +### func \(\*Host\) [SetGame]() + +```go +func (host *Host) SetGame(game any) +``` + +SetGame is to be called by the engine in most cases. It is called by the editor when it first starts up to setup the editor game binding. For a game generated by the editor, it will be called when the game is bootstrapped and provide the \*game\_host.GameHost structure. You can call this function at any time you want, but you really only should need to for special cases. + + +### func \(\*Host\) [ShaderCache]() + +```go +func (host *Host) ShaderCache() *rendering.ShaderCache +``` + +ShaderCache returns the shader cache for the host + + +### func \(\*Host\) [StartPhysics]() + +```go +func (host *Host) StartPhysics() +``` + + + + +### func \(\*Host\) [Teardown]() + +```go +func (host *Host) Teardown() +``` + +Teardown will destroy the host and all of its resources. This will also execute the OnClose event. This will also signal the CloseSignal channel. + + +### func \(\*Host\) [TextureCache]() + +```go +func (host *Host) TextureCache() *rendering.TextureCache +``` + +TextureCache returns the texture cache for the host + + +### func \(\*Host\) [Threads]() + +```go +func (host *Host) Threads() *concurrent.Threads +``` + +Threads returns the long\-running threads for this instance of host + + +### func \(\*Host\) [UICamera]() + +```go +func (host *Host) UICamera() cameras.Camera +``` + + + + +### func \(\*Host\) [UIThreads]() + +```go +func (host *Host) UIThreads() *concurrent.Threads +``` + +UIThreads returns the long\-running threads for the UI + + +### func \(\*Host\) [Update]() + +```go +func (host *Host) Update(deltaTime float64) +``` + +Update is the main update loop for the host. This will poll the window for events, update the entities, and render the scene. This will also check if the window has been closed or crashed and set the closing flag accordingly. + +The update order is FrameRunner \-\> Update \-\> LateUpdate \-\> EndUpdate: + +\[\-\] FrameRunner: Functions added to RunAfterFrames \[\-\] UIUpdate: Functions added to UIUpdater \[\-\] UILateUpdate: Functions added to UILateUpdater \[\-\] Update: Functions added to Updater \[\-\] LateUpdate: Functions added to LateUpdater \[\-\] EndUpdate: Internal functions for preparing for the next frame + +Any destroyed entities will also be ticked for their cleanup. This will also tick the editor entities for cleanup. + + +### func \(\*Host\) [Value]() + +```go +func (h *Host) Value(key any) any +``` + +Value is here to fulfil context.Context and will always return nil + + +### func \(\*Host\) [WaitForFrameRate]() + +```go +func (h *Host) WaitForFrameRate() +``` + +WaitForFrameRate will block until the desired frame rate limit is reached + + +### func \(\*Host\) [WorkGroup]() + +```go +func (host *Host) WorkGroup() *concurrent.WorkGroup +``` + +WorkGroup returns the work group for this instance of host + + +## type [LaunchParameters]() + + + +```go +type LaunchParameters struct { + Generate string + StartStage string + Trace bool + RecordPGO bool + AutoTest bool +} +``` + + +## type [StagePhysics]() + + + +```go +type StagePhysics struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*StagePhysics\) [AddEntity]() + +```go +func (p *StagePhysics) AddEntity(entity *Entity, body *physics.RigidBody) +``` + + + + +### func \(\*StagePhysics\) [Destroy]() + +```go +func (p *StagePhysics) Destroy() +``` + + + + +### func \(\*StagePhysics\) [FindCollision]() + +```go +func (p *StagePhysics) FindCollision(hit physics.CollisionHit) (*StagePhysicsEntry, bool) +``` + + + + +### func \(\*StagePhysics\) [IsActive]() + +```go +func (p *StagePhysics) IsActive() bool +``` + + + + +### func \(\*StagePhysics\) [Start]() + +```go +func (p *StagePhysics) Start() +``` + + + + +### func \(\*StagePhysics\) [Update]() + +```go +func (p *StagePhysics) Update(threads *concurrent.Threads, deltaTime float64) +``` + + + + +### func \(\*StagePhysics\) [World]() + +```go +func (p *StagePhysics) World() *physics.World +``` + + + + +## type [StagePhysicsEntry]() + + + +```go +type StagePhysicsEntry struct { + Entity *Entity + Body *physics.RigidBody +} +``` + + +## type [UpdateId]() + + + +```go +type UpdateId int +``` + + +### func \(\*UpdateId\) [IsValid]() + +```go +func (u *UpdateId) IsValid() bool +``` + + + + +## type [Updater]() + +Updater is a struct that stores update functions to be called when the \#Updater.Update function is called. This simply goes through the list from top to bottom and calls each function. + +\*Note that update functions are unordered, so don't rely on the order\* + +```go +type Updater struct { + // contains filtered or unexported fields +} +``` + + +### func [NewConcurrentUpdater]() + +```go +func NewConcurrentUpdater(threads *concurrent.Threads) Updater +``` + +NewConcurrentUpdater creates a new concurrent \#Updater struct and returns it + + +### func [NewUpdater]() + +```go +func NewUpdater() Updater +``` + +NewUpdater creates a new \#Updater struct and returns it + + +### func \(\*Updater\) [AddUpdate]() + +```go +func (u *Updater) AddUpdate(update func(float64)) UpdateId +``` + +AddUpdate adds an update function to the list of updates to be called when the \#Updater.Update function is called. It returns the id of the update function that was added so that it can be removed later. + +The update function is added to a back\-buffer so it will not begin updating until the next call to \#Updater.Update. + + +### func \(\*Updater\) [Destroy]() + +```go +func (u *Updater) Destroy() +``` + +Destroy cleans up the updater and should be called when the updater is no longer needed. It will close the pending and complete channels and clear the updates map. + + +### func \(\*Updater\) [IsConcurrent]() + +```go +func (u *Updater) IsConcurrent() bool +``` + +IsConcurrent will return if this updater is a concurrent updater + + +### func \(\*Updater\) [RemoveUpdate]() + +```go +func (u *Updater) RemoveUpdate(id *UpdateId) +``` + +RemoveUpdate removes an update function from the list of updates to be called when the \#Updater.Update function is called. It takes the id of the update function that was returned when the update function was added. + +The update function is removed from a back\-buffer so it will not be removed until the next call to \#Updater.Update. + + +### func \(\*Updater\) [Update]() + +```go +func (u *Updater) Update(deltaTime float64) +``` + +Update calls all of the update functions that have been added to the updater. It takes a deltaTime parameter that is the approximate amount of time since the last call to \#Updater.Update. + +Generated by [gomarkdoc]() diff --git a/docs/api/framework.md b/docs/api/framework.md new file mode 100644 index 000000000..9337a4a0c --- /dev/null +++ b/docs/api/framework.md @@ -0,0 +1,417 @@ + + +# framework + +```go +import "kaijuengine.com/framework" +``` + +## Index + +- [func CreateDrawingFromMeshUnlit\(host \*engine.Host, mesh \*rendering.Mesh, textures \[\]\*rendering.Texture\) \(rendering.Drawing, error\)](<#CreateDrawingFromMeshUnlit>) +- [func CreateDrawingFromMeshUnlitTransparent\(host \*engine.Host, mesh \*rendering.Mesh, textures \[\]\*rendering.Texture\) \(rendering.Drawing, error\)](<#CreateDrawingFromMeshUnlitTransparent>) +- [func RegisterDrawingSpecification\(spec DrawingSpecification\)](<#RegisterDrawingSpecification>) +- [func SpawnTemplate\(id string, host \*engine.Host, parent \*engine.Entity\) \(\*engine.Entity, error\)](<#SpawnTemplate>) +- [func SpawnTemplateWithTransform\(id string, host \*engine.Host, parent \*engine.Entity, pos, rot, scale matrix.Vec3\) \(\*engine.Entity, error\)](<#SpawnTemplateWithTransform>) +- [type DrawingSpecCreateInfo](<#DrawingSpecCreateInfo>) +- [type DrawingSpecification](<#DrawingSpecification>) + - [func FindDrawingSpecification\(name string\) DrawingSpecification](<#FindDrawingSpecification>) + - [func \(s DrawingSpecification\) CreateDrawings\(host \*engine.Host, info DrawingSpecCreateInfo\) \(ModelDrawingSlice, error\)](<#DrawingSpecification.CreateDrawings>) + - [func \(s DrawingSpecification\) IsValid\(\) bool](<#DrawingSpecification.IsValid>) +- [type DrawingSpecificationRenderInfo](<#DrawingSpecificationRenderInfo>) +- [type EncryptedInt32](<#EncryptedInt32>) + - [func \(e \*EncryptedInt32\) Add\(amount int32\)](<#EncryptedInt32.Add>) + - [func \(e \*EncryptedInt32\) Decrement\(\)](<#EncryptedInt32.Decrement>) + - [func \(e \*EncryptedInt32\) Decrypt\(\)](<#EncryptedInt32.Decrypt>) + - [func \(e \*EncryptedInt32\) Encrypt\(\)](<#EncryptedInt32.Encrypt>) + - [func \(e \*EncryptedInt32\) Increment\(\)](<#EncryptedInt32.Increment>) + - [func \(e \*EncryptedInt32\) SetValue\(value int32\)](<#EncryptedInt32.SetValue>) + - [func \(e \*EncryptedInt32\) Subtract\(amount int32\)](<#EncryptedInt32.Subtract>) + - [func \(e EncryptedInt32\) Value\(\) int32](<#EncryptedInt32.Value>) +- [type ModelDrawing](<#ModelDrawing>) +- [type ModelDrawingSlice](<#ModelDrawingSlice>) + - [func CreateDrawingsBasic\(host \*engine.Host, res load\_result.Result\) \(ModelDrawingSlice, error\)](<#CreateDrawingsBasic>) + - [func CreateDrawingsPBR\(host \*engine.Host, res load\_result.Result\) \(ModelDrawingSlice, error\)](<#CreateDrawingsPBR>) + - [func CreateDrawingsUnlit\(host \*engine.Host, res load\_result.Result\) \(ModelDrawingSlice, error\)](<#CreateDrawingsUnlit>) + - [func CreateDrawingsUnlitTransparent\(host \*engine.Host, res load\_result.Result\) \(ModelDrawingSlice, error\)](<#CreateDrawingsUnlitTransparent>) + - [func \(s ModelDrawingSlice\) AllDrawings\(\) \[\]rendering.Drawing](<#ModelDrawingSlice.AllDrawings>) + - [func \(s ModelDrawingSlice\) AllForNode\(node \*load\_result.Node\) \[\]ModelDrawing](<#ModelDrawingSlice.AllForNode>) +- [type SkinAnimation](<#SkinAnimation>) + - [func NewSkinAnimation\(anim kaiju\_mesh.KaijuMeshAnimation\) SkinAnimation](<#NewSkinAnimation>) + - [func \(a \*SkinAnimation\) CurrentFrame\(\) SkinAnimationFrame](<#SkinAnimation.CurrentFrame>) + - [func \(a \*SkinAnimation\) FindNextFrameForBone\(boneId int32, pathType kaiju\_mesh.AnimationPathType\) \(SkinAnimationFrame, bool\)](<#SkinAnimation.FindNextFrameForBone>) + - [func \(a \*SkinAnimation\) Interpolate\(from, to SkinAnimationFrame\) \[4\]float32](<#SkinAnimation.Interpolate>) + - [func \(a \*SkinAnimation\) IsValid\(\) bool](<#SkinAnimation.IsValid>) + - [func \(a \*SkinAnimation\) NextFrame\(\) SkinAnimationFrame](<#SkinAnimation.NextFrame>) + - [func \(a \*SkinAnimation\) Update\(deltaTime float64\)](<#SkinAnimation.Update>) +- [type SkinAnimationFrame](<#SkinAnimationFrame>) + + + +## func [CreateDrawingFromMeshUnlit]() + +```go +func CreateDrawingFromMeshUnlit(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error) +``` + + + + +## func [CreateDrawingFromMeshUnlitTransparent]() + +```go +func CreateDrawingFromMeshUnlitTransparent(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error) +``` + + + + +## func [RegisterDrawingSpecification]() + +```go +func RegisterDrawingSpecification(spec DrawingSpecification) +``` + + + + +## func [SpawnTemplate]() + +```go +func SpawnTemplate(id string, host *engine.Host, parent *engine.Entity) (*engine.Entity, error) +``` + +SpawnTemplate loads an entity template asset identified by \`id\` from the host's asset database, deserializes it into a \`stages.EntityDescription\` \(using JSON on desktop debug builds or the archive deserializer in other builds\), and creates a new entity configured from that description. If \`parent\` is non\-nil the new entity will be parented to it. The created entity is initialized via \`stages.SetupEntityFromDescription\` and returned, or an error is returned if the asset cannot be read or deserialized. + + +## func [SpawnTemplateWithTransform]() + +```go +func SpawnTemplateWithTransform(id string, host *engine.Host, parent *engine.Entity, pos, rot, scale matrix.Vec3) (*engine.Entity, error) +``` + +SpawnTemplateWithTransform loads an entity template asset identified by \`id\`, creates a new entity from that template \(optionally parented to \`parent\`\), then sets the entity's transform to the provided position, rotation and scale. It is a thin wrapper around \`SpawnTemplate\` that applies the transform before returning the created entity or any encountered error. + +Parameters: + +- id: template asset id to load from the host's asset database +- host: the engine host used to create the entity and read assets +- parent: optional parent entity to attach the new entity to +- pos, rot, scale: transform components applied to the new entity + +Returns the newly created entity or a non\-nil error if the template could not be read or deserialized. + + +## type [DrawingSpecCreateInfo]() + + + +```go +type DrawingSpecCreateInfo struct { + LoadedMesh load_result.Result + Meshes []*rendering.Mesh + Textures []*rendering.Texture + SkipMatSearch bool +} +``` + + +## type [DrawingSpecification]() + + + +```go +type DrawingSpecification struct { + Name string + RenderInfo []DrawingSpecificationRenderInfo +} +``` + + +### func [FindDrawingSpecification]() + +```go +func FindDrawingSpecification(name string) DrawingSpecification +``` + + + + +### func \(DrawingSpecification\) [CreateDrawings]() + +```go +func (s DrawingSpecification) CreateDrawings(host *engine.Host, info DrawingSpecCreateInfo) (ModelDrawingSlice, error) +``` + + + + +### func \(DrawingSpecification\) [IsValid]() + +```go +func (s DrawingSpecification) IsValid() bool +``` + + + + +## type [DrawingSpecificationRenderInfo]() + + + +```go +type DrawingSpecificationRenderInfo struct { + Material string + DataFactory func() rendering.DrawInstance +} +``` + + +## type [EncryptedInt32]() + + + +```go +type EncryptedInt32 struct { + RawValue int32 + // contains filtered or unexported fields +} +``` + + +### func \(\*EncryptedInt32\) [Add]() + +```go +func (e *EncryptedInt32) Add(amount int32) +``` + + + + +### func \(\*EncryptedInt32\) [Decrement]() + +```go +func (e *EncryptedInt32) Decrement() +``` + + + + +### func \(\*EncryptedInt32\) [Decrypt]() + +```go +func (e *EncryptedInt32) Decrypt() +``` + + + + +### func \(\*EncryptedInt32\) [Encrypt]() + +```go +func (e *EncryptedInt32) Encrypt() +``` + + + + +### func \(\*EncryptedInt32\) [Increment]() + +```go +func (e *EncryptedInt32) Increment() +``` + + + + +### func \(\*EncryptedInt32\) [SetValue]() + +```go +func (e *EncryptedInt32) SetValue(value int32) +``` + + + + +### func \(\*EncryptedInt32\) [Subtract]() + +```go +func (e *EncryptedInt32) Subtract(amount int32) +``` + + + + +### func \(EncryptedInt32\) [Value]() + +```go +func (e EncryptedInt32) Value() int32 +``` + + + + +## type [ModelDrawing]() + + + +```go +type ModelDrawing struct { + Node *load_result.Node + MeshName string + Drawing rendering.Drawing +} +``` + + +## type [ModelDrawingSlice]() + + + +```go +type ModelDrawingSlice []ModelDrawing +``` + + +### func [CreateDrawingsBasic]() + +```go +func CreateDrawingsBasic(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error) +``` + + + + +### func [CreateDrawingsPBR]() + +```go +func CreateDrawingsPBR(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error) +``` + + + + +### func [CreateDrawingsUnlit]() + +```go +func CreateDrawingsUnlit(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error) +``` + + + + +### func [CreateDrawingsUnlitTransparent]() + +```go +func CreateDrawingsUnlitTransparent(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error) +``` + + + + +### func \(ModelDrawingSlice\) [AllDrawings]() + +```go +func (s ModelDrawingSlice) AllDrawings() []rendering.Drawing +``` + + + + +### func \(ModelDrawingSlice\) [AllForNode]() + +```go +func (s ModelDrawingSlice) AllForNode(node *load_result.Node) []ModelDrawing +``` + + + + +## type [SkinAnimation]() + + + +```go +type SkinAnimation struct { + Animation kaiju_mesh.KaijuMeshAnimation + // contains filtered or unexported fields +} +``` + + +### func [NewSkinAnimation]() + +```go +func NewSkinAnimation(anim kaiju_mesh.KaijuMeshAnimation) SkinAnimation +``` + + + + +### func \(\*SkinAnimation\) [CurrentFrame]() + +```go +func (a *SkinAnimation) CurrentFrame() SkinAnimationFrame +``` + + + + +### func \(\*SkinAnimation\) [FindNextFrameForBone]() + +```go +func (a *SkinAnimation) FindNextFrameForBone(boneId int32, pathType kaiju_mesh.AnimationPathType) (SkinAnimationFrame, bool) +``` + + + + +### func \(\*SkinAnimation\) [Interpolate]() + +```go +func (a *SkinAnimation) Interpolate(from, to SkinAnimationFrame) [4]float32 +``` + + + + +### func \(\*SkinAnimation\) [IsValid]() + +```go +func (a *SkinAnimation) IsValid() bool +``` + + + + +### func \(\*SkinAnimation\) [NextFrame]() + +```go +func (a *SkinAnimation) NextFrame() SkinAnimationFrame +``` + + + + +### func \(\*SkinAnimation\) [Update]() + +```go +func (a *SkinAnimation) Update(deltaTime float64) +``` + + + + +## type [SkinAnimationFrame]() + + + +```go +type SkinAnimationFrame struct { + Key *kaiju_mesh.AnimKeyFrame + Bone *kaiju_mesh.AnimBone + AbsTime float64 +} +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 000000000..79f1c404a --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,26 @@ +# API Documentation + +Auto-generated documentation using gomarkdoc. + +## Core + +- [bootstrap](bootstrap.md) + +## Engine + +- [engine](engine.md) + +## Rendering + +- [rendering](rendering.md) + +## Other + +- [framework](framework.md) +- [klib](klib.md) +- [Root Package](root.md) +- [debug](debug.md) +- [editor](editor.md) +- [matrix](matrix.md) +- [plugins](plugins.md) + diff --git a/docs/api/klib.md b/docs/api/klib.md new file mode 100644 index 000000000..09e5c8543 --- /dev/null +++ b/docs/api/klib.md @@ -0,0 +1,1074 @@ + + +# klib + +```go +import "kaijuengine.com/klib" +``` + +## Index + +- [Constants](<#constants>) +- [Variables](<#variables>) +- [func AppendUnique\[T comparable\]\(slice \[\]T, values ...T\) \[\]T](<#AppendUnique>) +- [func BinaryRead\(r io.Reader, data any\) error](<#BinaryRead>) +- [func BinaryReadInt\(r io.Reader\) \(int32, error\)](<#BinaryReadInt>) +- [func BinaryReadLen\(r io.Reader\) \(int32, error\)](<#BinaryReadLen>) +- [func BinaryReadString\(r io.Reader\) \(string, error\)](<#BinaryReadString>) +- [func BinaryReadStringSlice\(r io.Reader\) \(\[\]string, error\)](<#BinaryReadStringSlice>) +- [func BinaryReadVar\[T any\]\(r io.Reader\) \(T, error\)](<#BinaryReadVar>) +- [func BinaryReadVarSlice\[T any\]\(r io.Reader\) \(\[\]T, error\)](<#BinaryReadVarSlice>) +- [func BinaryWrite\(w io.Writer, data any\) error](<#BinaryWrite>) +- [func BinaryWriteInt\(w io.Writer, value int\) error](<#BinaryWriteInt>) +- [func BinaryWriteMap\[K comparable, V any\]\(w io.Writer, data map\[K\]V\) error](<#BinaryWriteMap>) +- [func BinaryWriteMapLen\[K comparable, V any\]\(w io.Writer, data map\[K\]V\) error](<#BinaryWriteMapLen>) +- [func BinaryWriteSlice\[T any\]\(w io.Writer, data \[\]T\) error](<#BinaryWriteSlice>) +- [func BinaryWriteSliceLen\[T any\]\(w io.Writer, data \[\]T\) error](<#BinaryWriteSliceLen>) +- [func BinaryWriteString\(w io.Writer, str string\) error](<#BinaryWriteString>) +- [func BinaryWriteStringSlice\(w io.Writer, data \[\]string\) error](<#BinaryWriteStringSlice>) +- [func ByteArrayToString\(byteArray \[\]byte\) string](<#ByteArrayToString>) +- [func ByteCountToString\(bytes uint64\) string](<#ByteCountToString>) +- [func ByteSliceToFloat32Slice\(data \[\]byte\) \[\]float32](<#ByteSliceToFloat32Slice>) +- [func ByteSliceToUInt16Slice\(data \[\]byte\) \[\]uint16](<#ByteSliceToUInt16Slice>) +- [func CapitalizeFirst\(s string\) string](<#CapitalizeFirst>) +- [func Check\(outError \*error, newError error\) bool](<#Check>) +- [func CheckAll\(res bool\)](<#CheckAll>) +- [func Clamp\[T cmp.Ordered\]\(current, minimum, maximum T\) T](<#Clamp>) +- [func ClampAbs\[T Signed\]\(value, minimum T\) T](<#ClampAbs>) +- [func CleanNumString\(v string\) string](<#CleanNumString>) +- [func Contains\[T comparable\]\(slice \[\]T, item T\) bool](<#Contains>) +- [func ConvertByteSliceType\[T any\]\(slice \[\]byte\) \[\]T](<#ConvertByteSliceType>) +- [func Decrypt\(encryptedData \[\]byte, key \[\]byte\) \(\[\]byte, error\)](<#Decrypt>) +- [func DelayCall\(d time.Duration, f func\(\), ctx context.Context\)](<#DelayCall>) +- [func Encrypt\(rawData \[\]byte, key \[\]byte\) \(\[\]byte, error\)](<#Encrypt>) +- [func ErrorIs\[T error\]\(err error\) bool](<#ErrorIs>) +- [func ExeExtension\(\) string](<#ExeExtension>) +- [func ExtractFromSlice\[T, S any\]\(s \[\]S, expression func\(idx int\) T\) \[\]T](<#ExtractFromSlice>) +- [func FindFirstZeroInByteArray\(arr \[\]byte\) int](<#FindFirstZeroInByteArray>) +- [func FloatEquals\[T Float\]\(a, b T\) bool](<#FloatEquals>) +- [func FormatFloatToNDecimals\[T float32 | float64\]\(f T, decimals int\) string](<#FormatFloatToNDecimals>) +- [func InterfaceUnderlyingPointer\[T any\]\(s T\) unsafe.Pointer](<#InterfaceUnderlyingPointer>) +- [func IsMobile\(\) bool](<#IsMobile>) +- [func JsonDecode\[T any\]\(decoder \*json.Decoder, container \*T\) error](<#JsonDecode>) +- [func MM2PX\[T Number\]\(pixels, mm, targetMM T\) T](<#MM2PX>) +- [func MapJoin\[T comparable, U any\]\(a, b map\[T\]U\) map\[T\]U](<#MapJoin>) +- [func MapKeys\[T comparable, U any\]\(m map\[T\]U\) \[\]T](<#MapKeys>) +- [func MapKeysSorted\[T cmp.Ordered, U any\]\(m map\[T\]U\) \[\]T](<#MapKeysSorted>) +- [func MapValues\[T comparable, U any\]\(m map\[T\]U\) \[\]U](<#MapValues>) +- [func Memcpy\(dst unsafe.Pointer, src unsafe.Pointer, size uint64\)](<#Memcpy>) +- [func Must\(err error\)](<#Must>) +- [func MustReturn\[T any\]\(ret T, err error\) T](<#MustReturn>) +- [func MustReturn2\[T, U any\]\(ret1 T, ret2 U, err error\) \(T, U\)](<#MustReturn2>) +- [func NotYetImplemented\(issueId int\)](<#NotYetImplemented>) +- [func OpenWebsite\(url string\)](<#OpenWebsite>) +- [func PrintStack\(\)](<#PrintStack>) +- [func ReadRootFile\(fs \*os.Root, filePath string\) \(\[\]byte, error\)](<#ReadRootFile>) +- [func RemakeSlice\[S any\]\(s \[\]S\) \[\]S](<#RemakeSlice>) +- [func RemoveNils\[S any\]\(slice \[\]\*S\) \[\]\*S](<#RemoveNils>) +- [func RemoveUnordered\[T any\]\(slice \[\]T, idx int\) \[\]T](<#RemoveUnordered>) +- [func ReplaceStringRecursive\(s string, old string, new string\) string](<#ReplaceStringRecursive>) +- [func Should\(err error\) bool](<#Should>) +- [func ShouldReturn\[T any\]\(ret T, err error\) T](<#ShouldReturn>) +- [func Shuffle\[T any\]\(slice \[\]T, rng \*rand.Rand\)](<#Shuffle>) +- [func ShuffleRandom\[T any\]\(slice \[\]T\)](<#ShuffleRandom>) +- [func SizedStructToByteArray\(s unsafe.Pointer, size int\) \[\]byte](<#SizedStructToByteArray>) +- [func SliceMove\[S any\]\(s \[\]S, from, to int\)](<#SliceMove>) +- [func SliceSetCap\[S any\]\(s \[\]S, amount int\) \[\]S](<#SliceSetCap>) +- [func SliceSetLen\[S any\]\(s \[\]S, newLen int\) \[\]S](<#SliceSetLen>) +- [func SlicesAreTheSame\[S comparable\]\(a \[\]S, b \[\]S\) bool](<#SlicesAreTheSame>) +- [func SlicesRemoveElement\[S comparable\]\(s \[\]S, e S\) \[\]S](<#SlicesRemoveElement>) +- [func SortDirEntries\(entries \[\]os.DirEntry\) \[\]os.DirEntry](<#SortDirEntries>) +- [func StringValueCompare\(a, b string\) int](<#StringValueCompare>) +- [func StringsContainsCaseInsensitive\(s \[\]string, value string\) bool](<#StringsContainsCaseInsensitive>) +- [func StripFloatStringZeros\(fString string\) string](<#StripFloatStringZeros>) +- [func StructSliceToByteArray\[T any\]\(s \[\]T\) \[\]byte](<#StructSliceToByteArray>) +- [func StructToByteArray\[T any\]\(s T\) \[\]byte](<#StructToByteArray>) +- [func TickerWait\(interval, limit time.Duration, condition func\(\) bool\) bool](<#TickerWait>) +- [func ToSnakeCase\(str string\) string](<#ToSnakeCase>) +- [func Trace\(message string\)](<#Trace>) +- [func TraceString\(message string\) string](<#TraceString>) +- [func TraceStrings\(message string, skip int\) \[\]string](<#TraceStrings>) +- [func WipeSlice\[S any\]\(s \[\]S\) \[\]S](<#WipeSlice>) +- [func WriteRootFile\(fs \*os.Root, filePath string, data \[\]byte\) error](<#WriteRootFile>) +- [type Complex](<#Complex>) +- [type ErrorList](<#ErrorList>) + - [func NewErrorList\(\) ErrorList](<#NewErrorList>) + - [func \(e \*ErrorList\) AddAny\(err error\)](<#ErrorList.AddAny>) + - [func \(e \*ErrorList\) Any\(\) bool](<#ErrorList.Any>) + - [func \(e \*ErrorList\) First\(\) error](<#ErrorList.First>) +- [type Float](<#Float>) +- [type Integer](<#Integer>) +- [type Number](<#Number>) +- [type Ordered](<#Ordered>) +- [type Serializable](<#Serializable>) +- [type Set](<#Set>) + - [func NewSet\[T comparable\]\(\) Set\[T\]](<#NewSet>) + - [func \(s Set\[T\]\) Add\(val T\)](<#Set[T].Add>) + - [func \(s Set\[T\]\) Contains\(val T\) bool](<#Set[T].Contains>) + - [func \(s Set\[T\]\) MarshalJSON\(\) \(\[\]byte, error\)](<#Set[T].MarshalJSON>) + - [func \(s Set\[T\]\) Remove\(val T\)](<#Set[T].Remove>) + - [func \(s Set\[T\]\) ToSlice\(\) \[\]T](<#Set[T].ToSlice>) + - [func \(s \*Set\[T\]\) UnmarshalJSON\(data \[\]byte\) error](<#Set[T].UnmarshalJSON>) +- [type Signed](<#Signed>) +- [type SignedInteger](<#SignedInteger>) +- [type Unsigned](<#Unsigned>) + + +## Constants + + + +```go +const ( + ISO8601 = "2006-01-02T15:04:05Z" +) +``` + +## Variables + + + +```go +var OpenWebsiteAndroidFunc func(url string) +``` + + +## func [AppendUnique]() + +```go +func AppendUnique[T comparable](slice []T, values ...T) []T +``` + + + + +## func [BinaryRead]() + +```go +func BinaryRead(r io.Reader, data any) error +``` + + + + +## func [BinaryReadInt]() + +```go +func BinaryReadInt(r io.Reader) (int32, error) +``` + + + + +## func [BinaryReadLen]() + +```go +func BinaryReadLen(r io.Reader) (int32, error) +``` + + + + +## func [BinaryReadString]() + +```go +func BinaryReadString(r io.Reader) (string, error) +``` + + + + +## func [BinaryReadStringSlice]() + +```go +func BinaryReadStringSlice(r io.Reader) ([]string, error) +``` + + + + +## func [BinaryReadVar]() + +```go +func BinaryReadVar[T any](r io.Reader) (T, error) +``` + + + + +## func [BinaryReadVarSlice]() + +```go +func BinaryReadVarSlice[T any](r io.Reader) ([]T, error) +``` + + + + +## func [BinaryWrite]() + +```go +func BinaryWrite(w io.Writer, data any) error +``` + + + + +## func [BinaryWriteInt]() + +```go +func BinaryWriteInt(w io.Writer, value int) error +``` + + + + +## func [BinaryWriteMap]() + +```go +func BinaryWriteMap[K comparable, V any](w io.Writer, data map[K]V) error +``` + + + + +## func [BinaryWriteMapLen]() + +```go +func BinaryWriteMapLen[K comparable, V any](w io.Writer, data map[K]V) error +``` + + + + +## func [BinaryWriteSlice]() + +```go +func BinaryWriteSlice[T any](w io.Writer, data []T) error +``` + + + + +## func [BinaryWriteSliceLen]() + +```go +func BinaryWriteSliceLen[T any](w io.Writer, data []T) error +``` + + + + +## func [BinaryWriteString]() + +```go +func BinaryWriteString(w io.Writer, str string) error +``` + + + + +## func [BinaryWriteStringSlice]() + +```go +func BinaryWriteStringSlice(w io.Writer, data []string) error +``` + + + + +## func [ByteArrayToString]() + +```go +func ByteArrayToString(byteArray []byte) string +``` + + + + +## func [ByteCountToString]() + +```go +func ByteCountToString(bytes uint64) string +``` + + + + +## func [ByteSliceToFloat32Slice]() + +```go +func ByteSliceToFloat32Slice(data []byte) []float32 +``` + + + + +## func [ByteSliceToUInt16Slice]() + +```go +func ByteSliceToUInt16Slice(data []byte) []uint16 +``` + + + + +## func [CapitalizeFirst]() + +```go +func CapitalizeFirst(s string) string +``` + + + + +## func [Check]() + +```go +func Check(outError *error, newError error) bool +``` + + + + +## func [CheckAll]() + +```go +func CheckAll(res bool) +``` + + + + +## func [Clamp]() + +```go +func Clamp[T cmp.Ordered](current, minimum, maximum T) T +``` + + + + +## func [ClampAbs]() + +```go +func ClampAbs[T Signed](value, minimum T) T +``` + + + + +## func [CleanNumString]() + +```go +func CleanNumString(v string) string +``` + + + + +## func [Contains]() + +```go +func Contains[T comparable](slice []T, item T) bool +``` + + + + +## func [ConvertByteSliceType]() + +```go +func ConvertByteSliceType[T any](slice []byte) []T +``` + + + + +## func [Decrypt]() + +```go +func Decrypt(encryptedData []byte, key []byte) ([]byte, error) +``` + + + + +## func [DelayCall]() + +```go +func DelayCall(d time.Duration, f func(), ctx context.Context) +``` + + + + +## func [Encrypt]() + +```go +func Encrypt(rawData []byte, key []byte) ([]byte, error) +``` + + + + +## func [ErrorIs]() + +```go +func ErrorIs[T error](err error) bool +``` + + + + +## func [ExeExtension]() + +```go +func ExeExtension() string +``` + + + + +## func [ExtractFromSlice]() + +```go +func ExtractFromSlice[T, S any](s []S, expression func(idx int) T) []T +``` + + + + +## func [FindFirstZeroInByteArray]() + +```go +func FindFirstZeroInByteArray(arr []byte) int +``` + + + + +## func [FloatEquals]() + +```go +func FloatEquals[T Float](a, b T) bool +``` + + + + +## func [FormatFloatToNDecimals]() + +```go +func FormatFloatToNDecimals[T float32 | float64](f T, decimals int) string +``` + + + + +## func [InterfaceUnderlyingPointer]() + +```go +func InterfaceUnderlyingPointer[T any](s T) unsafe.Pointer +``` + + + + +## func [IsMobile]() + +```go +func IsMobile() bool +``` + + + + +## func [JsonDecode]() + +```go +func JsonDecode[T any](decoder *json.Decoder, container *T) error +``` + + + + +## func [MM2PX]() + +```go +func MM2PX[T Number](pixels, mm, targetMM T) T +``` + + + + +## func [MapJoin]() + +```go +func MapJoin[T comparable, U any](a, b map[T]U) map[T]U +``` + + + + +## func [MapKeys]() + +```go +func MapKeys[T comparable, U any](m map[T]U) []T +``` + + + + +## func [MapKeysSorted]() + +```go +func MapKeysSorted[T cmp.Ordered, U any](m map[T]U) []T +``` + + + + +## func [MapValues]() + +```go +func MapValues[T comparable, U any](m map[T]U) []U +``` + + + + +## func [Memcpy]() + +```go +func Memcpy(dst unsafe.Pointer, src unsafe.Pointer, size uint64) +``` + + + + +## func [Must]() + +```go +func Must(err error) +``` + + + + +## func [MustReturn]() + +```go +func MustReturn[T any](ret T, err error) T +``` + + + + +## func [MustReturn2]() + +```go +func MustReturn2[T, U any](ret1 T, ret2 U, err error) (T, U) +``` + + + + +## func [NotYetImplemented]() + +```go +func NotYetImplemented(issueId int) +``` + + + + +## func [OpenWebsite]() + +```go +func OpenWebsite(url string) +``` + + + + +## func [PrintStack]() + +```go +func PrintStack() +``` + + + + +## func [ReadRootFile]() + +```go +func ReadRootFile(fs *os.Root, filePath string) ([]byte, error) +``` + + + + +## func [RemakeSlice]() + +```go +func RemakeSlice[S any](s []S) []S +``` + + + + +## func [RemoveNils]() + +```go +func RemoveNils[S any](slice []*S) []*S +``` + + + + +## func [RemoveUnordered]() + +```go +func RemoveUnordered[T any](slice []T, idx int) []T +``` + + + + +## func [ReplaceStringRecursive]() + +```go +func ReplaceStringRecursive(s string, old string, new string) string +``` + + + + +## func [Should]() + +```go +func Should(err error) bool +``` + + + + +## func [ShouldReturn]() + +```go +func ShouldReturn[T any](ret T, err error) T +``` + + + + +## func [Shuffle]() + +```go +func Shuffle[T any](slice []T, rng *rand.Rand) +``` + + + + +## func [ShuffleRandom]() + +```go +func ShuffleRandom[T any](slice []T) +``` + + + + +## func [SizedStructToByteArray]() + +```go +func SizedStructToByteArray(s unsafe.Pointer, size int) []byte +``` + + + + +## func [SliceMove]() + +```go +func SliceMove[S any](s []S, from, to int) +``` + + + + +## func [SliceSetCap]() + +```go +func SliceSetCap[S any](s []S, amount int) []S +``` + + + + +## func [SliceSetLen]() + +```go +func SliceSetLen[S any](s []S, newLen int) []S +``` + + + + +## func [SlicesAreTheSame]() + +```go +func SlicesAreTheSame[S comparable](a []S, b []S) bool +``` + + + + +## func [SlicesRemoveElement]() + +```go +func SlicesRemoveElement[S comparable](s []S, e S) []S +``` + + + + +## func [SortDirEntries]() + +```go +func SortDirEntries(entries []os.DirEntry) []os.DirEntry +``` + + + + +## func [StringValueCompare]() + +```go +func StringValueCompare(a, b string) int +``` + +StringValueCompare compares two strings as integers or floats if possible, otherwise compares as strings + + +## func [StringsContainsCaseInsensitive]() + +```go +func StringsContainsCaseInsensitive(s []string, value string) bool +``` + + + + +## func [StripFloatStringZeros]() + +```go +func StripFloatStringZeros(fString string) string +``` + + + + +## func [StructSliceToByteArray]() + +```go +func StructSliceToByteArray[T any](s []T) []byte +``` + + + + +## func [StructToByteArray]() + +```go +func StructToByteArray[T any](s T) []byte +``` + + + + +## func [TickerWait]() + +```go +func TickerWait(interval, limit time.Duration, condition func() bool) bool +``` + + + + +## func [ToSnakeCase]() + +```go +func ToSnakeCase(str string) string +``` + + + + +## func [Trace]() + +```go +func Trace(message string) +``` + + + + +## func [TraceString]() + +```go +func TraceString(message string) string +``` + + + + +## func [TraceStrings]() + +```go +func TraceStrings(message string, skip int) []string +``` + + + + +## func [WipeSlice]() + +```go +func WipeSlice[S any](s []S) []S +``` + +WipeSlice will clear out the slice before returning \[:0\]. The purpose for this is that if there are pointers held within the slice, they hold their references for as long as they are within the capacity of the slice. Due to this, pointers are not collected by the GC unless actually wiped out from the slice. + + +## func [WriteRootFile]() + +```go +func WriteRootFile(fs *os.Root, filePath string, data []byte) error +``` + + + + +## type [Complex]() + + + +```go +type Complex interface { + // contains filtered or unexported methods +} +``` + + +## type [ErrorList]() + + + +```go +type ErrorList struct { + Errors []error +} +``` + + +### func [NewErrorList]() + +```go +func NewErrorList() ErrorList +``` + + + + +### func \(\*ErrorList\) [AddAny]() + +```go +func (e *ErrorList) AddAny(err error) +``` + + + + +### func \(\*ErrorList\) [Any]() + +```go +func (e *ErrorList) Any() bool +``` + + + + +### func \(\*ErrorList\) [First]() + +```go +func (e *ErrorList) First() error +``` + + + + +## type [Float]() + + + +```go +type Float interface { + // contains filtered or unexported methods +} +``` + + +## type [Integer]() + + + +```go +type Integer interface { + // contains filtered or unexported methods +} +``` + + +## type [Number]() + + + +```go +type Number interface { + // contains filtered or unexported methods +} +``` + + +## type [Ordered]() + + + +```go +type Ordered interface { + // contains filtered or unexported methods +} +``` + + +## type [Serializable]() + + + +```go +type Serializable interface { + Serialize(stream io.Writer) + Deserialize(stream io.Reader) +} +``` + + +## type [Set]() + + + +```go +type Set[T comparable] map[T]struct{} +``` + + +### func [NewSet]() + +```go +func NewSet[T comparable]() Set[T] +``` + + + + +### func \(Set\[T\]\) [Add]() + +```go +func (s Set[T]) Add(val T) +``` + + + + +### func \(Set\[T\]\) [Contains]() + +```go +func (s Set[T]) Contains(val T) bool +``` + + + + +### func \(Set\[T\]\) [MarshalJSON]() + +```go +func (s Set[T]) MarshalJSON() ([]byte, error) +``` + + + + +### func \(Set\[T\]\) [Remove]() + +```go +func (s Set[T]) Remove(val T) +``` + + + + +### func \(Set\[T\]\) [ToSlice]() + +```go +func (s Set[T]) ToSlice() []T +``` + + + + +### func \(\*Set\[T\]\) [UnmarshalJSON]() + +```go +func (s *Set[T]) UnmarshalJSON(data []byte) error +``` + +UnmarshalJSON decodes a JSON array into the set + + +## type [Signed]() + + + +```go +type Signed interface { + // contains filtered or unexported methods +} +``` + + +## type [SignedInteger]() + + + +```go +type SignedInteger interface { + // contains filtered or unexported methods +} +``` + + +## type [Unsigned]() + + + +```go +type Unsigned interface { + // contains filtered or unexported methods +} +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/matrix.md b/docs/api/matrix.md new file mode 100644 index 000000000..9d85a548b --- /dev/null +++ b/docs/api/matrix.md @@ -0,0 +1,6314 @@ + + +# matrix + +```go +import "kaijuengine.com/matrix" +``` + +## Index + +- [Constants](<#constants>) +- [func AbsInt\(a int\) int](<#AbsInt>) +- [func Approx\(a, b Float\) bool](<#Approx>) +- [func ApproxTo\(a, b, tolerance Float\) bool](<#ApproxTo>) +- [func IsInf\(x Float, sign int\) bool](<#IsInf>) +- [func IsNaN\(x Float\) bool](<#IsNaN>) +- [func Mat4Approx\(a, b Mat4\) bool](<#Mat4Approx>) +- [func Mat4ApproxTo\(a, b Mat4, delta Float\) bool](<#Mat4ApproxTo>) +- [func QuaternionApprox\(a, b Quaternion\) bool](<#QuaternionApprox>) +- [func Vec2Approx\(a, b Vec2\) bool](<#Vec2Approx>) +- [func Vec2ApproxTo\(a, b Vec2, delta Float\) bool](<#Vec2ApproxTo>) +- [func Vec2Nearly\(a, b Vec2\) bool](<#Vec2Nearly>) +- [func Vec2Roughly\(a, b Vec2\) bool](<#Vec2Roughly>) +- [func Vec3Approx\(a, b Vec3\) bool](<#Vec3Approx>) +- [func Vec3ApproxTo\(a, b Vec3, delta Float\) bool](<#Vec3ApproxTo>) +- [func Vec4Approx\(a, b Vec4\) bool](<#Vec4Approx>) +- [func Vec4ApproxTo\(a, b Vec4, delta Float\) bool](<#Vec4ApproxTo>) +- [func Vec4Roughly\(a, b Vec4\) bool](<#Vec4Roughly>) +- [type Color](<#Color>) + - [func ColorAqua\(\) Color](<#ColorAqua>) + - [func ColorAquamarine\(\) Color](<#ColorAquamarine>) + - [func ColorAzure\(\) Color](<#ColorAzure>) + - [func ColorBeige\(\) Color](<#ColorBeige>) + - [func ColorBisque\(\) Color](<#ColorBisque>) + - [func ColorBlack\(\) Color](<#ColorBlack>) + - [func ColorBlanchedAlmond\(\) Color](<#ColorBlanchedAlmond>) + - [func ColorBlue\(\) Color](<#ColorBlue>) + - [func ColorBlueViolet\(\) Color](<#ColorBlueViolet>) + - [func ColorBrown\(\) Color](<#ColorBrown>) + - [func ColorBurlyWood\(\) Color](<#ColorBurlyWood>) + - [func ColorCadetBlue\(\) Color](<#ColorCadetBlue>) + - [func ColorChartreuse\(\) Color](<#ColorChartreuse>) + - [func ColorChocolate\(\) Color](<#ColorChocolate>) + - [func ColorClear\(\) Color](<#ColorClear>) + - [func ColorCoral\(\) Color](<#ColorCoral>) + - [func ColorCornSilk\(\) Color](<#ColorCornSilk>) + - [func ColorCornflowerBlue\(\) Color](<#ColorCornflowerBlue>) + - [func ColorCrimson\(\) Color](<#ColorCrimson>) + - [func ColorCyan\(\) Color](<#ColorCyan>) + - [func ColorDarkBG\(\) Color](<#ColorDarkBG>) + - [func ColorDarkBlue\(\) Color](<#ColorDarkBlue>) + - [func ColorDarkCyan\(\) Color](<#ColorDarkCyan>) + - [func ColorDarkGoldenrod\(\) Color](<#ColorDarkGoldenrod>) + - [func ColorDarkGray\(\) Color](<#ColorDarkGray>) + - [func ColorDarkGreen\(\) Color](<#ColorDarkGreen>) + - [func ColorDarkKhaki\(\) Color](<#ColorDarkKhaki>) + - [func ColorDarkMagenta\(\) Color](<#ColorDarkMagenta>) + - [func ColorDarkModeGrayBG\(\) Color](<#ColorDarkModeGrayBG>) + - [func ColorDarkModeGrayFG\(\) Color](<#ColorDarkModeGrayFG>) + - [func ColorDarkOliveGreen\(\) Color](<#ColorDarkOliveGreen>) + - [func ColorDarkOrange\(\) Color](<#ColorDarkOrange>) + - [func ColorDarkOrchid\(\) Color](<#ColorDarkOrchid>) + - [func ColorDarkRed\(\) Color](<#ColorDarkRed>) + - [func ColorDarkSalmon\(\) Color](<#ColorDarkSalmon>) + - [func ColorDarkSeaGreen\(\) Color](<#ColorDarkSeaGreen>) + - [func ColorDarkSlateBlue\(\) Color](<#ColorDarkSlateBlue>) + - [func ColorDarkSlateGray\(\) Color](<#ColorDarkSlateGray>) + - [func ColorDarkTurquoise\(\) Color](<#ColorDarkTurquoise>) + - [func ColorDarkViolet\(\) Color](<#ColorDarkViolet>) + - [func ColorDeepPink\(\) Color](<#ColorDeepPink>) + - [func ColorDeepSkyBlue\(\) Color](<#ColorDeepSkyBlue>) + - [func ColorDimGray\(\) Color](<#ColorDimGray>) + - [func ColorDodgerBlue\(\) Color](<#ColorDodgerBlue>) + - [func ColorFirebrick\(\) Color](<#ColorFirebrick>) + - [func ColorFloralWhite\(\) Color](<#ColorFloralWhite>) + - [func ColorForestGreen\(\) Color](<#ColorForestGreen>) + - [func ColorFromColor8\(c Color8\) Color](<#ColorFromColor8>) + - [func ColorFromHexString\(str string\) \(Color, error\)](<#ColorFromHexString>) + - [func ColorFromVec3\(v Vec3\) Color](<#ColorFromVec3>) + - [func ColorFromVec4\(v Vec4\) Color](<#ColorFromVec4>) + - [func ColorFuchsia\(\) Color](<#ColorFuchsia>) + - [func ColorGainsboro\(\) Color](<#ColorGainsboro>) + - [func ColorGhostWhite\(\) Color](<#ColorGhostWhite>) + - [func ColorGold\(\) Color](<#ColorGold>) + - [func ColorGoldenrod\(\) Color](<#ColorGoldenrod>) + - [func ColorGray\(\) Color](<#ColorGray>) + - [func ColorGreen\(\) Color](<#ColorGreen>) + - [func ColorGreenYellow\(\) Color](<#ColorGreenYellow>) + - [func ColorHoneydew\(\) Color](<#ColorHoneydew>) + - [func ColorHotPink\(\) Color](<#ColorHotPink>) + - [func ColorIndianRed\(\) Color](<#ColorIndianRed>) + - [func ColorIndigo\(\) Color](<#ColorIndigo>) + - [func ColorIvory\(\) Color](<#ColorIvory>) + - [func ColorKhaki\(\) Color](<#ColorKhaki>) + - [func ColorLavender\(\) Color](<#ColorLavender>) + - [func ColorLavenderBlush\(\) Color](<#ColorLavenderBlush>) + - [func ColorLawnGreen\(\) Color](<#ColorLawnGreen>) + - [func ColorLemonChiffon\(\) Color](<#ColorLemonChiffon>) + - [func ColorLightBlue\(\) Color](<#ColorLightBlue>) + - [func ColorLightCoral\(\) Color](<#ColorLightCoral>) + - [func ColorLightCyan\(\) Color](<#ColorLightCyan>) + - [func ColorLightGoldenrodYellow\(\) Color](<#ColorLightGoldenrodYellow>) + - [func ColorLightGreen\(\) Color](<#ColorLightGreen>) + - [func ColorLightGrey\(\) Color](<#ColorLightGrey>) + - [func ColorLightPink\(\) Color](<#ColorLightPink>) + - [func ColorLightSalmon\(\) Color](<#ColorLightSalmon>) + - [func ColorLightSeaGreen\(\) Color](<#ColorLightSeaGreen>) + - [func ColorLightSkyBlue\(\) Color](<#ColorLightSkyBlue>) + - [func ColorLightSlateGray\(\) Color](<#ColorLightSlateGray>) + - [func ColorLightSteelBlue\(\) Color](<#ColorLightSteelBlue>) + - [func ColorLightYellow\(\) Color](<#ColorLightYellow>) + - [func ColorLime\(\) Color](<#ColorLime>) + - [func ColorLimeGreen\(\) Color](<#ColorLimeGreen>) + - [func ColorLinen\(\) Color](<#ColorLinen>) + - [func ColorMagenta\(\) Color](<#ColorMagenta>) + - [func ColorMaroon\(\) Color](<#ColorMaroon>) + - [func ColorMediumAquamarine\(\) Color](<#ColorMediumAquamarine>) + - [func ColorMediumBlue\(\) Color](<#ColorMediumBlue>) + - [func ColorMediumOrchid\(\) Color](<#ColorMediumOrchid>) + - [func ColorMediumPurple\(\) Color](<#ColorMediumPurple>) + - [func ColorMediumSeaGreen\(\) Color](<#ColorMediumSeaGreen>) + - [func ColorMediumSlateBlue\(\) Color](<#ColorMediumSlateBlue>) + - [func ColorMediumSpringGreen\(\) Color](<#ColorMediumSpringGreen>) + - [func ColorMediumTurquoise\(\) Color](<#ColorMediumTurquoise>) + - [func ColorMediumVioletRed\(\) Color](<#ColorMediumVioletRed>) + - [func ColorMidnightBlue\(\) Color](<#ColorMidnightBlue>) + - [func ColorMintCream\(\) Color](<#ColorMintCream>) + - [func ColorMistyRose\(\) Color](<#ColorMistyRose>) + - [func ColorMix\(lhs, rhs Color, amount Float\) Color](<#ColorMix>) + - [func ColorMoccasin\(\) Color](<#ColorMoccasin>) + - [func ColorNavajoWhite\(\) Color](<#ColorNavajoWhite>) + - [func ColorNavy\(\) Color](<#ColorNavy>) + - [func ColorOldLace\(\) Color](<#ColorOldLace>) + - [func ColorOlive\(\) Color](<#ColorOlive>) + - [func ColorOliveDrab\(\) Color](<#ColorOliveDrab>) + - [func ColorOrange\(\) Color](<#ColorOrange>) + - [func ColorOrangeRed\(\) Color](<#ColorOrangeRed>) + - [func ColorOrchid\(\) Color](<#ColorOrchid>) + - [func ColorPaleGoldenrod\(\) Color](<#ColorPaleGoldenrod>) + - [func ColorPaleGreen\(\) Color](<#ColorPaleGreen>) + - [func ColorPaleTurquoise\(\) Color](<#ColorPaleTurquoise>) + - [func ColorPaleVioletred\(\) Color](<#ColorPaleVioletred>) + - [func ColorPapayaWhip\(\) Color](<#ColorPapayaWhip>) + - [func ColorPeachPuff\(\) Color](<#ColorPeachPuff>) + - [func ColorPeru\(\) Color](<#ColorPeru>) + - [func ColorPink\(\) Color](<#ColorPink>) + - [func ColorPlum\(\) Color](<#ColorPlum>) + - [func ColorPowderBlue\(\) Color](<#ColorPowderBlue>) + - [func ColorPurple\(\) Color](<#ColorPurple>) + - [func ColorRGBAInt\(r, g, b, a int\) Color](<#ColorRGBAInt>) + - [func ColorRGBInt\(r, g, b int\) Color](<#ColorRGBInt>) + - [func ColorRed\(\) Color](<#ColorRed>) + - [func ColorRosyBrown\(\) Color](<#ColorRosyBrown>) + - [func ColorRoyalBlue\(\) Color](<#ColorRoyalBlue>) + - [func ColorSaddleBrown\(\) Color](<#ColorSaddleBrown>) + - [func ColorSalmon\(\) Color](<#ColorSalmon>) + - [func ColorSandyBrown\(\) Color](<#ColorSandyBrown>) + - [func ColorSeaGreen\(\) Color](<#ColorSeaGreen>) + - [func ColorSeashell\(\) Color](<#ColorSeashell>) + - [func ColorSienna\(\) Color](<#ColorSienna>) + - [func ColorSilver\(\) Color](<#ColorSilver>) + - [func ColorSky\(\) Color](<#ColorSky>) + - [func ColorSkyBlue\(\) Color](<#ColorSkyBlue>) + - [func ColorSlateBlue\(\) Color](<#ColorSlateBlue>) + - [func ColorSlateGray\(\) Color](<#ColorSlateGray>) + - [func ColorSlateGrey\(\) Color](<#ColorSlateGrey>) + - [func ColorSnow\(\) Color](<#ColorSnow>) + - [func ColorSpringGreen\(\) Color](<#ColorSpringGreen>) + - [func ColorSteelBlue\(\) Color](<#ColorSteelBlue>) + - [func ColorTan\(\) Color](<#ColorTan>) + - [func ColorTeal\(\) Color](<#ColorTeal>) + - [func ColorThistle\(\) Color](<#ColorThistle>) + - [func ColorTomato\(\) Color](<#ColorTomato>) + - [func ColorTransparent\(\) Color](<#ColorTransparent>) + - [func ColorTurquoise\(\) Color](<#ColorTurquoise>) + - [func ColorViolet\(\) Color](<#ColorViolet>) + - [func ColorWheat\(\) Color](<#ColorWheat>) + - [func ColorWhite\(\) Color](<#ColorWhite>) + - [func ColorWhiteSmoke\(\) Color](<#ColorWhiteSmoke>) + - [func ColorYellow\(\) Color](<#ColorYellow>) + - [func ColorYellowGreen\(\) Color](<#ColorYellowGreen>) + - [func ColorZero\(\) Color](<#ColorZero>) + - [func NewColor\(r, g, b, a Float\) Color](<#NewColor>) + - [func \(c Color\) A\(\) Float](<#Color.A>) + - [func \(c Color\) AsColor8\(\) Color8](<#Color.AsColor8>) + - [func \(c Color\) B\(\) Float](<#Color.B>) + - [func \(lhs Color\) Equals\(rhs Color\) bool](<#Color.Equals>) + - [func \(c Color\) G\(\) Float](<#Color.G>) + - [func \(c Color\) Hex\(\) string](<#Color.Hex>) + - [func \(c \*Color\) Inverted\(\) Color](<#Color.Inverted>) + - [func \(c Color\) IsZero\(\) bool](<#Color.IsZero>) + - [func \(c \*Color\) MultiplyAssign\(other Color\)](<#Color.MultiplyAssign>) + - [func \(c \*Color\) PA\(\) \*Float](<#Color.PA>) + - [func \(c \*Color\) PB\(\) \*Float](<#Color.PB>) + - [func \(c \*Color\) PG\(\) \*Float](<#Color.PG>) + - [func \(c \*Color\) PR\(\) \*Float](<#Color.PR>) + - [func \(c Color\) R\(\) Float](<#Color.R>) + - [func \(c Color\) RGBA\(\) \(Float, Float, Float, Float\)](<#Color.RGBA>) + - [func \(c Color\) ScaleWithoutAlpha\(scale Float\) Color](<#Color.ScaleWithoutAlpha>) + - [func \(c \*Color\) SetA\(a Float\)](<#Color.SetA>) + - [func \(c \*Color\) SetB\(b Float\)](<#Color.SetB>) + - [func \(c \*Color\) SetG\(g Float\)](<#Color.SetG>) + - [func \(c \*Color\) SetR\(r Float\)](<#Color.SetR>) +- [type Color8](<#Color8>) + - [func Color8FromBytes\(bytes \[\]byte\) Color8](<#Color8FromBytes>) + - [func Color8FromColor\(c Color\) Color8](<#Color8FromColor>) + - [func Color8FromHexString\(str string\) \(Color8, error\)](<#Color8FromHexString>) + - [func NewColor8\(r, g, b, a uint8\) Color8](<#NewColor8>) + - [func \(c Color8\) A\(\) uint8](<#Color8.A>) + - [func \(c Color8\) AsColor\(\) Color](<#Color8.AsColor>) + - [func \(c Color8\) B\(\) uint8](<#Color8.B>) + - [func \(c Color8\) Equal\(rhs Color8\) bool](<#Color8.Equal>) + - [func \(c Color8\) G\(\) uint8](<#Color8.G>) + - [func \(c Color8\) Hex\(\) string](<#Color8.Hex>) + - [func \(c \*Color8\) PA\(\) \*uint8](<#Color8.PA>) + - [func \(c \*Color8\) PB\(\) \*uint8](<#Color8.PB>) + - [func \(c \*Color8\) PG\(\) \*uint8](<#Color8.PG>) + - [func \(c \*Color8\) PR\(\) \*uint8](<#Color8.PR>) + - [func \(c Color8\) R\(\) uint8](<#Color8.R>) + - [func \(c Color8\) RGBA\(\) \(uint8, uint8, uint8, uint8\)](<#Color8.RGBA>) + - [func \(c \*Color8\) SetA\(a uint8\)](<#Color8.SetA>) + - [func \(c \*Color8\) SetB\(b uint8\)](<#Color8.SetB>) + - [func \(c \*Color8\) SetG\(g uint8\)](<#Color8.SetG>) + - [func \(c \*Color8\) SetR\(r uint8\)](<#Color8.SetR>) + - [func \(lhs Color8\) Similar\(rhs Color8, tolerance uint8\) bool](<#Color8.Similar>) + - [func \(c Color8\) ToUintRaw\(\) uint32](<#Color8.ToUintRaw>) +- [type ColorComponent](<#ColorComponent>) +- [type Float](<#Float>) + - [func Abs\(x Float\) Float](<#Abs>) + - [func Acos\(x Float\) Float](<#Acos>) + - [func Asin\(x Float\) Float](<#Asin>) + - [func Atan\(x Float\) Float](<#Atan>) + - [func Atan2\(y Float, x Float\) Float](<#Atan2>) + - [func Ceil\(x Float\) Float](<#Ceil>) + - [func Clamp\(current, minimum, maximum Float\) Float](<#Clamp>) + - [func Cos\(x Float\) Float](<#Cos>) + - [func Deg2Rad\(degree Float\) Float](<#Deg2Rad>) + - [func Floor\(x Float\) Float](<#Floor>) + - [func Inf\(sign int\) Float](<#Inf>) + - [func Lerp\(v0, v1, t Float\) Float](<#Lerp>) + - [func Log2\(x Float\) Float](<#Log2>) + - [func Max\(a Float, b Float\) Float](<#Max>) + - [func Min\(a Float, b Float\) Float](<#Min>) + - [func Mod\(x Float, y Float\) Float](<#Mod>) + - [func NaN\(\) Float](<#NaN>) + - [func Pow\(x Float, y Float\) Float](<#Pow>) + - [func Rad2Deg\(radian Float\) Float](<#Rad2Deg>) + - [func Round\(x Float\) Float](<#Round>) + - [func Sin\(x Float\) Float](<#Sin>) + - [func Sqrt\(x Float\) Float](<#Sqrt>) + - [func Tan\(x Float\) Float](<#Tan>) + - [func Vec2Dot\(v, other Vec2\) Float](<#Vec2Dot>) + - [func Vec3Dot\(v, other Vec3\) Float](<#Vec3Dot>) + - [func Vec4Dot\(a, b Vec4\) Float](<#Vec4Dot>) +- [type Mat3](<#Mat3>) + - [func Mat3FromMat4\(m Mat4\) Mat3](<#Mat3FromMat4>) + - [func Mat3Identity\(\) Mat3](<#Mat3Identity>) + - [func Mat3Zero\(\) Mat3](<#Mat3Zero>) + - [func NewMat3\(\) Mat3](<#NewMat3>) + - [func \(m Mat3\) ColumnVector\(col int\) Vec3](<#Mat3.ColumnVector>) + - [func \(m Mat3\) Multiply\(rhs Mat3\) Mat3](<#Mat3.Multiply>) + - [func \(m \*Mat3\) MultiplyAssign\(rhs Mat3\)](<#Mat3.MultiplyAssign>) + - [func \(m Mat3\) MultiplyVec3\(v Vec3\) Vec3](<#Mat3.MultiplyVec3>) + - [func \(m \*Mat3\) Reset\(\)](<#Mat3.Reset>) + - [func \(m Mat3\) RowVector\(row int\) Vec3](<#Mat3.RowVector>) + - [func \(m Mat3\) ToMat4\(\) Mat4](<#Mat3.ToMat4>) + - [func \(m Mat3\) Transpose\(\) Mat3](<#Mat3.Transpose>) +- [type Mat4](<#Mat4>) + - [func Mat4FromSlice\(a \[\]Float\) Mat4](<#Mat4FromSlice>) + - [func Mat4Identity\(\) Mat4](<#Mat4Identity>) + - [func Mat4LookAt\(eye, center, up Vec3\) Mat4](<#Mat4LookAt>) + - [func Mat4Multiply\(a, b Mat4\) Mat4](<#Mat4Multiply>) + - [func Mat4Zero\(\) Mat4](<#Mat4Zero>) + - [func NewMat4\(\) Mat4](<#NewMat4>) + - [func \(m \*Mat4\) AddAssign\(rhs Mat4\)](<#Mat4.AddAssign>) + - [func \(m Mat4\) At\(rowIndex, colIndex int\) Float](<#Mat4.At>) + - [func \(m Mat4\) ColumnVector\(col int\) Vec4](<#Mat4.ColumnVector>) + - [func \(m Mat4\) Equals\(other Mat4\) bool](<#Mat4.Equals>) + - [func \(m Mat4\) ExtractPosition\(\) Vec3](<#Mat4.ExtractPosition>) + - [func \(m Mat4\) ExtractRotation\(\) Quaternion](<#Mat4.ExtractRotation>) + - [func \(m Mat4\) ExtractScale\(\) Vec3](<#Mat4.ExtractScale>) + - [func \(m Mat4\) Forward\(\) Vec3](<#Mat4.Forward>) + - [func \(m \*Mat4\) Inverse\(\)](<#Mat4.Inverse>) + - [func \(m Mat4\) Inverted\(\) Mat4](<#Mat4.Inverted>) + - [func \(m Mat4\) IsIdentity\(\) bool](<#Mat4.IsIdentity>) + - [func \(m \*Mat4\) LookAt\(eye, center, up Vec3\)](<#Mat4.LookAt>) + - [func \(m \*Mat4\) Mat3\(\) Mat3](<#Mat4.Mat3>) + - [func \(m Mat4\) Mat4ProjToVulkan\(\) Mat4](<#Mat4.Mat4ProjToVulkan>) + - [func \(m Mat4\) Mat4Project\(pos Vec3, viewport Vec4\) Vec3](<#Mat4.Mat4Project>) + - [func \(m Mat4\) Mat4UnProject\(p Vec3, invViewProj Mat4, viewport Vec4\) Vec3](<#Mat4.Mat4UnProject>) + - [func \(a \*Mat4\) MultiplyAssign\(b Mat4\)](<#Mat4.MultiplyAssign>) + - [func \(m \*Mat4\) NegateAssign\(\)](<#Mat4.NegateAssign>) + - [func \(m \*Mat4\) Orthographic\(left, right, bottom, top, near, far Float\)](<#Mat4.Orthographic>) + - [func \(m \*Mat4\) Perspective\(fovy, aspect, nearVal, farVal Float\)](<#Mat4.Perspective>) + - [func \(m \*Mat4\) Reset\(\)](<#Mat4.Reset>) + - [func \(m Mat4\) Right\(\) Vec3](<#Mat4.Right>) + - [func \(m \*Mat4\) Rotate\(rotate Vec3\)](<#Mat4.Rotate>) + - [func \(m \*Mat4\) RotateAngles\(axis Vec3, angle Float\)](<#Mat4.RotateAngles>) + - [func \(m \*Mat4\) RotateX\(angles Float\)](<#Mat4.RotateX>) + - [func \(m \*Mat4\) RotateY\(angles Float\)](<#Mat4.RotateY>) + - [func \(m \*Mat4\) RotateZ\(angles Float\)](<#Mat4.RotateZ>) + - [func \(m Mat4\) RowVector\(row int\) Vec4](<#Mat4.RowVector>) + - [func \(m \*Mat4\) Scale\(scale Vec3\)](<#Mat4.Scale>) + - [func \(m \*Mat4\) SetTranslation\(translation Vec3\)](<#Mat4.SetTranslation>) + - [func \(m \*Mat4\) SubtractAssign\(rhs Mat4\)](<#Mat4.SubtractAssign>) + - [func \(m Mat4\) ToQuaternion\(\) Quaternion](<#Mat4.ToQuaternion>) + - [func \(m Mat4\) TransformPoint\(point Vec3\) Vec3](<#Mat4.TransformPoint>) + - [func \(m \*Mat4\) Translate\(translation Vec3\)](<#Mat4.Translate>) + - [func \(m Mat4\) Transpose\(\) Mat4](<#Mat4.Transpose>) + - [func \(m \*Mat4\) TransposeAssign\(\)](<#Mat4.TransposeAssign>) + - [func \(m Mat4\) Up\(\) Vec3](<#Mat4.Up>) + - [func \(m \*Mat4\) Zero\(\)](<#Mat4.Zero>) +- [type Quaternion](<#Quaternion>) + - [func NewQuaternion\(w, x, y, z Float\) Quaternion](<#NewQuaternion>) + - [func QuatAngleBetween\(lhs, rhs Vec3\) Quaternion](<#QuatAngleBetween>) + - [func QuaternionAxisAngle\(axis Vec3, angle Float\) Quaternion](<#QuaternionAxisAngle>) + - [func QuaternionFromArray\(xyzw \[4\]Float\) Quaternion](<#QuaternionFromArray>) + - [func QuaternionFromEuler\(v Vec3\) Quaternion](<#QuaternionFromEuler>) + - [func QuaternionFromMat4\(m Mat4\) Quaternion](<#QuaternionFromMat4>) + - [func QuaternionFromSlice\(xyzw \[\]Float\) Quaternion](<#QuaternionFromSlice>) + - [func QuaternionFromVec4\(v Vec4\) Quaternion](<#QuaternionFromVec4>) + - [func QuaternionFromXYZW\(xyzw \[4\]Float\) Quaternion](<#QuaternionFromXYZW>) + - [func QuaternionFromXYZWSlice\(xyzw \[\]Float\) Quaternion](<#QuaternionFromXYZWSlice>) + - [func QuaternionIdentity\(\) Quaternion](<#QuaternionIdentity>) + - [func QuaternionLerp\(from, to Quaternion, factor Float\) Quaternion](<#QuaternionLerp>) + - [func QuaternionLookAt\(from, to Vec3\) Quaternion](<#QuaternionLookAt>) + - [func QuaternionSlerp\(from, to Quaternion, factor Float\) Quaternion](<#QuaternionSlerp>) + - [func \(q \*Quaternion\) AddAssign\(rhs Quaternion\)](<#Quaternion.AddAssign>) + - [func \(q \*Quaternion\) Conjugate\(\)](<#Quaternion.Conjugate>) + - [func \(q \*Quaternion\) Inverse\(\)](<#Quaternion.Inverse>) + - [func \(q Quaternion\) IsZero\(\) bool](<#Quaternion.IsZero>) + - [func \(q Quaternion\) Multiply\(rhs Quaternion\) Quaternion](<#Quaternion.Multiply>) + - [func \(q \*Quaternion\) MultiplyAssign\(rhs Quaternion\)](<#Quaternion.MultiplyAssign>) + - [func \(q Quaternion\) MultiplyVec3\(rhs Vec3\) Vec3](<#Quaternion.MultiplyVec3>) + - [func \(q Quaternion\) Normal\(\) Quaternion](<#Quaternion.Normal>) + - [func \(q \*Quaternion\) Normalize\(\)](<#Quaternion.Normalize>) + - [func \(q Quaternion\) ToEuler\(\) Vec3](<#Quaternion.ToEuler>) + - [func \(q Quaternion\) ToMat4\(\) Mat4](<#Quaternion.ToMat4>) + - [func \(q Quaternion\) W\(\) Float](<#Quaternion.W>) + - [func \(q Quaternion\) X\(\) Float](<#Quaternion.X>) + - [func \(q Quaternion\) Y\(\) Float](<#Quaternion.Y>) + - [func \(q Quaternion\) Z\(\) Float](<#Quaternion.Z>) +- [type QuaternionComponent](<#QuaternionComponent>) +- [type Transform](<#Transform>) + - [func \(t \*Transform\) AddPosition\(add Vec3\)](<#Transform.AddPosition>) + - [func \(t \*Transform\) AddRotation\(add Vec3\)](<#Transform.AddRotation>) + - [func \(t \*Transform\) AddScale\(add Vec3\)](<#Transform.AddScale>) + - [func \(t \*Transform\) ContainsPoint\(point Vec3\) bool](<#Transform.ContainsPoint>) + - [func \(t \*Transform\) ContainsPoint2D\(point Vec2\) bool](<#Transform.ContainsPoint2D>) + - [func \(t \*Transform\) Copy\(other Transform\)](<#Transform.Copy>) + - [func \(t \*Transform\) Forward\(\) Vec3](<#Transform.Forward>) + - [func \(t \*Transform\) Initialize\(workGroup \*concurrent.WorkGroup\)](<#Transform.Initialize>) + - [func \(t \*Transform\) InverseWorldMatrix\(\) Mat4](<#Transform.InverseWorldMatrix>) + - [func \(t \*Transform\) IsDirty\(\) bool](<#Transform.IsDirty>) + - [func \(t \*Transform\) LocalPosition\(\) Vec3](<#Transform.LocalPosition>) + - [func \(t \*Transform\) LookAt\(point Vec3\)](<#Transform.LookAt>) + - [func \(t \*Transform\) Matrix\(\) Mat4](<#Transform.Matrix>) + - [func \(t \*Transform\) Parent\(\) \*Transform](<#Transform.Parent>) + - [func \(t \*Transform\) Position\(\) Vec3](<#Transform.Position>) + - [func \(t \*Transform\) ResetDirty\(\)](<#Transform.ResetDirty>) + - [func \(t \*Transform\) Right\(\) Vec3](<#Transform.Right>) + - [func \(t \*Transform\) Rotation\(\) Vec3](<#Transform.Rotation>) + - [func \(t \*Transform\) Scale\(\) Vec3](<#Transform.Scale>) + - [func \(t \*Transform\) ScaleWithoutChildren\(scale Vec3\)](<#Transform.ScaleWithoutChildren>) + - [func \(t \*Transform\) SetChildrenOrdered\(\)](<#Transform.SetChildrenOrdered>) + - [func \(t \*Transform\) SetChildrenUnordered\(\)](<#Transform.SetChildrenUnordered>) + - [func \(t \*Transform\) SetDirty\(\)](<#Transform.SetDirty>) + - [func \(t \*Transform\) SetLocalPosition\(position Vec3\)](<#Transform.SetLocalPosition>) + - [func \(t \*Transform\) SetParent\(parent \*Transform\)](<#Transform.SetParent>) + - [func \(t \*Transform\) SetPosition\(position Vec3\)](<#Transform.SetPosition>) + - [func \(t \*Transform\) SetRotation\(rotation Vec3\)](<#Transform.SetRotation>) + - [func \(t \*Transform\) SetScale\(scale Vec3\)](<#Transform.SetScale>) + - [func \(t \*Transform\) SetWorldPosition\(position Vec3\)](<#Transform.SetWorldPosition>) + - [func \(t \*Transform\) SetWorldRotation\(rotation Vec3\)](<#Transform.SetWorldRotation>) + - [func \(t \*Transform\) SetWorldScale\(scale Vec3\)](<#Transform.SetWorldScale>) + - [func \(t \*Transform\) SetupRawTransform\(\)](<#Transform.SetupRawTransform>) + - [func \(t \*Transform\) Up\(\) Vec3](<#Transform.Up>) + - [func \(t \*Transform\) WorldMatrix\(\) Mat4](<#Transform.WorldMatrix>) + - [func \(t \*Transform\) WorldPosition\(\) Vec3](<#Transform.WorldPosition>) + - [func \(t \*Transform\) WorldRotation\(\) Vec3](<#Transform.WorldRotation>) + - [func \(t \*Transform\) WorldScale\(\) Vec3](<#Transform.WorldScale>) + - [func \(t \*Transform\) WorldTransform\(\) \(Vec3, Vec3, Vec3\)](<#Transform.WorldTransform>) +- [type Vec2](<#Vec2>) + - [func NewVec2\(x, y Float\) Vec2](<#NewVec2>) + - [func Vec2Down\(\) Vec2](<#Vec2Down>) + - [func Vec2FromArray\(a \[2\]Float\) Vec2](<#Vec2FromArray>) + - [func Vec2FromSlice\(a \[\]Float\) Vec2](<#Vec2FromSlice>) + - [func Vec2FromString\(str string\) Vec2](<#Vec2FromString>) + - [func Vec2Half\(\) Vec2](<#Vec2Half>) + - [func Vec2Largest\(\) Vec2](<#Vec2Largest>) + - [func Vec2Left\(\) Vec2](<#Vec2Left>) + - [func Vec2Lerp\(from, to Vec2, t Float\) Vec2](<#Vec2Lerp>) + - [func Vec2Max\(a, b Vec2\) Vec2](<#Vec2Max>) + - [func Vec2MaxAbs\(a, b Vec2\) Vec2](<#Vec2MaxAbs>) + - [func Vec2Min\(a, b Vec2\) Vec2](<#Vec2Min>) + - [func Vec2MinAbs\(a, b Vec2\) Vec2](<#Vec2MinAbs>) + - [func Vec2One\(\) Vec2](<#Vec2One>) + - [func Vec2Right\(\) Vec2](<#Vec2Right>) + - [func Vec2Up\(\) Vec2](<#Vec2Up>) + - [func Vec2Zero\(\) Vec2](<#Vec2Zero>) + - [func \(v Vec2\) Abs\(\) Vec2](<#Vec2.Abs>) + - [func \(v Vec2\) Add\(other Vec2\) Vec2](<#Vec2.Add>) + - [func \(v \*Vec2\) AddAssign\(other Vec2\)](<#Vec2.AddAssign>) + - [func \(v Vec2\) Angle\(other Vec2\) Float](<#Vec2.Angle>) + - [func \(v Vec2\) AsVec2i\(\) Vec2i](<#Vec2.AsVec2i>) + - [func \(v \*Vec2\) AsVec3\(\) Vec3](<#Vec2.AsVec3>) + - [func \(v Vec2\) Distance\(other Vec2\) Float](<#Vec2.Distance>) + - [func \(v Vec2\) Divide\(other Vec2\) Vec2](<#Vec2.Divide>) + - [func \(v \*Vec2\) DivideAssign\(other Vec2\)](<#Vec2.DivideAssign>) + - [func \(v Vec2\) Equals\(other Vec2\) bool](<#Vec2.Equals>) + - [func \(v Vec2\) Height\(\) Float](<#Vec2.Height>) + - [func \(v \*Vec2\) Inverse\(\)](<#Vec2.Inverse>) + - [func \(v Vec2\) LargestAxis\(\) Float](<#Vec2.LargestAxis>) + - [func \(v Vec2\) LargestAxisDelta\(\) Float](<#Vec2.LargestAxisDelta>) + - [func \(v Vec2\) Length\(\) Float](<#Vec2.Length>) + - [func \(v Vec2\) Multiply\(other Vec2\) Vec2](<#Vec2.Multiply>) + - [func \(v \*Vec2\) MultiplyAssign\(other Vec2\)](<#Vec2.MultiplyAssign>) + - [func \(v Vec2\) Negative\(\) Vec2](<#Vec2.Negative>) + - [func \(v Vec2\) Normal\(\) Vec2](<#Vec2.Normal>) + - [func \(v \*Vec2\) Normalize\(\)](<#Vec2.Normalize>) + - [func \(v \*Vec2\) PX\(\) \*Float](<#Vec2.PX>) + - [func \(v \*Vec2\) PY\(\) \*Float](<#Vec2.PY>) + - [func \(v Vec2\) Scale\(scalar Float\) Vec2](<#Vec2.Scale>) + - [func \(v \*Vec2\) ScaleAssign\(scalar Float\)](<#Vec2.ScaleAssign>) + - [func \(v \*Vec2\) SetHeight\(y Float\)](<#Vec2.SetHeight>) + - [func \(v \*Vec2\) SetWidth\(x Float\)](<#Vec2.SetWidth>) + - [func \(v \*Vec2\) SetX\(x Float\)](<#Vec2.SetX>) + - [func \(v \*Vec2\) SetY\(y Float\)](<#Vec2.SetY>) + - [func \(v Vec2\) Shrink\(scalar Float\) Vec2](<#Vec2.Shrink>) + - [func \(v \*Vec2\) ShrinkAssign\(scalar Float\)](<#Vec2.ShrinkAssign>) + - [func \(v Vec2\) String\(\) string](<#Vec2.String>) + - [func \(v Vec2\) Subtract\(other Vec2\) Vec2](<#Vec2.Subtract>) + - [func \(v \*Vec2\) SubtractAssign\(other Vec2\)](<#Vec2.SubtractAssign>) + - [func \(v Vec2\) Width\(\) Float](<#Vec2.Width>) + - [func \(v Vec2\) X\(\) Float](<#Vec2.X>) + - [func \(v Vec2\) XY\(\) \(Float, Float\)](<#Vec2.XY>) + - [func \(v Vec2\) Y\(\) Float](<#Vec2.Y>) +- [type Vec2i](<#Vec2i>) + - [func \(v Vec2i\) Height\(\) int32](<#Vec2i.Height>) + - [func \(v \*Vec2i\) SetHeight\(height int32\)](<#Vec2i.SetHeight>) + - [func \(v \*Vec2i\) SetWidth\(width int32\)](<#Vec2i.SetWidth>) + - [func \(v \*Vec2i\) SetX\(x int32\)](<#Vec2i.SetX>) + - [func \(v \*Vec2i\) SetY\(y int32\)](<#Vec2i.SetY>) + - [func \(v Vec2i\) Width\(\) int32](<#Vec2i.Width>) + - [func \(v Vec2i\) X\(\) int32](<#Vec2i.X>) + - [func \(v Vec2i\) Y\(\) int32](<#Vec2i.Y>) +- [type Vec3](<#Vec3>) + - [func Mat4ToScreenSpace\(pos Vec3, view, projection Mat4, viewport Vec4\) \(Vec3, bool\)](<#Mat4ToScreenSpace>) + - [func NewVec3\(x, y, z Float\) Vec3](<#NewVec3>) + - [func NewVec3XYZ\(xyz Float\) Vec3](<#NewVec3XYZ>) + - [func Vec3Abs\(v Vec3\) Vec3](<#Vec3Abs>) + - [func Vec3Backward\(\) Vec3](<#Vec3Backward>) + - [func Vec3Cross\(v, other Vec3\) Vec3](<#Vec3Cross>) + - [func Vec3Down\(\) Vec3](<#Vec3Down>) + - [func Vec3Forward\(\) Vec3](<#Vec3Forward>) + - [func Vec3FromArray\(a \[3\]Float\) Vec3](<#Vec3FromArray>) + - [func Vec3FromSlice\(a \[\]Float\) Vec3](<#Vec3FromSlice>) + - [func Vec3FromString\(str string\) Vec3](<#Vec3FromString>) + - [func Vec3Half\(\) Vec3](<#Vec3Half>) + - [func Vec3Inf\(sign int\) Vec3](<#Vec3Inf>) + - [func Vec3Largest\(\) Vec3](<#Vec3Largest>) + - [func Vec3Left\(\) Vec3](<#Vec3Left>) + - [func Vec3Lerp\(from, to Vec3, t Float\) Vec3](<#Vec3Lerp>) + - [func Vec3Max\(v ...Vec3\) Vec3](<#Vec3Max>) + - [func Vec3MaxAbs\(v ...Vec3\) Vec3](<#Vec3MaxAbs>) + - [func Vec3Min\(v ...Vec3\) Vec3](<#Vec3Min>) + - [func Vec3MinAbs\(v ...Vec3\) Vec3](<#Vec3MinAbs>) + - [func Vec3NaN\(\) Vec3](<#Vec3NaN>) + - [func Vec3One\(\) Vec3](<#Vec3One>) + - [func Vec3Right\(\) Vec3](<#Vec3Right>) + - [func Vec3Up\(\) Vec3](<#Vec3Up>) + - [func Vec3Zero\(\) Vec3](<#Vec3Zero>) + - [func \(v Vec3\) Abs\(\) Vec3](<#Vec3.Abs>) + - [func \(v Vec3\) Add\(other Vec3\) Vec3](<#Vec3.Add>) + - [func \(v \*Vec3\) AddAssign\(other Vec3\)](<#Vec3.AddAssign>) + - [func \(v \*Vec3\) AddX\(x Float\)](<#Vec3.AddX>) + - [func \(v \*Vec3\) AddY\(y Float\)](<#Vec3.AddY>) + - [func \(v \*Vec3\) AddZ\(z Float\)](<#Vec3.AddZ>) + - [func \(v Vec3\) Angle\(other Vec3\) Float](<#Vec3.Angle>) + - [func \(v Vec3\) AsAligned16\(\) \[4\]Float](<#Vec3.AsAligned16>) + - [func \(v Vec3\) AsVec2\(\) Vec2](<#Vec3.AsVec2>) + - [func \(v Vec3\) AsVec3i\(\) Vec3i](<#Vec3.AsVec3i>) + - [func \(v Vec3\) AsVec4\(\) Vec4](<#Vec3.AsVec4>) + - [func \(v Vec3\) AsVec4WithW\(w Float\) Vec4](<#Vec3.AsVec4WithW>) + - [func \(v Vec3\) Depth\(\) Float](<#Vec3.Depth>) + - [func \(v Vec3\) Distance\(other Vec3\) Float](<#Vec3.Distance>) + - [func \(v Vec3\) Divide\(other Vec3\) Vec3](<#Vec3.Divide>) + - [func \(v \*Vec3\) DivideAssign\(other Vec3\)](<#Vec3.DivideAssign>) + - [func \(v Vec3\) Equals\(other Vec3\) bool](<#Vec3.Equals>) + - [func \(v Vec3\) Height\(\) Float](<#Vec3.Height>) + - [func \(v \*Vec3\) Inverse\(\)](<#Vec3.Inverse>) + - [func \(v Vec3\) IsInf\(sign int\) bool](<#Vec3.IsInf>) + - [func \(v Vec3\) IsNaN\(\) bool](<#Vec3.IsNaN>) + - [func \(v Vec3\) IsZero\(\) bool](<#Vec3.IsZero>) + - [func \(v Vec3\) LargestAxis\(\) Float](<#Vec3.LargestAxis>) + - [func \(v Vec3\) LargestAxisDelta\(\) Float](<#Vec3.LargestAxisDelta>) + - [func \(v Vec3\) Length\(\) Float](<#Vec3.Length>) + - [func \(v Vec3\) LengthSquared\(\) Float](<#Vec3.LengthSquared>) + - [func \(v Vec3\) LongestAxis\(\) int](<#Vec3.LongestAxis>) + - [func \(v Vec3\) LongestAxisValue\(\) Float](<#Vec3.LongestAxisValue>) + - [func \(v Vec3\) Multiply\(other Vec3\) Vec3](<#Vec3.Multiply>) + - [func \(v \*Vec3\) MultiplyAssign\(other Vec3\)](<#Vec3.MultiplyAssign>) + - [func \(v Vec3\) MultiplyMat3\(rhs Mat3\) Vec3](<#Vec3.MultiplyMat3>) + - [func \(v Vec3\) Negative\(\) Vec3](<#Vec3.Negative>) + - [func \(v Vec3\) Normal\(\) Vec3](<#Vec3.Normal>) + - [func \(v \*Vec3\) Normalize\(\)](<#Vec3.Normalize>) + - [func \(v Vec3\) Orthogonal\(\) Vec3](<#Vec3.Orthogonal>) + - [func \(v \*Vec3\) PX\(\) \*Float](<#Vec3.PX>) + - [func \(v \*Vec3\) PY\(\) \*Float](<#Vec3.PY>) + - [func \(v \*Vec3\) PZ\(\) \*Float](<#Vec3.PZ>) + - [func \(v Vec3\) Scale\(scalar Float\) Vec3](<#Vec3.Scale>) + - [func \(v \*Vec3\) ScaleAssign\(scalar Float\)](<#Vec3.ScaleAssign>) + - [func \(v \*Vec3\) ScaleX\(s Float\)](<#Vec3.ScaleX>) + - [func \(v \*Vec3\) ScaleY\(s Float\)](<#Vec3.ScaleY>) + - [func \(v \*Vec3\) ScaleZ\(s Float\)](<#Vec3.ScaleZ>) + - [func \(v \*Vec3\) SetX\(x Float\)](<#Vec3.SetX>) + - [func \(v \*Vec3\) SetY\(y Float\)](<#Vec3.SetY>) + - [func \(v \*Vec3\) SetZ\(z Float\)](<#Vec3.SetZ>) + - [func \(v Vec3\) Shrink\(scalar Float\) Vec3](<#Vec3.Shrink>) + - [func \(v \*Vec3\) ShrinkAssign\(scalar Float\)](<#Vec3.ShrinkAssign>) + - [func \(v Vec3\) SignedAngle\(other Vec3, axis Vec3\) Float](<#Vec3.SignedAngle>) + - [func \(v Vec3\) SquareDistance\(b Vec3\) Float](<#Vec3.SquareDistance>) + - [func \(v Vec3\) String\(\) string](<#Vec3.String>) + - [func \(v Vec3\) Subtract\(other Vec3\) Vec3](<#Vec3.Subtract>) + - [func \(v \*Vec3\) SubtractAssign\(other Vec3\)](<#Vec3.SubtractAssign>) + - [func \(v Vec3\) Width\(\) Float](<#Vec3.Width>) + - [func \(v Vec3\) X\(\) Float](<#Vec3.X>) + - [func \(v Vec3\) XY\(\) Vec2](<#Vec3.XY>) + - [func \(v Vec3\) XYZ\(\) \(Float, Float, Float\)](<#Vec3.XYZ>) + - [func \(v Vec3\) XZ\(\) Vec2](<#Vec3.XZ>) + - [func \(v Vec3\) Y\(\) Float](<#Vec3.Y>) + - [func \(v Vec3\) Z\(\) Float](<#Vec3.Z>) +- [type Vec3MinMax](<#Vec3MinMax>) + - [func NewVec3MinMax\(\) Vec3MinMax](<#NewVec3MinMax>) +- [type Vec3i](<#Vec3i>) + - [func \(v Vec3i\) Depth\(\) int32](<#Vec3i.Depth>) + - [func \(v Vec3i\) Height\(\) int32](<#Vec3i.Height>) + - [func \(v \*Vec3i\) SetDepth\(depth int32\)](<#Vec3i.SetDepth>) + - [func \(v \*Vec3i\) SetHeight\(height int32\)](<#Vec3i.SetHeight>) + - [func \(v \*Vec3i\) SetWidth\(width int32\)](<#Vec3i.SetWidth>) + - [func \(v \*Vec3i\) SetX\(x int32\)](<#Vec3i.SetX>) + - [func \(v \*Vec3i\) SetY\(y int32\)](<#Vec3i.SetY>) + - [func \(v \*Vec3i\) SetZ\(z int32\)](<#Vec3i.SetZ>) + - [func \(v Vec3i\) Width\(\) int32](<#Vec3i.Width>) + - [func \(v Vec3i\) X\(\) int32](<#Vec3i.X>) + - [func \(v Vec3i\) Y\(\) int32](<#Vec3i.Y>) + - [func \(v Vec3i\) Z\(\) int32](<#Vec3i.Z>) +- [type Vec4](<#Vec4>) + - [func Mat4MultiplyVec4\(a Mat4, b Vec4\) Vec4](<#Mat4MultiplyVec4>) + - [func NewVec4\(x, y, z, w Float\) Vec4](<#NewVec4>) + - [func Vec4Area\(xa, ya, xb, yb Float\) Vec4](<#Vec4Area>) + - [func Vec4FromArray\(a \[4\]Float\) Vec4](<#Vec4FromArray>) + - [func Vec4FromSlice\(a \[\]Float\) Vec4](<#Vec4FromSlice>) + - [func Vec4FromString\(str string\) Vec4](<#Vec4FromString>) + - [func Vec4Half\(\) Vec4](<#Vec4Half>) + - [func Vec4Largest\(\) Vec4](<#Vec4Largest>) + - [func Vec4Lerp\(from, to Vec4, t Float\) Vec4](<#Vec4Lerp>) + - [func Vec4Max\(a, b Vec4\) Vec4](<#Vec4Max>) + - [func Vec4MaxAbs\(a, b Vec4\) Vec4](<#Vec4MaxAbs>) + - [func Vec4Min\(a, b Vec4\) Vec4](<#Vec4Min>) + - [func Vec4MinAbs\(a, b Vec4\) Vec4](<#Vec4MinAbs>) + - [func Vec4MultiplyMat4\(v Vec4, m Mat4\) Vec4](<#Vec4MultiplyMat4>) + - [func Vec4One\(\) Vec4](<#Vec4One>) + - [func Vec4Zero\(\) Vec4](<#Vec4Zero>) + - [func \(v Vec4\) Abs\(\) Vec4](<#Vec4.Abs>) + - [func \(v Vec4\) Add\(other Vec4\) Vec4](<#Vec4.Add>) + - [func \(v \*Vec4\) AddAssign\(other Vec4\)](<#Vec4.AddAssign>) + - [func \(v Vec4\) Angle\(other Vec4\) Float](<#Vec4.Angle>) + - [func \(v Vec4\) AreaContains\(x, y Float\) bool](<#Vec4.AreaContains>) + - [func \(v Vec4\) AsVec3\(\) Vec3](<#Vec4.AsVec3>) + - [func \(v Vec4\) AsVec4i\(\) Vec4i](<#Vec4.AsVec4i>) + - [func \(v Vec4\) Bottom\(\) Float](<#Vec4.Bottom>) + - [func \(v Vec4\) BoxContains\(x, y Float\) bool](<#Vec4.BoxContains>) + - [func \(v Vec4\) Distance\(other Vec4\) Float](<#Vec4.Distance>) + - [func \(v Vec4\) Divide\(other Vec4\) Vec4](<#Vec4.Divide>) + - [func \(v \*Vec4\) DivideAssign\(other Vec4\)](<#Vec4.DivideAssign>) + - [func \(v Vec4\) Equals\(other Vec4\) bool](<#Vec4.Equals>) + - [func \(v Vec4\) Height\(\) Float](<#Vec4.Height>) + - [func \(v Vec4\) Horizontal\(\) Float](<#Vec4.Horizontal>) + - [func \(v \*Vec4\) Inverse\(\)](<#Vec4.Inverse>) + - [func \(v Vec4\) LargestAxis\(\) Float](<#Vec4.LargestAxis>) + - [func \(v Vec4\) LargestAxisDelta\(\) Float](<#Vec4.LargestAxisDelta>) + - [func \(v Vec4\) Left\(\) Float](<#Vec4.Left>) + - [func \(v Vec4\) Length\(\) Float](<#Vec4.Length>) + - [func \(v Vec4\) Multiply\(other Vec4\) Vec4](<#Vec4.Multiply>) + - [func \(v \*Vec4\) MultiplyAssign\(other Vec4\)](<#Vec4.MultiplyAssign>) + - [func \(v Vec4\) Negative\(\) Vec4](<#Vec4.Negative>) + - [func \(v Vec4\) Normal\(\) Vec4](<#Vec4.Normal>) + - [func \(v \*Vec4\) Normalize\(\)](<#Vec4.Normalize>) + - [func \(v \*Vec4\) PW\(\) \*Float](<#Vec4.PW>) + - [func \(v \*Vec4\) PX\(\) \*Float](<#Vec4.PX>) + - [func \(v \*Vec4\) PY\(\) \*Float](<#Vec4.PY>) + - [func \(v \*Vec4\) PZ\(\) \*Float](<#Vec4.PZ>) + - [func \(v Vec4\) Right\(\) Float](<#Vec4.Right>) + - [func \(v Vec4\) Scale\(scalar Float\) Vec4](<#Vec4.Scale>) + - [func \(v \*Vec4\) ScaleAssign\(scalar Float\)](<#Vec4.ScaleAssign>) + - [func \(v Vec4\) ScreenAreaContains\(x, y Float\) bool](<#Vec4.ScreenAreaContains>) + - [func \(v \*Vec4\) SetBottom\(w Float\)](<#Vec4.SetBottom>) + - [func \(v \*Vec4\) SetHeight\(w Float\)](<#Vec4.SetHeight>) + - [func \(v \*Vec4\) SetLeft\(x Float\)](<#Vec4.SetLeft>) + - [func \(v \*Vec4\) SetRight\(z Float\)](<#Vec4.SetRight>) + - [func \(v \*Vec4\) SetTop\(y Float\)](<#Vec4.SetTop>) + - [func \(v \*Vec4\) SetW\(w Float\)](<#Vec4.SetW>) + - [func \(v \*Vec4\) SetWidth\(z Float\)](<#Vec4.SetWidth>) + - [func \(v \*Vec4\) SetX\(x Float\)](<#Vec4.SetX>) + - [func \(v \*Vec4\) SetY\(y Float\)](<#Vec4.SetY>) + - [func \(v \*Vec4\) SetZ\(z Float\)](<#Vec4.SetZ>) + - [func \(v Vec4\) Shrink\(scalar Float\) Vec4](<#Vec4.Shrink>) + - [func \(v \*Vec4\) ShrinkAssign\(scalar Float\)](<#Vec4.ShrinkAssign>) + - [func \(v Vec4\) String\(\) string](<#Vec4.String>) + - [func \(v Vec4\) Subtract\(other Vec4\) Vec4](<#Vec4.Subtract>) + - [func \(v \*Vec4\) SubtractAssign\(other Vec4\)](<#Vec4.SubtractAssign>) + - [func \(v Vec4\) Top\(\) Float](<#Vec4.Top>) + - [func \(v Vec4\) Vertical\(\) Float](<#Vec4.Vertical>) + - [func \(v Vec4\) W\(\) Float](<#Vec4.W>) + - [func \(v Vec4\) Width\(\) Float](<#Vec4.Width>) + - [func \(v Vec4\) X\(\) Float](<#Vec4.X>) + - [func \(v Vec4\) XYZW\(\) \(Float, Float, Float, Float\)](<#Vec4.XYZW>) + - [func \(v Vec4\) Y\(\) Float](<#Vec4.Y>) + - [func \(v Vec4\) Z\(\) Float](<#Vec4.Z>) +- [type Vec4i](<#Vec4i>) + - [func \(v Vec4i\) Height\(\) int32](<#Vec4i.Height>) + - [func \(v Vec4i\) W\(\) int32](<#Vec4i.W>) + - [func \(v Vec4i\) Width\(\) int32](<#Vec4i.Width>) + - [func \(v Vec4i\) X\(\) int32](<#Vec4i.X>) + - [func \(v Vec4i\) Y\(\) int32](<#Vec4i.Y>) + - [func \(v Vec4i\) Z\(\) int32](<#Vec4i.Z>) +- [type VectorComponent](<#VectorComponent>) + + +## Constants + + + +```go +const ( + Mat4Row0 = iota + Mat4Row1 + Mat4Row2 + Mat4Row3 +) +``` + + + +```go +const ( + Mat4Col0 = iota + Mat4Col1 + Mat4Col2 + Mat4Col3 +) +``` + + + +```go +const ( + Mat4x0y0 = x0y0 + Mat4x1y0 = x1y0 + Mat4x2y0 = x2y0 + Mat4x3y0 = x3y0 + Mat4x0y1 = x0y1 + Mat4x1y1 = x1y1 + Mat4x2y1 = x2y1 + Mat4x3y1 = x3y1 + Mat4x0y2 = x0y2 + Mat4x1y2 = x1y2 + Mat4x2y2 = x2y2 + Mat4x3y2 = x3y2 + Mat4x0y3 = x0y3 + Mat4x1y3 = x1y3 + Mat4x2y3 = x2y3 + Mat4x3y3 = x3y3 +) +``` + + + +```go +const ( + TransformWorkGroup = "transform" + TransformResetWorkGroup = "transformReset" +) +``` + + + +```go +const DegToRadVal = (math.Pi / 180.0) +``` + + + +```go +const FloatMax = Float(math.MaxFloat32) +``` + + + +```go +const FloatSmallestNonzero = Float(math.SmallestNonzeroFloat32) +``` + + + +```go +const RadToDegVal = (180.0 / math.Pi) +``` + + + +```go +const Roughly = 0.001 +``` + + + +```go +const Tiny = 0.0001 +``` + + +## func [AbsInt]() + +```go +func AbsInt(a int) int +``` + + + + +## func [Approx]() + +```go +func Approx(a, b Float) bool +``` + + + + +## func [ApproxTo]() + +```go +func ApproxTo(a, b, tolerance Float) bool +``` + + + + +## func [IsInf]() + +```go +func IsInf(x Float, sign int) bool +``` + + + + +## func [IsNaN]() + +```go +func IsNaN(x Float) bool +``` + + + + +## func [Mat4Approx]() + +```go +func Mat4Approx(a, b Mat4) bool +``` + + + + +## func [Mat4ApproxTo]() + +```go +func Mat4ApproxTo(a, b Mat4, delta Float) bool +``` + + + + +## func [QuaternionApprox]() + +```go +func QuaternionApprox(a, b Quaternion) bool +``` + + + + +## func [Vec2Approx]() + +```go +func Vec2Approx(a, b Vec2) bool +``` + + + + +## func [Vec2ApproxTo]() + +```go +func Vec2ApproxTo(a, b Vec2, delta Float) bool +``` + + + + +## func [Vec2Nearly]() + +```go +func Vec2Nearly(a, b Vec2) bool +``` + + + + +## func [Vec2Roughly]() + +```go +func Vec2Roughly(a, b Vec2) bool +``` + + + + +## func [Vec3Approx]() + +```go +func Vec3Approx(a, b Vec3) bool +``` + + + + +## func [Vec3ApproxTo]() + +```go +func Vec3ApproxTo(a, b Vec3, delta Float) bool +``` + + + + +## func [Vec4Approx]() + +```go +func Vec4Approx(a, b Vec4) bool +``` + + + + +## func [Vec4ApproxTo]() + +```go +func Vec4ApproxTo(a, b Vec4, delta Float) bool +``` + + + + +## func [Vec4Roughly]() + +```go +func Vec4Roughly(a, b Vec4) bool +``` + + + + +## type [Color]() + + + +```go +type Color Vec4 +``` + + +### func [ColorAqua]() + +```go +func ColorAqua() Color +``` + + + + +### func [ColorAquamarine]() + +```go +func ColorAquamarine() Color +``` + + + + +### func [ColorAzure]() + +```go +func ColorAzure() Color +``` + + + + +### func [ColorBeige]() + +```go +func ColorBeige() Color +``` + + + + +### func [ColorBisque]() + +```go +func ColorBisque() Color +``` + + + + +### func [ColorBlack]() + +```go +func ColorBlack() Color +``` + + + + +### func [ColorBlanchedAlmond]() + +```go +func ColorBlanchedAlmond() Color +``` + + + + +### func [ColorBlue]() + +```go +func ColorBlue() Color +``` + + + + +### func [ColorBlueViolet]() + +```go +func ColorBlueViolet() Color +``` + + + + +### func [ColorBrown]() + +```go +func ColorBrown() Color +``` + + + + +### func [ColorBurlyWood]() + +```go +func ColorBurlyWood() Color +``` + + + + +### func [ColorCadetBlue]() + +```go +func ColorCadetBlue() Color +``` + + + + +### func [ColorChartreuse]() + +```go +func ColorChartreuse() Color +``` + + + + +### func [ColorChocolate]() + +```go +func ColorChocolate() Color +``` + + + + +### func [ColorClear]() + +```go +func ColorClear() Color +``` + + + + +### func [ColorCoral]() + +```go +func ColorCoral() Color +``` + + + + +### func [ColorCornSilk]() + +```go +func ColorCornSilk() Color +``` + + + + +### func [ColorCornflowerBlue]() + +```go +func ColorCornflowerBlue() Color +``` + + + + +### func [ColorCrimson]() + +```go +func ColorCrimson() Color +``` + + + + +### func [ColorCyan]() + +```go +func ColorCyan() Color +``` + + + + +### func [ColorDarkBG]() + +```go +func ColorDarkBG() Color +``` + + + + +### func [ColorDarkBlue]() + +```go +func ColorDarkBlue() Color +``` + + + + +### func [ColorDarkCyan]() + +```go +func ColorDarkCyan() Color +``` + + + + +### func [ColorDarkGoldenrod]() + +```go +func ColorDarkGoldenrod() Color +``` + + + + +### func [ColorDarkGray]() + +```go +func ColorDarkGray() Color +``` + + + + +### func [ColorDarkGreen]() + +```go +func ColorDarkGreen() Color +``` + + + + +### func [ColorDarkKhaki]() + +```go +func ColorDarkKhaki() Color +``` + + + + +### func [ColorDarkMagenta]() + +```go +func ColorDarkMagenta() Color +``` + + + + +### func [ColorDarkModeGrayBG]() + +```go +func ColorDarkModeGrayBG() Color +``` + + + + +### func [ColorDarkModeGrayFG]() + +```go +func ColorDarkModeGrayFG() Color +``` + + + + +### func [ColorDarkOliveGreen]() + +```go +func ColorDarkOliveGreen() Color +``` + + + + +### func [ColorDarkOrange]() + +```go +func ColorDarkOrange() Color +``` + + + + +### func [ColorDarkOrchid]() + +```go +func ColorDarkOrchid() Color +``` + + + + +### func [ColorDarkRed]() + +```go +func ColorDarkRed() Color +``` + + + + +### func [ColorDarkSalmon]() + +```go +func ColorDarkSalmon() Color +``` + + + + +### func [ColorDarkSeaGreen]() + +```go +func ColorDarkSeaGreen() Color +``` + + + + +### func [ColorDarkSlateBlue]() + +```go +func ColorDarkSlateBlue() Color +``` + + + + +### func [ColorDarkSlateGray]() + +```go +func ColorDarkSlateGray() Color +``` + + + + +### func [ColorDarkTurquoise]() + +```go +func ColorDarkTurquoise() Color +``` + + + + +### func [ColorDarkViolet]() + +```go +func ColorDarkViolet() Color +``` + + + + +### func [ColorDeepPink]() + +```go +func ColorDeepPink() Color +``` + + + + +### func [ColorDeepSkyBlue]() + +```go +func ColorDeepSkyBlue() Color +``` + + + + +### func [ColorDimGray]() + +```go +func ColorDimGray() Color +``` + + + + +### func [ColorDodgerBlue]() + +```go +func ColorDodgerBlue() Color +``` + + + + +### func [ColorFirebrick]() + +```go +func ColorFirebrick() Color +``` + + + + +### func [ColorFloralWhite]() + +```go +func ColorFloralWhite() Color +``` + + + + +### func [ColorForestGreen]() + +```go +func ColorForestGreen() Color +``` + + + + +### func [ColorFromColor8]() + +```go +func ColorFromColor8(c Color8) Color +``` + + + + +### func [ColorFromHexString]() + +```go +func ColorFromHexString(str string) (Color, error) +``` + + + + +### func [ColorFromVec3]() + +```go +func ColorFromVec3(v Vec3) Color +``` + + + + +### func [ColorFromVec4]() + +```go +func ColorFromVec4(v Vec4) Color +``` + + + + +### func [ColorFuchsia]() + +```go +func ColorFuchsia() Color +``` + + + + +### func [ColorGainsboro]() + +```go +func ColorGainsboro() Color +``` + + + + +### func [ColorGhostWhite]() + +```go +func ColorGhostWhite() Color +``` + + + + +### func [ColorGold]() + +```go +func ColorGold() Color +``` + + + + +### func [ColorGoldenrod]() + +```go +func ColorGoldenrod() Color +``` + + + + +### func [ColorGray]() + +```go +func ColorGray() Color +``` + + + + +### func [ColorGreen]() + +```go +func ColorGreen() Color +``` + + + + +### func [ColorGreenYellow]() + +```go +func ColorGreenYellow() Color +``` + + + + +### func [ColorHoneydew]() + +```go +func ColorHoneydew() Color +``` + + + + +### func [ColorHotPink]() + +```go +func ColorHotPink() Color +``` + + + + +### func [ColorIndianRed]() + +```go +func ColorIndianRed() Color +``` + + + + +### func [ColorIndigo]() + +```go +func ColorIndigo() Color +``` + + + + +### func [ColorIvory]() + +```go +func ColorIvory() Color +``` + + + + +### func [ColorKhaki]() + +```go +func ColorKhaki() Color +``` + + + + +### func [ColorLavender]() + +```go +func ColorLavender() Color +``` + + + + +### func [ColorLavenderBlush]() + +```go +func ColorLavenderBlush() Color +``` + + + + +### func [ColorLawnGreen]() + +```go +func ColorLawnGreen() Color +``` + + + + +### func [ColorLemonChiffon]() + +```go +func ColorLemonChiffon() Color +``` + + + + +### func [ColorLightBlue]() + +```go +func ColorLightBlue() Color +``` + + + + +### func [ColorLightCoral]() + +```go +func ColorLightCoral() Color +``` + + + + +### func [ColorLightCyan]() + +```go +func ColorLightCyan() Color +``` + + + + +### func [ColorLightGoldenrodYellow]() + +```go +func ColorLightGoldenrodYellow() Color +``` + + + + +### func [ColorLightGreen]() + +```go +func ColorLightGreen() Color +``` + + + + +### func [ColorLightGrey]() + +```go +func ColorLightGrey() Color +``` + + + + +### func [ColorLightPink]() + +```go +func ColorLightPink() Color +``` + + + + +### func [ColorLightSalmon]() + +```go +func ColorLightSalmon() Color +``` + + + + +### func [ColorLightSeaGreen]() + +```go +func ColorLightSeaGreen() Color +``` + + + + +### func [ColorLightSkyBlue]() + +```go +func ColorLightSkyBlue() Color +``` + + + + +### func [ColorLightSlateGray]() + +```go +func ColorLightSlateGray() Color +``` + + + + +### func [ColorLightSteelBlue]() + +```go +func ColorLightSteelBlue() Color +``` + + + + +### func [ColorLightYellow]() + +```go +func ColorLightYellow() Color +``` + + + + +### func [ColorLime]() + +```go +func ColorLime() Color +``` + + + + +### func [ColorLimeGreen]() + +```go +func ColorLimeGreen() Color +``` + + + + +### func [ColorLinen]() + +```go +func ColorLinen() Color +``` + + + + +### func [ColorMagenta]() + +```go +func ColorMagenta() Color +``` + + + + +### func [ColorMaroon]() + +```go +func ColorMaroon() Color +``` + + + + +### func [ColorMediumAquamarine]() + +```go +func ColorMediumAquamarine() Color +``` + + + + +### func [ColorMediumBlue]() + +```go +func ColorMediumBlue() Color +``` + + + + +### func [ColorMediumOrchid]() + +```go +func ColorMediumOrchid() Color +``` + + + + +### func [ColorMediumPurple]() + +```go +func ColorMediumPurple() Color +``` + + + + +### func [ColorMediumSeaGreen]() + +```go +func ColorMediumSeaGreen() Color +``` + + + + +### func [ColorMediumSlateBlue]() + +```go +func ColorMediumSlateBlue() Color +``` + + + + +### func [ColorMediumSpringGreen]() + +```go +func ColorMediumSpringGreen() Color +``` + + + + +### func [ColorMediumTurquoise]() + +```go +func ColorMediumTurquoise() Color +``` + + + + +### func [ColorMediumVioletRed]() + +```go +func ColorMediumVioletRed() Color +``` + + + + +### func [ColorMidnightBlue]() + +```go +func ColorMidnightBlue() Color +``` + + + + +### func [ColorMintCream]() + +```go +func ColorMintCream() Color +``` + + + + +### func [ColorMistyRose]() + +```go +func ColorMistyRose() Color +``` + + + + +### func [ColorMix]() + +```go +func ColorMix(lhs, rhs Color, amount Float) Color +``` + + + + +### func [ColorMoccasin]() + +```go +func ColorMoccasin() Color +``` + + + + +### func [ColorNavajoWhite]() + +```go +func ColorNavajoWhite() Color +``` + + + + +### func [ColorNavy]() + +```go +func ColorNavy() Color +``` + + + + +### func [ColorOldLace]() + +```go +func ColorOldLace() Color +``` + + + + +### func [ColorOlive]() + +```go +func ColorOlive() Color +``` + + + + +### func [ColorOliveDrab]() + +```go +func ColorOliveDrab() Color +``` + + + + +### func [ColorOrange]() + +```go +func ColorOrange() Color +``` + + + + +### func [ColorOrangeRed]() + +```go +func ColorOrangeRed() Color +``` + + + + +### func [ColorOrchid]() + +```go +func ColorOrchid() Color +``` + + + + +### func [ColorPaleGoldenrod]() + +```go +func ColorPaleGoldenrod() Color +``` + + + + +### func [ColorPaleGreen]() + +```go +func ColorPaleGreen() Color +``` + + + + +### func [ColorPaleTurquoise]() + +```go +func ColorPaleTurquoise() Color +``` + + + + +### func [ColorPaleVioletred]() + +```go +func ColorPaleVioletred() Color +``` + + + + +### func [ColorPapayaWhip]() + +```go +func ColorPapayaWhip() Color +``` + + + + +### func [ColorPeachPuff]() + +```go +func ColorPeachPuff() Color +``` + + + + +### func [ColorPeru]() + +```go +func ColorPeru() Color +``` + + + + +### func [ColorPink]() + +```go +func ColorPink() Color +``` + + + + +### func [ColorPlum]() + +```go +func ColorPlum() Color +``` + + + + +### func [ColorPowderBlue]() + +```go +func ColorPowderBlue() Color +``` + + + + +### func [ColorPurple]() + +```go +func ColorPurple() Color +``` + + + + +### func [ColorRGBAInt]() + +```go +func ColorRGBAInt(r, g, b, a int) Color +``` + + + + +### func [ColorRGBInt]() + +```go +func ColorRGBInt(r, g, b int) Color +``` + + + + +### func [ColorRed]() + +```go +func ColorRed() Color +``` + + + + +### func [ColorRosyBrown]() + +```go +func ColorRosyBrown() Color +``` + + + + +### func [ColorRoyalBlue]() + +```go +func ColorRoyalBlue() Color +``` + + + + +### func [ColorSaddleBrown]() + +```go +func ColorSaddleBrown() Color +``` + + + + +### func [ColorSalmon]() + +```go +func ColorSalmon() Color +``` + + + + +### func [ColorSandyBrown]() + +```go +func ColorSandyBrown() Color +``` + + + + +### func [ColorSeaGreen]() + +```go +func ColorSeaGreen() Color +``` + + + + +### func [ColorSeashell]() + +```go +func ColorSeashell() Color +``` + + + + +### func [ColorSienna]() + +```go +func ColorSienna() Color +``` + + + + +### func [ColorSilver]() + +```go +func ColorSilver() Color +``` + + + + +### func [ColorSky]() + +```go +func ColorSky() Color +``` + + + + +### func [ColorSkyBlue]() + +```go +func ColorSkyBlue() Color +``` + + + + +### func [ColorSlateBlue]() + +```go +func ColorSlateBlue() Color +``` + + + + +### func [ColorSlateGray]() + +```go +func ColorSlateGray() Color +``` + + + + +### func [ColorSlateGrey]() + +```go +func ColorSlateGrey() Color +``` + + + + +### func [ColorSnow]() + +```go +func ColorSnow() Color +``` + + + + +### func [ColorSpringGreen]() + +```go +func ColorSpringGreen() Color +``` + + + + +### func [ColorSteelBlue]() + +```go +func ColorSteelBlue() Color +``` + + + + +### func [ColorTan]() + +```go +func ColorTan() Color +``` + + + + +### func [ColorTeal]() + +```go +func ColorTeal() Color +``` + + + + +### func [ColorThistle]() + +```go +func ColorThistle() Color +``` + + + + +### func [ColorTomato]() + +```go +func ColorTomato() Color +``` + + + + +### func [ColorTransparent]() + +```go +func ColorTransparent() Color +``` + + + + +### func [ColorTurquoise]() + +```go +func ColorTurquoise() Color +``` + + + + +### func [ColorViolet]() + +```go +func ColorViolet() Color +``` + + + + +### func [ColorWheat]() + +```go +func ColorWheat() Color +``` + + + + +### func [ColorWhite]() + +```go +func ColorWhite() Color +``` + + + + +### func [ColorWhiteSmoke]() + +```go +func ColorWhiteSmoke() Color +``` + + + + +### func [ColorYellow]() + +```go +func ColorYellow() Color +``` + + + + +### func [ColorYellowGreen]() + +```go +func ColorYellowGreen() Color +``` + + + + +### func [ColorZero]() + +```go +func ColorZero() Color +``` + + + + +### func [NewColor]() + +```go +func NewColor(r, g, b, a Float) Color +``` + + + + +### func \(Color\) [A]() + +```go +func (c Color) A() Float +``` + + + + +### func \(Color\) [AsColor8]() + +```go +func (c Color) AsColor8() Color8 +``` + + + + +### func \(Color\) [B]() + +```go +func (c Color) B() Float +``` + + + + +### func \(Color\) [Equals]() + +```go +func (lhs Color) Equals(rhs Color) bool +``` + + + + +### func \(Color\) [G]() + +```go +func (c Color) G() Float +``` + + + + +### func \(Color\) [Hex]() + +```go +func (c Color) Hex() string +``` + + + + +### func \(\*Color\) [Inverted]() + +```go +func (c *Color) Inverted() Color +``` + + + + +### func \(Color\) [IsZero]() + +```go +func (c Color) IsZero() bool +``` + + + + +### func \(\*Color\) [MultiplyAssign]() + +```go +func (c *Color) MultiplyAssign(other Color) +``` + + + + +### func \(\*Color\) [PA]() + +```go +func (c *Color) PA() *Float +``` + + + + +### func \(\*Color\) [PB]() + +```go +func (c *Color) PB() *Float +``` + + + + +### func \(\*Color\) [PG]() + +```go +func (c *Color) PG() *Float +``` + + + + +### func \(\*Color\) [PR]() + +```go +func (c *Color) PR() *Float +``` + + + + +### func \(Color\) [R]() + +```go +func (c Color) R() Float +``` + + + + +### func \(Color\) [RGBA]() + +```go +func (c Color) RGBA() (Float, Float, Float, Float) +``` + + + + +### func \(Color\) [ScaleWithoutAlpha]() + +```go +func (c Color) ScaleWithoutAlpha(scale Float) Color +``` + + + + +### func \(\*Color\) [SetA]() + +```go +func (c *Color) SetA(a Float) +``` + + + + +### func \(\*Color\) [SetB]() + +```go +func (c *Color) SetB(b Float) +``` + + + + +### func \(\*Color\) [SetG]() + +```go +func (c *Color) SetG(g Float) +``` + + + + +### func \(\*Color\) [SetR]() + +```go +func (c *Color) SetR(r Float) +``` + + + + +## type [Color8]() + + + +```go +type Color8 [4]uint8 +``` + + +### func [Color8FromBytes]() + +```go +func Color8FromBytes(bytes []byte) Color8 +``` + + + + +### func [Color8FromColor]() + +```go +func Color8FromColor(c Color) Color8 +``` + + + + +### func [Color8FromHexString]() + +```go +func Color8FromHexString(str string) (Color8, error) +``` + + + + +### func [NewColor8]() + +```go +func NewColor8(r, g, b, a uint8) Color8 +``` + + + + +### func \(Color8\) [A]() + +```go +func (c Color8) A() uint8 +``` + + + + +### func \(Color8\) [AsColor]() + +```go +func (c Color8) AsColor() Color +``` + + + + +### func \(Color8\) [B]() + +```go +func (c Color8) B() uint8 +``` + + + + +### func \(Color8\) [Equal]() + +```go +func (c Color8) Equal(rhs Color8) bool +``` + + + + +### func \(Color8\) [G]() + +```go +func (c Color8) G() uint8 +``` + + + + +### func \(Color8\) [Hex]() + +```go +func (c Color8) Hex() string +``` + + + + +### func \(\*Color8\) [PA]() + +```go +func (c *Color8) PA() *uint8 +``` + + + + +### func \(\*Color8\) [PB]() + +```go +func (c *Color8) PB() *uint8 +``` + + + + +### func \(\*Color8\) [PG]() + +```go +func (c *Color8) PG() *uint8 +``` + + + + +### func \(\*Color8\) [PR]() + +```go +func (c *Color8) PR() *uint8 +``` + + + + +### func \(Color8\) [R]() + +```go +func (c Color8) R() uint8 +``` + + + + +### func \(Color8\) [RGBA]() + +```go +func (c Color8) RGBA() (uint8, uint8, uint8, uint8) +``` + + + + +### func \(\*Color8\) [SetA]() + +```go +func (c *Color8) SetA(a uint8) +``` + + + + +### func \(\*Color8\) [SetB]() + +```go +func (c *Color8) SetB(b uint8) +``` + + + + +### func \(\*Color8\) [SetG]() + +```go +func (c *Color8) SetG(g uint8) +``` + + + + +### func \(\*Color8\) [SetR]() + +```go +func (c *Color8) SetR(r uint8) +``` + + + + +### func \(Color8\) [Similar]() + +```go +func (lhs Color8) Similar(rhs Color8, tolerance uint8) bool +``` + + + + +### func \(Color8\) [ToUintRaw]() + +```go +func (c Color8) ToUintRaw() uint32 +``` + + + + +## type [ColorComponent]() + + + +```go +type ColorComponent = int +``` + + + +```go +const ( + R ColorComponent = iota + G + B + A +) +``` + + +## type [Float]() + + + +```go +type Float = float32 +``` + + +### func [Abs]() + +```go +func Abs(x Float) Float +``` + + + + +### func [Acos]() + +```go +func Acos(x Float) Float +``` + + + + +### func [Asin]() + +```go +func Asin(x Float) Float +``` + + + + +### func [Atan]() + +```go +func Atan(x Float) Float +``` + + + + +### func [Atan2]() + +```go +func Atan2(y Float, x Float) Float +``` + + + + +### func [Ceil]() + +```go +func Ceil(x Float) Float +``` + + + + +### func [Clamp]() + +```go +func Clamp(current, minimum, maximum Float) Float +``` + + + + +### func [Cos]() + +```go +func Cos(x Float) Float +``` + + + + +### func [Deg2Rad]() + +```go +func Deg2Rad(degree Float) Float +``` + + + + +### func [Floor]() + +```go +func Floor(x Float) Float +``` + + + + +### func [Inf]() + +```go +func Inf(sign int) Float +``` + + + + +### func [Lerp]() + +```go +func Lerp(v0, v1, t Float) Float +``` + + + + +### func [Log2]() + +```go +func Log2(x Float) Float +``` + + + + +### func [Max]() + +```go +func Max(a Float, b Float) Float +``` + + + + +### func [Min]() + +```go +func Min(a Float, b Float) Float +``` + + + + +### func [Mod]() + +```go +func Mod(x Float, y Float) Float +``` + + + + +### func [NaN]() + +```go +func NaN() Float +``` + + + + +### func [Pow]() + +```go +func Pow(x Float, y Float) Float +``` + + + + +### func [Rad2Deg]() + +```go +func Rad2Deg(radian Float) Float +``` + + + + +### func [Round]() + +```go +func Round(x Float) Float +``` + + + + +### func [Sin]() + +```go +func Sin(x Float) Float +``` + + + + +### func [Sqrt]() + +```go +func Sqrt(x Float) Float +``` + + + + +### func [Tan]() + +```go +func Tan(x Float) Float +``` + + + + +### func [Vec2Dot]() + +```go +func Vec2Dot(v, other Vec2) Float +``` + + + + +### func [Vec3Dot]() + +```go +func Vec3Dot(v, other Vec3) Float +``` + + + + +### func [Vec4Dot]() + +```go +func Vec4Dot(a, b Vec4) Float +``` + + + + +## type [Mat3]() + + + +```go +type Mat3 [9]Float +``` + + +### func [Mat3FromMat4]() + +```go +func Mat3FromMat4(m Mat4) Mat3 +``` + + + + +### func [Mat3Identity]() + +```go +func Mat3Identity() Mat3 +``` + + + + +### func [Mat3Zero]() + +```go +func Mat3Zero() Mat3 +``` + + + + +### func [NewMat3]() + +```go +func NewMat3() Mat3 +``` + + + + +### func \(Mat3\) [ColumnVector]() + +```go +func (m Mat3) ColumnVector(col int) Vec3 +``` + + + + +### func \(Mat3\) [Multiply]() + +```go +func (m Mat3) Multiply(rhs Mat3) Mat3 +``` + + + + +### func \(\*Mat3\) [MultiplyAssign]() + +```go +func (m *Mat3) MultiplyAssign(rhs Mat3) +``` + + + + +### func \(Mat3\) [MultiplyVec3]() + +```go +func (m Mat3) MultiplyVec3(v Vec3) Vec3 +``` + + + + +### func \(\*Mat3\) [Reset]() + +```go +func (m *Mat3) Reset() +``` + + + + +### func \(Mat3\) [RowVector]() + +```go +func (m Mat3) RowVector(row int) Vec3 +``` + + + + +### func \(Mat3\) [ToMat4]() + +```go +func (m Mat3) ToMat4() Mat4 +``` + + + + +### func \(Mat3\) [Transpose]() + +```go +func (m Mat3) Transpose() Mat3 +``` + + + + +## type [Mat4]() + + + +```go +type Mat4 [16]Float +``` + + +### func [Mat4FromSlice]() + +```go +func Mat4FromSlice(a []Float) Mat4 +``` + + + + +### func [Mat4Identity]() + +```go +func Mat4Identity() Mat4 +``` + + + + +### func [Mat4LookAt]() + +```go +func Mat4LookAt(eye, center, up Vec3) Mat4 +``` + + + + +### func [Mat4Multiply]() + +```go +func Mat4Multiply(a, b Mat4) Mat4 +``` + + + + +### func [Mat4Zero]() + +```go +func Mat4Zero() Mat4 +``` + + + + +### func [NewMat4]() + +```go +func NewMat4() Mat4 +``` + + + + +### func \(\*Mat4\) [AddAssign]() + +```go +func (m *Mat4) AddAssign(rhs Mat4) +``` + + + + +### func \(Mat4\) [At]() + +```go +func (m Mat4) At(rowIndex, colIndex int) Float +``` + + + + +### func \(Mat4\) [ColumnVector]() + +```go +func (m Mat4) ColumnVector(col int) Vec4 +``` + + + + +### func \(Mat4\) [Equals]() + +```go +func (m Mat4) Equals(other Mat4) bool +``` + + + + +### func \(Mat4\) [ExtractPosition]() + +```go +func (m Mat4) ExtractPosition() Vec3 +``` + + + + +### func \(Mat4\) [ExtractRotation]() + +```go +func (m Mat4) ExtractRotation() Quaternion +``` + + + + +### func \(Mat4\) [ExtractScale]() + +```go +func (m Mat4) ExtractScale() Vec3 +``` + + + + +### func \(Mat4\) [Forward]() + +```go +func (m Mat4) Forward() Vec3 +``` + + + + +### func \(\*Mat4\) [Inverse]() + +```go +func (m *Mat4) Inverse() +``` + + + + +### func \(Mat4\) [Inverted]() + +```go +func (m Mat4) Inverted() Mat4 +``` + + + + +### func \(Mat4\) [IsIdentity]() + +```go +func (m Mat4) IsIdentity() bool +``` + + + + +### func \(\*Mat4\) [LookAt]() + +```go +func (m *Mat4) LookAt(eye, center, up Vec3) +``` + + + + +### func \(\*Mat4\) [Mat3]() + +```go +func (m *Mat4) Mat3() Mat3 +``` + + + + +### func \(Mat4\) [Mat4ProjToVulkan]() + +```go +func (m Mat4) Mat4ProjToVulkan() Mat4 +``` + + + + +### func \(Mat4\) [Mat4Project]() + +```go +func (m Mat4) Mat4Project(pos Vec3, viewport Vec4) Vec3 +``` + + + + +### func \(Mat4\) [Mat4UnProject]() + +```go +func (m Mat4) Mat4UnProject(p Vec3, invViewProj Mat4, viewport Vec4) Vec3 +``` + + + + +### func \(\*Mat4\) [MultiplyAssign]() + +```go +func (a *Mat4) MultiplyAssign(b Mat4) +``` + + + + +### func \(\*Mat4\) [NegateAssign]() + +```go +func (m *Mat4) NegateAssign() +``` + + + + +### func \(\*Mat4\) [Orthographic]() + +```go +func (m *Mat4) Orthographic(left, right, bottom, top, near, far Float) +``` + + + + +### func \(\*Mat4\) [Perspective]() + +```go +func (m *Mat4) Perspective(fovy, aspect, nearVal, farVal Float) +``` + + + + +### func \(\*Mat4\) [Reset]() + +```go +func (m *Mat4) Reset() +``` + + + + +### func \(Mat4\) [Right]() + +```go +func (m Mat4) Right() Vec3 +``` + + + + +### func \(\*Mat4\) [Rotate]() + +```go +func (m *Mat4) Rotate(rotate Vec3) +``` + + + + +### func \(\*Mat4\) [RotateAngles]() + +```go +func (m *Mat4) RotateAngles(axis Vec3, angle Float) +``` + + + + +### func \(\*Mat4\) [RotateX]() + +```go +func (m *Mat4) RotateX(angles Float) +``` + + + + +### func \(\*Mat4\) [RotateY]() + +```go +func (m *Mat4) RotateY(angles Float) +``` + + + + +### func \(\*Mat4\) [RotateZ]() + +```go +func (m *Mat4) RotateZ(angles Float) +``` + + + + +### func \(Mat4\) [RowVector]() + +```go +func (m Mat4) RowVector(row int) Vec4 +``` + + + + +### func \(\*Mat4\) [Scale]() + +```go +func (m *Mat4) Scale(scale Vec3) +``` + + + + +### func \(\*Mat4\) [SetTranslation]() + +```go +func (m *Mat4) SetTranslation(translation Vec3) +``` + + + + +### func \(\*Mat4\) [SubtractAssign]() + +```go +func (m *Mat4) SubtractAssign(rhs Mat4) +``` + + + + +### func \(Mat4\) [ToQuaternion]() + +```go +func (m Mat4) ToQuaternion() Quaternion +``` + + + + +### func \(Mat4\) [TransformPoint]() + +```go +func (m Mat4) TransformPoint(point Vec3) Vec3 +``` + + + + +### func \(\*Mat4\) [Translate]() + +```go +func (m *Mat4) Translate(translation Vec3) +``` + + + + +### func \(Mat4\) [Transpose]() + +```go +func (m Mat4) Transpose() Mat4 +``` + + + + +### func \(\*Mat4\) [TransposeAssign]() + +```go +func (m *Mat4) TransposeAssign() +``` + + + + +### func \(Mat4\) [Up]() + +```go +func (m Mat4) Up() Vec3 +``` + + + + +### func \(\*Mat4\) [Zero]() + +```go +func (m *Mat4) Zero() +``` + + + + +## type [Quaternion]() + + + +```go +type Quaternion [4]Float +``` + + +### func [NewQuaternion]() + +```go +func NewQuaternion(w, x, y, z Float) Quaternion +``` + + + + +### func [QuatAngleBetween]() + +```go +func QuatAngleBetween(lhs, rhs Vec3) Quaternion +``` + + + + +### func [QuaternionAxisAngle]() + +```go +func QuaternionAxisAngle(axis Vec3, angle Float) Quaternion +``` + + + + +### func [QuaternionFromArray]() + +```go +func QuaternionFromArray(xyzw [4]Float) Quaternion +``` + + + + +### func [QuaternionFromEuler]() + +```go +func QuaternionFromEuler(v Vec3) Quaternion +``` + + + + +### func [QuaternionFromMat4]() + +```go +func QuaternionFromMat4(m Mat4) Quaternion +``` + + + + +### func [QuaternionFromSlice]() + +```go +func QuaternionFromSlice(xyzw []Float) Quaternion +``` + + + + +### func [QuaternionFromVec4]() + +```go +func QuaternionFromVec4(v Vec4) Quaternion +``` + + + + +### func [QuaternionFromXYZW]() + +```go +func QuaternionFromXYZW(xyzw [4]Float) Quaternion +``` + + + + +### func [QuaternionFromXYZWSlice]() + +```go +func QuaternionFromXYZWSlice(xyzw []Float) Quaternion +``` + + + + +### func [QuaternionIdentity]() + +```go +func QuaternionIdentity() Quaternion +``` + + + + +### func [QuaternionLerp]() + +```go +func QuaternionLerp(from, to Quaternion, factor Float) Quaternion +``` + + + + +### func [QuaternionLookAt]() + +```go +func QuaternionLookAt(from, to Vec3) Quaternion +``` + + + + +### func [QuaternionSlerp]() + +```go +func QuaternionSlerp(from, to Quaternion, factor Float) Quaternion +``` + + + + +### func \(\*Quaternion\) [AddAssign]() + +```go +func (q *Quaternion) AddAssign(rhs Quaternion) +``` + + + + +### func \(\*Quaternion\) [Conjugate]() + +```go +func (q *Quaternion) Conjugate() +``` + + + + +### func \(\*Quaternion\) [Inverse]() + +```go +func (q *Quaternion) Inverse() +``` + + + + +### func \(Quaternion\) [IsZero]() + +```go +func (q Quaternion) IsZero() bool +``` + + + + +### func \(Quaternion\) [Multiply]() + +```go +func (q Quaternion) Multiply(rhs Quaternion) Quaternion +``` + + + + +### func \(\*Quaternion\) [MultiplyAssign]() + +```go +func (q *Quaternion) MultiplyAssign(rhs Quaternion) +``` + + + + +### func \(Quaternion\) [MultiplyVec3]() + +```go +func (q Quaternion) MultiplyVec3(rhs Vec3) Vec3 +``` + + + + +### func \(Quaternion\) [Normal]() + +```go +func (q Quaternion) Normal() Quaternion +``` + + + + +### func \(\*Quaternion\) [Normalize]() + +```go +func (q *Quaternion) Normalize() +``` + + + + +### func \(Quaternion\) [ToEuler]() + +```go +func (q Quaternion) ToEuler() Vec3 +``` + + + + +### func \(Quaternion\) [ToMat4]() + +```go +func (q Quaternion) ToMat4() Mat4 +``` + + + + +### func \(Quaternion\) [W]() + +```go +func (q Quaternion) W() Float +``` + + + + +### func \(Quaternion\) [X]() + +```go +func (q Quaternion) X() Float +``` + + + + +### func \(Quaternion\) [Y]() + +```go +func (q Quaternion) Y() Float +``` + + + + +### func \(Quaternion\) [Z]() + +```go +func (q Quaternion) Z() Float +``` + + + + +## type [QuaternionComponent]() + + + +```go +type QuaternionComponent = int +``` + + + +```go +const ( + Qw QuaternionComponent = iota + Qx + Qy + Qz +) +``` + + +## type [Transform]() + + + +```go +type Transform struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*Transform\) [AddPosition]() + +```go +func (t *Transform) AddPosition(add Vec3) +``` + + + + +### func \(\*Transform\) [AddRotation]() + +```go +func (t *Transform) AddRotation(add Vec3) +``` + + + + +### func \(\*Transform\) [AddScale]() + +```go +func (t *Transform) AddScale(add Vec3) +``` + + + + +### func \(\*Transform\) [ContainsPoint]() + +```go +func (t *Transform) ContainsPoint(point Vec3) bool +``` + + + + +### func \(\*Transform\) [ContainsPoint2D]() + +```go +func (t *Transform) ContainsPoint2D(point Vec2) bool +``` + + + + +### func \(\*Transform\) [Copy]() + +```go +func (t *Transform) Copy(other Transform) +``` + + + + +### func \(\*Transform\) [Forward]() + +```go +func (t *Transform) Forward() Vec3 +``` + + + + +### func \(\*Transform\) [Initialize]() + +```go +func (t *Transform) Initialize(workGroup *concurrent.WorkGroup) +``` + + + + +### func \(\*Transform\) [InverseWorldMatrix]() + +```go +func (t *Transform) InverseWorldMatrix() Mat4 +``` + + + + +### func \(\*Transform\) [IsDirty]() + +```go +func (t *Transform) IsDirty() bool +``` + + + + +### func \(\*Transform\) [LocalPosition]() + +```go +func (t *Transform) LocalPosition() Vec3 +``` + + + + +### func \(\*Transform\) [LookAt]() + +```go +func (t *Transform) LookAt(point Vec3) +``` + + + + +### func \(\*Transform\) [Matrix]() + +```go +func (t *Transform) Matrix() Mat4 +``` + + + + +### func \(\*Transform\) [Parent]() + +```go +func (t *Transform) Parent() *Transform +``` + + + + +### func \(\*Transform\) [Position]() + +```go +func (t *Transform) Position() Vec3 +``` + + + + +### func \(\*Transform\) [ResetDirty]() + +```go +func (t *Transform) ResetDirty() +``` + + + + +### func \(\*Transform\) [Right]() + +```go +func (t *Transform) Right() Vec3 +``` + + + + +### func \(\*Transform\) [Rotation]() + +```go +func (t *Transform) Rotation() Vec3 +``` + + + + +### func \(\*Transform\) [Scale]() + +```go +func (t *Transform) Scale() Vec3 +``` + + + + +### func \(\*Transform\) [ScaleWithoutChildren]() + +```go +func (t *Transform) ScaleWithoutChildren(scale Vec3) +``` + +ScaleWithoutChildren will scale a transform without changing the world scale of the children of this transform. That is to say, it will update all the child transform scales to return to their original world scale after scaling this transform. + + +### func \(\*Transform\) [SetChildrenOrdered]() + +```go +func (t *Transform) SetChildrenOrdered() +``` + + + + +### func \(\*Transform\) [SetChildrenUnordered]() + +```go +func (t *Transform) SetChildrenUnordered() +``` + + + + +### func \(\*Transform\) [SetDirty]() + +```go +func (t *Transform) SetDirty() +``` + + + + +### func \(\*Transform\) [SetLocalPosition]() + +```go +func (t *Transform) SetLocalPosition(position Vec3) +``` + + + + +### func \(\*Transform\) [SetParent]() + +```go +func (t *Transform) SetParent(parent *Transform) +``` + + + + +### func \(\*Transform\) [SetPosition]() + +```go +func (t *Transform) SetPosition(position Vec3) +``` + + + + +### func \(\*Transform\) [SetRotation]() + +```go +func (t *Transform) SetRotation(rotation Vec3) +``` + + + + +### func \(\*Transform\) [SetScale]() + +```go +func (t *Transform) SetScale(scale Vec3) +``` + + + + +### func \(\*Transform\) [SetWorldPosition]() + +```go +func (t *Transform) SetWorldPosition(position Vec3) +``` + + + + +### func \(\*Transform\) [SetWorldRotation]() + +```go +func (t *Transform) SetWorldRotation(rotation Vec3) +``` + + + + +### func \(\*Transform\) [SetWorldScale]() + +```go +func (t *Transform) SetWorldScale(scale Vec3) +``` + + + + +### func \(\*Transform\) [SetupRawTransform]() + +```go +func (t *Transform) SetupRawTransform() +``` + + + + +### func \(\*Transform\) [Up]() + +```go +func (t *Transform) Up() Vec3 +``` + + + + +### func \(\*Transform\) [WorldMatrix]() + +```go +func (t *Transform) WorldMatrix() Mat4 +``` + + + + +### func \(\*Transform\) [WorldPosition]() + +```go +func (t *Transform) WorldPosition() Vec3 +``` + + + + +### func \(\*Transform\) [WorldRotation]() + +```go +func (t *Transform) WorldRotation() Vec3 +``` + + + + +### func \(\*Transform\) [WorldScale]() + +```go +func (t *Transform) WorldScale() Vec3 +``` + + + + +### func \(\*Transform\) [WorldTransform]() + +```go +func (t *Transform) WorldTransform() (Vec3, Vec3, Vec3) +``` + + + + +## type [Vec2]() + + + +```go +type Vec2 [2]Float +``` + + +### func [NewVec2]() + +```go +func NewVec2(x, y Float) Vec2 +``` + + + + +### func [Vec2Down]() + +```go +func Vec2Down() Vec2 +``` + + + + +### func [Vec2FromArray]() + +```go +func Vec2FromArray(a [2]Float) Vec2 +``` + + + + +### func [Vec2FromSlice]() + +```go +func Vec2FromSlice(a []Float) Vec2 +``` + + + + +### func [Vec2FromString]() + +```go +func Vec2FromString(str string) Vec2 +``` + + + + +### func [Vec2Half]() + +```go +func Vec2Half() Vec2 +``` + + + + +### func [Vec2Largest]() + +```go +func Vec2Largest() Vec2 +``` + + + + +### func [Vec2Left]() + +```go +func Vec2Left() Vec2 +``` + + + + +### func [Vec2Lerp]() + +```go +func Vec2Lerp(from, to Vec2, t Float) Vec2 +``` + + + + +### func [Vec2Max]() + +```go +func Vec2Max(a, b Vec2) Vec2 +``` + + + + +### func [Vec2MaxAbs]() + +```go +func Vec2MaxAbs(a, b Vec2) Vec2 +``` + + + + +### func [Vec2Min]() + +```go +func Vec2Min(a, b Vec2) Vec2 +``` + + + + +### func [Vec2MinAbs]() + +```go +func Vec2MinAbs(a, b Vec2) Vec2 +``` + + + + +### func [Vec2One]() + +```go +func Vec2One() Vec2 +``` + + + + +### func [Vec2Right]() + +```go +func Vec2Right() Vec2 +``` + + + + +### func [Vec2Up]() + +```go +func Vec2Up() Vec2 +``` + + + + +### func [Vec2Zero]() + +```go +func Vec2Zero() Vec2 +``` + + + + +### func \(Vec2\) [Abs]() + +```go +func (v Vec2) Abs() Vec2 +``` + + + + +### func \(Vec2\) [Add]() + +```go +func (v Vec2) Add(other Vec2) Vec2 +``` + + + + +### func \(\*Vec2\) [AddAssign]() + +```go +func (v *Vec2) AddAssign(other Vec2) +``` + + + + +### func \(Vec2\) [Angle]() + +```go +func (v Vec2) Angle(other Vec2) Float +``` + + + + +### func \(Vec2\) [AsVec2i]() + +```go +func (v Vec2) AsVec2i() Vec2i +``` + + + + +### func \(\*Vec2\) [AsVec3]() + +```go +func (v *Vec2) AsVec3() Vec3 +``` + + + + +### func \(Vec2\) [Distance]() + +```go +func (v Vec2) Distance(other Vec2) Float +``` + + + + +### func \(Vec2\) [Divide]() + +```go +func (v Vec2) Divide(other Vec2) Vec2 +``` + + + + +### func \(\*Vec2\) [DivideAssign]() + +```go +func (v *Vec2) DivideAssign(other Vec2) +``` + + + + +### func \(Vec2\) [Equals]() + +```go +func (v Vec2) Equals(other Vec2) bool +``` + + + + +### func \(Vec2\) [Height]() + +```go +func (v Vec2) Height() Float +``` + + + + +### func \(\*Vec2\) [Inverse]() + +```go +func (v *Vec2) Inverse() +``` + + + + +### func \(Vec2\) [LargestAxis]() + +```go +func (v Vec2) LargestAxis() Float +``` + + + + +### func \(Vec2\) [LargestAxisDelta]() + +```go +func (v Vec2) LargestAxisDelta() Float +``` + + + + +### func \(Vec2\) [Length]() + +```go +func (v Vec2) Length() Float +``` + + + + +### func \(Vec2\) [Multiply]() + +```go +func (v Vec2) Multiply(other Vec2) Vec2 +``` + + + + +### func \(\*Vec2\) [MultiplyAssign]() + +```go +func (v *Vec2) MultiplyAssign(other Vec2) +``` + + + + +### func \(Vec2\) [Negative]() + +```go +func (v Vec2) Negative() Vec2 +``` + + + + +### func \(Vec2\) [Normal]() + +```go +func (v Vec2) Normal() Vec2 +``` + + + + +### func \(\*Vec2\) [Normalize]() + +```go +func (v *Vec2) Normalize() +``` + + + + +### func \(\*Vec2\) [PX]() + +```go +func (v *Vec2) PX() *Float +``` + + + + +### func \(\*Vec2\) [PY]() + +```go +func (v *Vec2) PY() *Float +``` + + + + +### func \(Vec2\) [Scale]() + +```go +func (v Vec2) Scale(scalar Float) Vec2 +``` + + + + +### func \(\*Vec2\) [ScaleAssign]() + +```go +func (v *Vec2) ScaleAssign(scalar Float) +``` + + + + +### func \(\*Vec2\) [SetHeight]() + +```go +func (v *Vec2) SetHeight(y Float) +``` + + + + +### func \(\*Vec2\) [SetWidth]() + +```go +func (v *Vec2) SetWidth(x Float) +``` + + + + +### func \(\*Vec2\) [SetX]() + +```go +func (v *Vec2) SetX(x Float) +``` + + + + +### func \(\*Vec2\) [SetY]() + +```go +func (v *Vec2) SetY(y Float) +``` + + + + +### func \(Vec2\) [Shrink]() + +```go +func (v Vec2) Shrink(scalar Float) Vec2 +``` + + + + +### func \(\*Vec2\) [ShrinkAssign]() + +```go +func (v *Vec2) ShrinkAssign(scalar Float) +``` + + + + +### func \(Vec2\) [String]() + +```go +func (v Vec2) String() string +``` + + + + +### func \(Vec2\) [Subtract]() + +```go +func (v Vec2) Subtract(other Vec2) Vec2 +``` + + + + +### func \(\*Vec2\) [SubtractAssign]() + +```go +func (v *Vec2) SubtractAssign(other Vec2) +``` + + + + +### func \(Vec2\) [Width]() + +```go +func (v Vec2) Width() Float +``` + + + + +### func \(Vec2\) [X]() + +```go +func (v Vec2) X() Float +``` + + + + +### func \(Vec2\) [XY]() + +```go +func (v Vec2) XY() (Float, Float) +``` + + + + +### func \(Vec2\) [Y]() + +```go +func (v Vec2) Y() Float +``` + + + + +## type [Vec2i]() + + + +```go +type Vec2i [2]int32 +``` + + +### func \(Vec2i\) [Height]() + +```go +func (v Vec2i) Height() int32 +``` + + + + +### func \(\*Vec2i\) [SetHeight]() + +```go +func (v *Vec2i) SetHeight(height int32) +``` + + + + +### func \(\*Vec2i\) [SetWidth]() + +```go +func (v *Vec2i) SetWidth(width int32) +``` + + + + +### func \(\*Vec2i\) [SetX]() + +```go +func (v *Vec2i) SetX(x int32) +``` + + + + +### func \(\*Vec2i\) [SetY]() + +```go +func (v *Vec2i) SetY(y int32) +``` + + + + +### func \(Vec2i\) [Width]() + +```go +func (v Vec2i) Width() int32 +``` + + + + +### func \(Vec2i\) [X]() + +```go +func (v Vec2i) X() int32 +``` + + + + +### func \(Vec2i\) [Y]() + +```go +func (v Vec2i) Y() int32 +``` + + + + +## type [Vec3]() + + + +```go +type Vec3 [3]Float +``` + + +### func [Mat4ToScreenSpace]() + +```go +func Mat4ToScreenSpace(pos Vec3, view, projection Mat4, viewport Vec4) (Vec3, bool) +``` + + + + +### func [NewVec3]() + +```go +func NewVec3(x, y, z Float) Vec3 +``` + + + + +### func [NewVec3XYZ]() + +```go +func NewVec3XYZ(xyz Float) Vec3 +``` + + + + +### func [Vec3Abs]() + +```go +func Vec3Abs(v Vec3) Vec3 +``` + + + + +### func [Vec3Backward]() + +```go +func Vec3Backward() Vec3 +``` + + + + +### func [Vec3Cross]() + +```go +func Vec3Cross(v, other Vec3) Vec3 +``` + + + + +### func [Vec3Down]() + +```go +func Vec3Down() Vec3 +``` + + + + +### func [Vec3Forward]() + +```go +func Vec3Forward() Vec3 +``` + + + + +### func [Vec3FromArray]() + +```go +func Vec3FromArray(a [3]Float) Vec3 +``` + + + + +### func [Vec3FromSlice]() + +```go +func Vec3FromSlice(a []Float) Vec3 +``` + + + + +### func [Vec3FromString]() + +```go +func Vec3FromString(str string) Vec3 +``` + + + + +### func [Vec3Half]() + +```go +func Vec3Half() Vec3 +``` + + + + +### func [Vec3Inf]() + +```go +func Vec3Inf(sign int) Vec3 +``` + + + + +### func [Vec3Largest]() + +```go +func Vec3Largest() Vec3 +``` + + + + +### func [Vec3Left]() + +```go +func Vec3Left() Vec3 +``` + + + + +### func [Vec3Lerp]() + +```go +func Vec3Lerp(from, to Vec3, t Float) Vec3 +``` + + + + +### func [Vec3Max]() + +```go +func Vec3Max(v ...Vec3) Vec3 +``` + + + + +### func [Vec3MaxAbs]() + +```go +func Vec3MaxAbs(v ...Vec3) Vec3 +``` + + + + +### func [Vec3Min]() + +```go +func Vec3Min(v ...Vec3) Vec3 +``` + + + + +### func [Vec3MinAbs]() + +```go +func Vec3MinAbs(v ...Vec3) Vec3 +``` + + + + +### func [Vec3NaN]() + +```go +func Vec3NaN() Vec3 +``` + + + + +### func [Vec3One]() + +```go +func Vec3One() Vec3 +``` + + + + +### func [Vec3Right]() + +```go +func Vec3Right() Vec3 +``` + + + + +### func [Vec3Up]() + +```go +func Vec3Up() Vec3 +``` + + + + +### func [Vec3Zero]() + +```go +func Vec3Zero() Vec3 +``` + + + + +### func \(Vec3\) [Abs]() + +```go +func (v Vec3) Abs() Vec3 +``` + + + + +### func \(Vec3\) [Add]() + +```go +func (v Vec3) Add(other Vec3) Vec3 +``` + + + + +### func \(\*Vec3\) [AddAssign]() + +```go +func (v *Vec3) AddAssign(other Vec3) +``` + + + + +### func \(\*Vec3\) [AddX]() + +```go +func (v *Vec3) AddX(x Float) +``` + + + + +### func \(\*Vec3\) [AddY]() + +```go +func (v *Vec3) AddY(y Float) +``` + + + + +### func \(\*Vec3\) [AddZ]() + +```go +func (v *Vec3) AddZ(z Float) +``` + + + + +### func \(Vec3\) [Angle]() + +```go +func (v Vec3) Angle(other Vec3) Float +``` + + + + +### func \(Vec3\) [AsAligned16]() + +```go +func (v Vec3) AsAligned16() [4]Float +``` + + + + +### func \(Vec3\) [AsVec2]() + +```go +func (v Vec3) AsVec2() Vec2 +``` + + + + +### func \(Vec3\) [AsVec3i]() + +```go +func (v Vec3) AsVec3i() Vec3i +``` + + + + +### func \(Vec3\) [AsVec4]() + +```go +func (v Vec3) AsVec4() Vec4 +``` + + + + +### func \(Vec3\) [AsVec4WithW]() + +```go +func (v Vec3) AsVec4WithW(w Float) Vec4 +``` + + + + +### func \(Vec3\) [Depth]() + +```go +func (v Vec3) Depth() Float +``` + + + + +### func \(Vec3\) [Distance]() + +```go +func (v Vec3) Distance(other Vec3) Float +``` + + + + +### func \(Vec3\) [Divide]() + +```go +func (v Vec3) Divide(other Vec3) Vec3 +``` + + + + +### func \(\*Vec3\) [DivideAssign]() + +```go +func (v *Vec3) DivideAssign(other Vec3) +``` + + + + +### func \(Vec3\) [Equals]() + +```go +func (v Vec3) Equals(other Vec3) bool +``` + + + + +### func \(Vec3\) [Height]() + +```go +func (v Vec3) Height() Float +``` + + + + +### func \(\*Vec3\) [Inverse]() + +```go +func (v *Vec3) Inverse() +``` + + + + +### func \(Vec3\) [IsInf]() + +```go +func (v Vec3) IsInf(sign int) bool +``` + + + + +### func \(Vec3\) [IsNaN]() + +```go +func (v Vec3) IsNaN() bool +``` + + + + +### func \(Vec3\) [IsZero]() + +```go +func (v Vec3) IsZero() bool +``` + + + + +### func \(Vec3\) [LargestAxis]() + +```go +func (v Vec3) LargestAxis() Float +``` + + + + +### func \(Vec3\) [LargestAxisDelta]() + +```go +func (v Vec3) LargestAxisDelta() Float +``` + + + + +### func \(Vec3\) [Length]() + +```go +func (v Vec3) Length() Float +``` + + + + +### func \(Vec3\) [LengthSquared]() + +```go +func (v Vec3) LengthSquared() Float +``` + + + + +### func \(Vec3\) [LongestAxis]() + +```go +func (v Vec3) LongestAxis() int +``` + + + + +### func \(Vec3\) [LongestAxisValue]() + +```go +func (v Vec3) LongestAxisValue() Float +``` + + + + +### func \(Vec3\) [Multiply]() + +```go +func (v Vec3) Multiply(other Vec3) Vec3 +``` + + + + +### func \(\*Vec3\) [MultiplyAssign]() + +```go +func (v *Vec3) MultiplyAssign(other Vec3) +``` + + + + +### func \(Vec3\) [MultiplyMat3]() + +```go +func (v Vec3) MultiplyMat3(rhs Mat3) Vec3 +``` + + + + +### func \(Vec3\) [Negative]() + +```go +func (v Vec3) Negative() Vec3 +``` + + + + +### func \(Vec3\) [Normal]() + +```go +func (v Vec3) Normal() Vec3 +``` + + + + +### func \(\*Vec3\) [Normalize]() + +```go +func (v *Vec3) Normalize() +``` + + + + +### func \(Vec3\) [Orthogonal]() + +```go +func (v Vec3) Orthogonal() Vec3 +``` + + + + +### func \(\*Vec3\) [PX]() + +```go +func (v *Vec3) PX() *Float +``` + + + + +### func \(\*Vec3\) [PY]() + +```go +func (v *Vec3) PY() *Float +``` + + + + +### func \(\*Vec3\) [PZ]() + +```go +func (v *Vec3) PZ() *Float +``` + + + + +### func \(Vec3\) [Scale]() + +```go +func (v Vec3) Scale(scalar Float) Vec3 +``` + + + + +### func \(\*Vec3\) [ScaleAssign]() + +```go +func (v *Vec3) ScaleAssign(scalar Float) +``` + + + + +### func \(\*Vec3\) [ScaleX]() + +```go +func (v *Vec3) ScaleX(s Float) +``` + + + + +### func \(\*Vec3\) [ScaleY]() + +```go +func (v *Vec3) ScaleY(s Float) +``` + + + + +### func \(\*Vec3\) [ScaleZ]() + +```go +func (v *Vec3) ScaleZ(s Float) +``` + + + + +### func \(\*Vec3\) [SetX]() + +```go +func (v *Vec3) SetX(x Float) +``` + + + + +### func \(\*Vec3\) [SetY]() + +```go +func (v *Vec3) SetY(y Float) +``` + + + + +### func \(\*Vec3\) [SetZ]() + +```go +func (v *Vec3) SetZ(z Float) +``` + + + + +### func \(Vec3\) [Shrink]() + +```go +func (v Vec3) Shrink(scalar Float) Vec3 +``` + + + + +### func \(\*Vec3\) [ShrinkAssign]() + +```go +func (v *Vec3) ShrinkAssign(scalar Float) +``` + + + + +### func \(Vec3\) [SignedAngle]() + +```go +func (v Vec3) SignedAngle(other Vec3, axis Vec3) Float +``` + +SignedAngle returns the signed angle \(in radians\) from v to other around the given axis. The sign is positive for counterclockwise rotation when looking along the axis direction. Assumes non\-zero vectors; returns 0 if v or other is zero\-length or they are equal. For best precision, normalize v, other, and axis before calling if they aren't already. + + +### func \(Vec3\) [SquareDistance]() + +```go +func (v Vec3) SquareDistance(b Vec3) Float +``` + + + + +### func \(Vec3\) [String]() + +```go +func (v Vec3) String() string +``` + + + + +### func \(Vec3\) [Subtract]() + +```go +func (v Vec3) Subtract(other Vec3) Vec3 +``` + + + + +### func \(\*Vec3\) [SubtractAssign]() + +```go +func (v *Vec3) SubtractAssign(other Vec3) +``` + + + + +### func \(Vec3\) [Width]() + +```go +func (v Vec3) Width() Float +``` + + + + +### func \(Vec3\) [X]() + +```go +func (v Vec3) X() Float +``` + + + + +### func \(Vec3\) [XY]() + +```go +func (v Vec3) XY() Vec2 +``` + + + + +### func \(Vec3\) [XYZ]() + +```go +func (v Vec3) XYZ() (Float, Float, Float) +``` + + + + +### func \(Vec3\) [XZ]() + +```go +func (v Vec3) XZ() Vec2 +``` + + + + +### func \(Vec3\) [Y]() + +```go +func (v Vec3) Y() Float +``` + + + + +### func \(Vec3\) [Z]() + +```go +func (v Vec3) Z() Float +``` + + + + +## type [Vec3MinMax]() + + + +```go +type Vec3MinMax struct { + Min Vec3 + Max Vec3 +} +``` + + +### func [NewVec3MinMax]() + +```go +func NewVec3MinMax() Vec3MinMax +``` + + + + +## type [Vec3i]() + + + +```go +type Vec3i [3]int32 +``` + + +### func \(Vec3i\) [Depth]() + +```go +func (v Vec3i) Depth() int32 +``` + + + + +### func \(Vec3i\) [Height]() + +```go +func (v Vec3i) Height() int32 +``` + + + + +### func \(\*Vec3i\) [SetDepth]() + +```go +func (v *Vec3i) SetDepth(depth int32) +``` + + + + +### func \(\*Vec3i\) [SetHeight]() + +```go +func (v *Vec3i) SetHeight(height int32) +``` + + + + +### func \(\*Vec3i\) [SetWidth]() + +```go +func (v *Vec3i) SetWidth(width int32) +``` + + + + +### func \(\*Vec3i\) [SetX]() + +```go +func (v *Vec3i) SetX(x int32) +``` + + + + +### func \(\*Vec3i\) [SetY]() + +```go +func (v *Vec3i) SetY(y int32) +``` + + + + +### func \(\*Vec3i\) [SetZ]() + +```go +func (v *Vec3i) SetZ(z int32) +``` + + + + +### func \(Vec3i\) [Width]() + +```go +func (v Vec3i) Width() int32 +``` + + + + +### func \(Vec3i\) [X]() + +```go +func (v Vec3i) X() int32 +``` + + + + +### func \(Vec3i\) [Y]() + +```go +func (v Vec3i) Y() int32 +``` + + + + +### func \(Vec3i\) [Z]() + +```go +func (v Vec3i) Z() int32 +``` + + + + +## type [Vec4]() + + + +```go +type Vec4 [4]Float +``` + + +### func [Mat4MultiplyVec4]() + +```go +func Mat4MultiplyVec4(a Mat4, b Vec4) Vec4 +``` + + + + +### func [NewVec4]() + +```go +func NewVec4(x, y, z, w Float) Vec4 +``` + + + + +### func [Vec4Area]() + +```go +func Vec4Area(xa, ya, xb, yb Float) Vec4 +``` + + + + +### func [Vec4FromArray]() + +```go +func Vec4FromArray(a [4]Float) Vec4 +``` + + + + +### func [Vec4FromSlice]() + +```go +func Vec4FromSlice(a []Float) Vec4 +``` + + + + +### func [Vec4FromString]() + +```go +func Vec4FromString(str string) Vec4 +``` + + + + +### func [Vec4Half]() + +```go +func Vec4Half() Vec4 +``` + + + + +### func [Vec4Largest]() + +```go +func Vec4Largest() Vec4 +``` + + + + +### func [Vec4Lerp]() + +```go +func Vec4Lerp(from, to Vec4, t Float) Vec4 +``` + + + + +### func [Vec4Max]() + +```go +func Vec4Max(a, b Vec4) Vec4 +``` + + + + +### func [Vec4MaxAbs]() + +```go +func Vec4MaxAbs(a, b Vec4) Vec4 +``` + + + + +### func [Vec4Min]() + +```go +func Vec4Min(a, b Vec4) Vec4 +``` + + + + +### func [Vec4MinAbs]() + +```go +func Vec4MinAbs(a, b Vec4) Vec4 +``` + + + + +### func [Vec4MultiplyMat4]() + +```go +func Vec4MultiplyMat4(v Vec4, m Mat4) Vec4 +``` + + + + +### func [Vec4One]() + +```go +func Vec4One() Vec4 +``` + + + + +### func [Vec4Zero]() + +```go +func Vec4Zero() Vec4 +``` + + + + +### func \(Vec4\) [Abs]() + +```go +func (v Vec4) Abs() Vec4 +``` + + + + +### func \(Vec4\) [Add]() + +```go +func (v Vec4) Add(other Vec4) Vec4 +``` + + + + +### func \(\*Vec4\) [AddAssign]() + +```go +func (v *Vec4) AddAssign(other Vec4) +``` + + + + +### func \(Vec4\) [Angle]() + +```go +func (v Vec4) Angle(other Vec4) Float +``` + + + + +### func \(Vec4\) [AreaContains]() + +```go +func (v Vec4) AreaContains(x, y Float) bool +``` + + + + +### func \(Vec4\) [AsVec3]() + +```go +func (v Vec4) AsVec3() Vec3 +``` + + + + +### func \(Vec4\) [AsVec4i]() + +```go +func (v Vec4) AsVec4i() Vec4i +``` + + + + +### func \(Vec4\) [Bottom]() + +```go +func (v Vec4) Bottom() Float +``` + + + + +### func \(Vec4\) [BoxContains]() + +```go +func (v Vec4) BoxContains(x, y Float) bool +``` + + + + +### func \(Vec4\) [Distance]() + +```go +func (v Vec4) Distance(other Vec4) Float +``` + + + + +### func \(Vec4\) [Divide]() + +```go +func (v Vec4) Divide(other Vec4) Vec4 +``` + + + + +### func \(\*Vec4\) [DivideAssign]() + +```go +func (v *Vec4) DivideAssign(other Vec4) +``` + + + + +### func \(Vec4\) [Equals]() + +```go +func (v Vec4) Equals(other Vec4) bool +``` + + + + +### func \(Vec4\) [Height]() + +```go +func (v Vec4) Height() Float +``` + + + + +### func \(Vec4\) [Horizontal]() + +```go +func (v Vec4) Horizontal() Float +``` + + + + +### func \(\*Vec4\) [Inverse]() + +```go +func (v *Vec4) Inverse() +``` + + + + +### func \(Vec4\) [LargestAxis]() + +```go +func (v Vec4) LargestAxis() Float +``` + + + + +### func \(Vec4\) [LargestAxisDelta]() + +```go +func (v Vec4) LargestAxisDelta() Float +``` + + + + +### func \(Vec4\) [Left]() + +```go +func (v Vec4) Left() Float +``` + + + + +### func \(Vec4\) [Length]() + +```go +func (v Vec4) Length() Float +``` + + + + +### func \(Vec4\) [Multiply]() + +```go +func (v Vec4) Multiply(other Vec4) Vec4 +``` + + + + +### func \(\*Vec4\) [MultiplyAssign]() + +```go +func (v *Vec4) MultiplyAssign(other Vec4) +``` + + + + +### func \(Vec4\) [Negative]() + +```go +func (v Vec4) Negative() Vec4 +``` + + + + +### func \(Vec4\) [Normal]() + +```go +func (v Vec4) Normal() Vec4 +``` + + + + +### func \(\*Vec4\) [Normalize]() + +```go +func (v *Vec4) Normalize() +``` + + + + +### func \(\*Vec4\) [PW]() + +```go +func (v *Vec4) PW() *Float +``` + + + + +### func \(\*Vec4\) [PX]() + +```go +func (v *Vec4) PX() *Float +``` + + + + +### func \(\*Vec4\) [PY]() + +```go +func (v *Vec4) PY() *Float +``` + + + + +### func \(\*Vec4\) [PZ]() + +```go +func (v *Vec4) PZ() *Float +``` + + + + +### func \(Vec4\) [Right]() + +```go +func (v Vec4) Right() Float +``` + + + + +### func \(Vec4\) [Scale]() + +```go +func (v Vec4) Scale(scalar Float) Vec4 +``` + + + + +### func \(\*Vec4\) [ScaleAssign]() + +```go +func (v *Vec4) ScaleAssign(scalar Float) +``` + + + + +### func \(Vec4\) [ScreenAreaContains]() + +```go +func (v Vec4) ScreenAreaContains(x, y Float) bool +``` + + + + +### func \(\*Vec4\) [SetBottom]() + +```go +func (v *Vec4) SetBottom(w Float) +``` + + + + +### func \(\*Vec4\) [SetHeight]() + +```go +func (v *Vec4) SetHeight(w Float) +``` + + + + +### func \(\*Vec4\) [SetLeft]() + +```go +func (v *Vec4) SetLeft(x Float) +``` + + + + +### func \(\*Vec4\) [SetRight]() + +```go +func (v *Vec4) SetRight(z Float) +``` + + + + +### func \(\*Vec4\) [SetTop]() + +```go +func (v *Vec4) SetTop(y Float) +``` + + + + +### func \(\*Vec4\) [SetW]() + +```go +func (v *Vec4) SetW(w Float) +``` + + + + +### func \(\*Vec4\) [SetWidth]() + +```go +func (v *Vec4) SetWidth(z Float) +``` + + + + +### func \(\*Vec4\) [SetX]() + +```go +func (v *Vec4) SetX(x Float) +``` + + + + +### func \(\*Vec4\) [SetY]() + +```go +func (v *Vec4) SetY(y Float) +``` + + + + +### func \(\*Vec4\) [SetZ]() + +```go +func (v *Vec4) SetZ(z Float) +``` + + + + +### func \(Vec4\) [Shrink]() + +```go +func (v Vec4) Shrink(scalar Float) Vec4 +``` + + + + +### func \(\*Vec4\) [ShrinkAssign]() + +```go +func (v *Vec4) ShrinkAssign(scalar Float) +``` + + + + +### func \(Vec4\) [String]() + +```go +func (v Vec4) String() string +``` + + + + +### func \(Vec4\) [Subtract]() + +```go +func (v Vec4) Subtract(other Vec4) Vec4 +``` + + + + +### func \(\*Vec4\) [SubtractAssign]() + +```go +func (v *Vec4) SubtractAssign(other Vec4) +``` + + + + +### func \(Vec4\) [Top]() + +```go +func (v Vec4) Top() Float +``` + + + + +### func \(Vec4\) [Vertical]() + +```go +func (v Vec4) Vertical() Float +``` + + + + +### func \(Vec4\) [W]() + +```go +func (v Vec4) W() Float +``` + + + + +### func \(Vec4\) [Width]() + +```go +func (v Vec4) Width() Float +``` + + + + +### func \(Vec4\) [X]() + +```go +func (v Vec4) X() Float +``` + + + + +### func \(Vec4\) [XYZW]() + +```go +func (v Vec4) XYZW() (Float, Float, Float, Float) +``` + + + + +### func \(Vec4\) [Y]() + +```go +func (v Vec4) Y() Float +``` + + + + +### func \(Vec4\) [Z]() + +```go +func (v Vec4) Z() Float +``` + + + + +## type [Vec4i]() + + + +```go +type Vec4i [4]int32 +``` + + +### func \(Vec4i\) [Height]() + +```go +func (v Vec4i) Height() int32 +``` + + + + +### func \(Vec4i\) [W]() + +```go +func (v Vec4i) W() int32 +``` + + + + +### func \(Vec4i\) [Width]() + +```go +func (v Vec4i) Width() int32 +``` + + + + +### func \(Vec4i\) [X]() + +```go +func (v Vec4i) X() int32 +``` + + + + +### func \(Vec4i\) [Y]() + +```go +func (v Vec4i) Y() int32 +``` + + + + +### func \(Vec4i\) [Z]() + +```go +func (v Vec4i) Z() int32 +``` + + + + +## type [VectorComponent]() + + + +```go +type VectorComponent = int +``` + + + +```go +const ( + Vx VectorComponent = iota + Vy + Vz + Vw +) +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/plugins.md b/docs/api/plugins.md new file mode 100644 index 000000000..dff1e65ed --- /dev/null +++ b/docs/api/plugins.md @@ -0,0 +1,67 @@ + + +# plugins + +```go +import "kaijuengine.com/plugins" +``` + +## Index + +- [Variables](<#variables>) +- [func RegenerateAPI\(\) error](<#RegenerateAPI>) +- [type LuaVM](<#LuaVM>) + - [func LaunchPlugins\(adb assets.Database, path string\) \(\[\]\*LuaVM, error\)](<#LaunchPlugins>) + - [func \(vm \*LuaVM\) InvokeGlobalFunction\(name string\)](<#LuaVM.InvokeGlobalFunction>) + + +## Variables + + + +```go +var ( + GamePluginRegistry = []reflect.Type{} +) +``` + + +## func [RegenerateAPI]() + +```go +func RegenerateAPI() error +``` + + + + +## type [LuaVM]() + + + +```go +type LuaVM struct { + PluginPath string + // contains filtered or unexported fields +} +``` + + +### func [LaunchPlugins]() + +```go +func LaunchPlugins(adb assets.Database, path string) ([]*LuaVM, error) +``` + + + + +### func \(\*LuaVM\) [InvokeGlobalFunction]() + +```go +func (vm *LuaVM) InvokeGlobalFunction(name string) +``` + + + +Generated by [gomarkdoc]() diff --git a/docs/api/rendering.md b/docs/api/rendering.md new file mode 100644 index 000000000..1e606bf6c --- /dev/null +++ b/docs/api/rendering.md @@ -0,0 +1,8235 @@ + + +# rendering + +```go +import "kaijuengine.com/rendering" +``` + +## Index + +- [Constants](<#constants>) +- [Variables](<#variables>) +- [func SetupLightMaterials\(materialCache \*MaterialCache\) error](<#SetupLightMaterials>) +- [func TextureKeys\(textures \[\]\*Texture\) \[\]string](<#TextureKeys>) +- [func VertexFaceNormal\(verts \[3\]Vertex\) matrix.Vec3](<#VertexFaceNormal>) +- [type BoneTransform](<#BoneTransform>) +- [type CommandRecorder](<#CommandRecorder>) + - [func NewCommandRecorder\(device \*GPUDevice\) \(CommandRecorder, error\)](<#NewCommandRecorder>) + - [func \(c \*CommandRecorder\) Begin\(\)](<#CommandRecorder.Begin>) + - [func \(c \*CommandRecorder\) Destroy\(device \*GPUDevice\)](<#CommandRecorder.Destroy>) + - [func \(c \*CommandRecorder\) End\(\)](<#CommandRecorder.End>) + - [func \(c \*CommandRecorder\) Reset\(\)](<#CommandRecorder.Reset>) +- [type CommandRecorderSecondary](<#CommandRecorderSecondary>) + - [func NewCommandRecorderSecondary\(device \*GPUDevice, rp \*RenderPass, subpassIdx int\) \(CommandRecorderSecondary, error\)](<#NewCommandRecorderSecondary>) + - [func \(c \*CommandRecorderSecondary\) Begin\(viewport vk.Viewport, scissor vk.Rect2D\)](<#CommandRecorderSecondary.Begin>) +- [type ComputeShaderBuffer](<#ComputeShaderBuffer>) + - [func \(b \*ComputeShaderBuffer\) Initialize\(device \*GPUDevice, size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags\) error](<#ComputeShaderBuffer.Initialize>) + - [func \(b \*ComputeShaderBuffer\) WriteDescriptors\(device \*GPUDevice\)](<#ComputeShaderBuffer.WriteDescriptors>) +- [type ComputeTask](<#ComputeTask>) +- [type DescriptorSetLayoutStructure](<#DescriptorSetLayoutStructure>) +- [type DescriptorSetLayoutStructureType](<#DescriptorSetLayoutStructureType>) +- [type DrawInstance](<#DrawInstance>) + - [func ReflectDuplicateDrawInstance\(target DrawInstance\) DrawInstance](<#ReflectDuplicateDrawInstance>) +- [type DrawInstanceGroup](<#DrawInstanceGroup>) + - [func NewDrawInstanceGroup\(mesh \*Mesh, dataSize int, viewCuller ViewCuller\) DrawInstanceGroup](<#NewDrawInstanceGroup>) + - [func \(d \*DrawInstanceGroup\) AddInstance\(instance DrawInstance\)](<#DrawInstanceGroup.AddInstance>) + - [func \(d \*DrawInstanceGroup\) AlterPadding\(blockSize int\)](<#DrawInstanceGroup.AlterPadding>) + - [func \(d \*DrawInstanceGroup\) AnyVisible\(\) bool](<#DrawInstanceGroup.AnyVisible>) + - [func \(d \*DrawInstanceGroup\) Clear\(\)](<#DrawInstanceGroup.Clear>) + - [func \(d \*DrawInstanceGroup\) Destroy\(device \*GPUDevice\)](<#DrawInstanceGroup.Destroy>) + - [func \(d \*DrawInstanceGroup\) IsEmpty\(\) bool](<#DrawInstanceGroup.IsEmpty>) + - [func \(d \*DrawInstanceGroup\) IsReady\(\) bool](<#DrawInstanceGroup.IsReady>) + - [func \(d \*DrawInstanceGroup\) TotalSize\(\) int](<#DrawInstanceGroup.TotalSize>) + - [func \(d \*DrawInstanceGroup\) UpdateData\(device \*GPUDevice, frame int, lights LightsForRender\)](<#DrawInstanceGroup.UpdateData>) + - [func \(d \*DrawInstanceGroup\) VisibleCount\(\) int](<#DrawInstanceGroup.VisibleCount>) + - [func \(d \*DrawInstanceGroup\) VisibleSize\(\) int](<#DrawInstanceGroup.VisibleSize>) +- [type Drawing](<#Drawing>) + - [func \(d \*Drawing\) IsValid\(\) bool](<#Drawing.IsValid>) +- [type Drawings](<#Drawings>) + - [func NewDrawings\(\) Drawings](<#NewDrawings>) + - [func \(d \*Drawings\) AddDrawing\(drawing Drawing\)](<#Drawings.AddDrawing>) + - [func \(d \*Drawings\) AddDrawings\(drawings \[\]Drawing\)](<#Drawings.AddDrawings>) + - [func \(d \*Drawings\) Clear\(\)](<#Drawings.Clear>) + - [func \(d \*Drawings\) Destroy\(device \*GPUDevice\)](<#Drawings.Destroy>) + - [func \(d \*Drawings\) HasDrawings\(\) bool](<#Drawings.HasDrawings>) + - [func \(d \*Drawings\) PreparePending\(shadowCascades uint8\)](<#Drawings.PreparePending>) + - [func \(d \*Drawings\) Render\(device \*GPUDevice, lights LightsForRender\)](<#Drawings.Render>) +- [type FontBaseline](<#FontBaseline>) +- [type FontCache](<#FontCache>) + - [func NewFontCache\(device \*GPUDevice, assetDb assets.Database\) FontCache](<#NewFontCache>) + - [func \(cache \*FontCache\) Destroy\(\)](<#FontCache.Destroy>) + - [func \(cache \*FontCache\) EMSize\(face FontFace\) float32](<#FontCache.EMSize>) + - [func \(cache \*FontCache\) Init\(caches RenderCaches\) error](<#FontCache.Init>) + - [func \(cache \*FontCache\) LineCountWithin\(face FontFace, text string, scale, maxWidth float32\) int](<#FontCache.LineCountWithin>) + - [func \(cache \*FontCache\) MeasureCharacter\(face string, r rune, pixelSize float32\) matrix.Vec2](<#FontCache.MeasureCharacter>) + - [func \(cache \*FontCache\) MeasureString\(face FontFace, text string, scale float32\) float32](<#FontCache.MeasureString>) + - [func \(cache \*FontCache\) MeasureStringWithin\(face FontFace, text string, scale, maxWidth float32, lineHeight float32\) matrix.Vec2](<#FontCache.MeasureStringWithin>) + - [func \(cache \*FontCache\) PointOffsetWithin\(face FontFace, text string, point matrix.Vec2, scale, maxWidth float32\) int](<#FontCache.PointOffsetWithin>) + - [func \(cache \*FontCache\) PreloadFace\(face FontFace\)](<#FontCache.PreloadFace>) + - [func \(cache \*FontCache\) RenderMeshes\(caches RenderCaches, 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.RenderMeshes>) + - [func \(cache \*FontCache\) StringRectsWithinNew\(face FontFace, text string, scale, maxWidth float32\) \[\]matrix.Vec4](<#FontCache.StringRectsWithinNew>) + - [func \(cache \*FontCache\) TransparentMaterial\(target \*Material\) \*Material](<#FontCache.TransparentMaterial>) +- [type FontFace](<#FontFace>) + - [func \(f FontFace\) AsBold\(\) FontFace](<#FontFace.AsBold>) + - [func \(f FontFace\) AsExtraBold\(\) FontFace](<#FontFace.AsExtraBold>) + - [func \(f FontFace\) AsItalic\(\) FontFace](<#FontFace.AsItalic>) + - [func \(f FontFace\) AsLight\(\) FontFace](<#FontFace.AsLight>) + - [func \(f FontFace\) AsMedium\(\) FontFace](<#FontFace.AsMedium>) + - [func \(f FontFace\) AsRegular\(\) FontFace](<#FontFace.AsRegular>) + - [func \(f FontFace\) AsSemiBold\(\) FontFace](<#FontFace.AsSemiBold>) + - [func \(f FontFace\) Base\(\) FontFace](<#FontFace.Base>) + - [func \(f FontFace\) IsBold\(\) bool](<#FontFace.IsBold>) + - [func \(f FontFace\) IsExtraBold\(\) bool](<#FontFace.IsExtraBold>) + - [func \(f FontFace\) IsItalic\(\) bool](<#FontFace.IsItalic>) + - [func \(f FontFace\) RemoveBold\(\) FontFace](<#FontFace.RemoveBold>) + - [func \(f FontFace\) RemoveItalic\(\) FontFace](<#FontFace.RemoveItalic>) +- [type FontJustify](<#FontJustify>) +- [type FuncPipeline](<#FuncPipeline>) +- [type GPUAccessFlags](<#GPUAccessFlags>) +- [type GPUApplication](<#GPUApplication>) + - [func \(g \*GPUApplication\) ApplicationVersion\(\) \(major int, minor int, patch int\)](<#GPUApplication.ApplicationVersion>) + - [func \(g \*GPUApplication\) CreateInstance\(window RenderingContainer, assets assets.Database\) \(\*GPUApplicationInstance, error\)](<#GPUApplication.CreateInstance>) + - [func \(g \*GPUApplication\) Destroy\(\)](<#GPUApplication.Destroy>) + - [func \(g \*GPUApplication\) EngineVersion\(\) \(major int, minor int, patch int\)](<#GPUApplication.EngineVersion>) + - [func \(g \*GPUApplication\) FirstInstance\(\) \*GPUApplicationInstance](<#GPUApplication.FirstInstance>) + - [func \(g \*GPUApplication\) Instance\(index int\) \(\*GPUApplicationInstance, bool\)](<#GPUApplication.Instance>) + - [func \(g \*GPUApplication\) IsValid\(\) bool](<#GPUApplication.IsValid>) + - [func \(g \*GPUApplication\) Setup\(name string, version GPUApplicationVersion\)](<#GPUApplication.Setup>) +- [type GPUApplicationInstance](<#GPUApplicationInstance>) + - [func \(g \*GPUApplicationInstance\) Destroy\(\)](<#GPUApplicationInstance.Destroy>) + - [func \(g \*GPUApplicationInstance\) FinalizeLogicalDeviceSetup\(\)](<#GPUApplicationInstance.FinalizeLogicalDeviceSetup>) + - [func \(g \*GPUApplicationInstance\) Initialize\(window RenderingContainer, app \*GPUApplication, assets assets.Database\) error](<#GPUApplicationInstance.Initialize>) + - [func \(g \*GPUApplicationInstance\) PhysicalDevice\(\) \*GPUPhysicalDevice](<#GPUApplicationInstance.PhysicalDevice>) + - [func \(g \*GPUApplicationInstance\) PrimaryDevice\(\) \*GPUDevice](<#GPUApplicationInstance.PrimaryDevice>) + - [func \(g \*GPUApplicationInstance\) SelectPhysicalDevice\(method func\(options \[\]GPUPhysicalDevice\) int\) error](<#GPUApplicationInstance.SelectPhysicalDevice>) + - [func \(g \*GPUApplicationInstance\) SetupCaches\(caches RenderCaches, width, height int32\) error](<#GPUApplicationInstance.SetupCaches>) + - [func \(g \*GPUApplicationInstance\) SetupLogicalDevice\(index int\) error](<#GPUApplicationInstance.SetupLogicalDevice>) +- [type GPUApplicationVersion](<#GPUApplicationVersion>) +- [type GPUAttachmentLoadOp](<#GPUAttachmentLoadOp>) +- [type GPUAttachmentStoreOp](<#GPUAttachmentStoreOp>) +- [type GPUBuffer](<#GPUBuffer>) +- [type GPUBufferUsageFlags](<#GPUBufferUsageFlags>) +- [type GPUColorSpace](<#GPUColorSpace>) +- [type GPUCompositeAlphaFlags](<#GPUCompositeAlphaFlags>) +- [type GPUDescriptorImageInfo](<#GPUDescriptorImageInfo>) +- [type GPUDescriptorPool](<#GPUDescriptorPool>) +- [type GPUDescriptorSet](<#GPUDescriptorSet>) +- [type GPUDescriptorSetLayout](<#GPUDescriptorSetLayout>) +- [type GPUDevice](<#GPUDevice>) + - [func \(g \*GPUDevice\) BlitTargets\(passes \[\]\*RenderPass\)](<#GPUDevice.BlitTargets>) + - [func \(g \*GPUDevice\) CopyBuffer\(srcBuffer GPUBuffer, dstBuffer GPUBuffer, size uintptr\)](<#GPUDevice.CopyBuffer>) + - [func \(g \*GPUDevice\) CopyBufferToImage\(buffer GPUBuffer, image GPUImage, width, height uint32, layerCount int\)](<#GPUDevice.CopyBufferToImage>) + - [func \(g \*GPUDevice\) CreateBuffer\(size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags\) \(GPUBuffer, GPUDeviceMemory, error\)](<#GPUDevice.CreateBuffer>) + - [func \(g \*GPUDevice\) CreateFrameBuffer\(renderPass \*RenderPass, attachments \[\]GPUImageView, width, height int32\) \(GPUFrameBuffer, error\)](<#GPUDevice.CreateFrameBuffer>) + - [func \(g \*GPUDevice\) CreateImage\(id \*TextureId, properties GPUMemoryPropertyFlags, req GPUImageCreateRequest\) error](<#GPUDevice.CreateImage>) + - [func \(g \*GPUDevice\) CreateIndexBuffer\(indices \[\]uint32\) \(GPUBuffer, GPUDeviceMemory, error\)](<#GPUDevice.CreateIndexBuffer>) + - [func \(g \*GPUDevice\) CreateMesh\(mesh \*Mesh, verts \[\]Vertex, indices \[\]uint32\)](<#GPUDevice.CreateMesh>) + - [func \(g \*GPUDevice\) CreateShader\(shader \*Shader, assetDB assets.Database\) error](<#GPUDevice.CreateShader>) + - [func \(g \*GPUDevice\) CreateSwapChain\(window RenderingContainer, inst \*GPUApplicationInstance\) error](<#GPUDevice.CreateSwapChain>) + - [func \(g \*GPUDevice\) CreateTextureSampler\(mipLevels uint32, filter GPUFilter\) \(GPUSampler, error\)](<#GPUDevice.CreateTextureSampler>) + - [func \(g \*GPUDevice\) CreateVertexBuffer\(verts \[\]Vertex\) \(GPUBuffer, GPUDeviceMemory, error\)](<#GPUDevice.CreateVertexBuffer>) + - [func \(g \*GPUDevice\) DestroyBuffer\(buffer GPUBuffer\)](<#GPUDevice.DestroyBuffer>) + - [func \(g \*GPUDevice\) DestroyFrameBuffer\(frameBuffer GPUFrameBuffer\)](<#GPUDevice.DestroyFrameBuffer>) + - [func \(g \*GPUDevice\) DestroyShaderHandle\(id ShaderId\)](<#GPUDevice.DestroyShaderHandle>) + - [func \(g \*GPUDevice\) Draw\(renderPass \*RenderPass, drawings \[\]ShaderDraw, lights LightsForRender, shadows \[\]TextureId\)](<#GPUDevice.Draw>) + - [func \(g \*GPUDevice\) FreeMemory\(memory GPUDeviceMemory\)](<#GPUDevice.FreeMemory>) + - [func \(g \*GPUDevice\) GenerateMipMaps\(texId \*TextureId, imageFormat GPUFormat, texWidth, texHeight, mipLevels uint32, filter GPUFilter\) error](<#GPUDevice.GenerateMipMaps>) + - [func \(g \*GPUDevice\) MapMemory\(memory GPUDeviceMemory, offset uintptr, size uintptr, flags GPUMemoryFlags, out \*unsafe.Pointer\) error](<#GPUDevice.MapMemory>) + - [func \(g \*GPUDevice\) Memcopy\(dst unsafe.Pointer, src \[\]byte\) int](<#GPUDevice.Memcopy>) + - [func \(g \*GPUDevice\) MeshIsReady\(mesh Mesh\) bool](<#GPUDevice.MeshIsReady>) + - [func \(g \*GPUDevice\) QueueCompute\(buffer \*ComputeShaderBuffer\)](<#GPUDevice.QueueCompute>) + - [func \(g \*GPUDevice\) ReadyFrame\(inst \*GPUApplicationInstance, window RenderingContainer, camera cameras.Camera, uiCamera cameras.Camera, lights LightsForRender, runtime float32\) bool](<#GPUDevice.ReadyFrame>) + - [func \(g \*GPUDevice\) SetupTexture\(texture \*Texture, data \*TextureData\) error](<#GPUDevice.SetupTexture>) + - [func \(g \*GPUDevice\) SwapFrame\(window RenderingContainer, inst \*GPUApplicationInstance, width, height int32\) bool](<#GPUDevice.SwapFrame>) + - [func \(g \*GPUDevice\) TextureRead\(texture \*Texture\) \(\[\]byte, error\)](<#GPUDevice.TextureRead>) + - [func \(g \*GPUDevice\) TextureReadPixel\(texture \*Texture, x, y int\) matrix.Color](<#GPUDevice.TextureReadPixel>) + - [func \(g \*GPUDevice\) TextureWritePixels\(texture \*Texture, requests \[\]GPUImageWriteRequest\)](<#GPUDevice.TextureWritePixels>) + - [func \(g \*GPUDevice\) TransitionImageLayout\(vt \*TextureId, newLayout GPUImageLayout, aspectMask GPUImageAspectFlags, newAccess GPUAccessFlags, cmd \*CommandRecorder\)](<#GPUDevice.TransitionImageLayout>) + - [func \(g \*GPUDevice\) UnmapMemory\(memory GPUDeviceMemory\)](<#GPUDevice.UnmapMemory>) + - [func \(g \*GPUDevice\) WriteBufferToImageRegion\(image GPUImage, requests \[\]GPUImageWriteRequest\) error](<#GPUDevice.WriteBufferToImageRegion>) +- [type GPUDeviceMemory](<#GPUDeviceMemory>) +- [type GPUFence](<#GPUFence>) +- [type GPUFilter](<#GPUFilter>) +- [type GPUFormat](<#GPUFormat>) +- [type GPUFormatFeatureFlags](<#GPUFormatFeatureFlags>) +- [type GPUFormatProperties](<#GPUFormatProperties>) +- [type GPUFrameBuffer](<#GPUFrameBuffer>) +- [type GPUHandle](<#GPUHandle>) + - [func \(g \*GPUHandle\) HandleAddr\(\) unsafe.Pointer](<#GPUHandle.HandleAddr>) + - [func \(g \*GPUHandle\) IsValid\(\) bool](<#GPUHandle.IsValid>) + - [func \(g \*GPUHandle\) Reset\(\)](<#GPUHandle.Reset>) +- [type GPUImage](<#GPUImage>) +- [type GPUImageAspectFlags](<#GPUImageAspectFlags>) +- [type GPUImageCreateFlags](<#GPUImageCreateFlags>) +- [type GPUImageCreateRequest](<#GPUImageCreateRequest>) +- [type GPUImageLayout](<#GPUImageLayout>) +- [type GPUImageTiling](<#GPUImageTiling>) +- [type GPUImageType](<#GPUImageType>) +- [type GPUImageUsageFlags](<#GPUImageUsageFlags>) +- [type GPUImageView](<#GPUImageView>) +- [type GPUImageViewType](<#GPUImageViewType>) +- [type GPUImageWriteRequest](<#GPUImageWriteRequest>) +- [type GPUInstance](<#GPUInstance>) + - [func \(g \*GPUInstance\) Destroy\(\)](<#GPUInstance.Destroy>) + - [func \(g \*GPUInstance\) IsValid\(\) bool](<#GPUInstance.IsValid>) + - [func \(g \*GPUInstance\) Setup\(window RenderingContainer, app \*GPUApplication\) error](<#GPUInstance.Setup>) +- [type GPULight](<#GPULight>) +- [type GPULightInfo](<#GPULightInfo>) +- [type GPULogicalDevice](<#GPULogicalDevice>) + - [func \(g \*GPULogicalDevice\) CreateImageView\(id \*TextureId, aspectFlags GPUImageAspectFlags, viewType GPUImageViewType\) error](<#GPULogicalDevice.CreateImageView>) + - [func \(g \*GPULogicalDevice\) Destroy\(\)](<#GPULogicalDevice.Destroy>) + - [func \(g \*GPULogicalDevice\) DestroyFence\(fence \*GPUFence\)](<#GPULogicalDevice.DestroyFence>) + - [func \(g \*GPULogicalDevice\) DestroyGroup\(group \*DrawInstanceGroup\)](<#GPULogicalDevice.DestroyGroup>) + - [func \(g \*GPULogicalDevice\) DestroySemaphore\(semaphore \*GPUSemaphore\)](<#GPULogicalDevice.DestroySemaphore>) + - [func \(g \*GPULogicalDevice\) FreeTexture\(texId \*TextureId\)](<#GPULogicalDevice.FreeTexture>) + - [func \(g \*GPULogicalDevice\) ImageMemoryRequirements\(image GPUImage\) GPUMemoryRequirements](<#GPULogicalDevice.ImageMemoryRequirements>) + - [func \(g \*GPULogicalDevice\) RemakeSwapChain\(window RenderingContainer, inst \*GPUApplicationInstance, device \*GPUDevice\) error](<#GPULogicalDevice.RemakeSwapChain>) + - [func \(g \*GPULogicalDevice\) Setup\(inst \*GPUApplicationInstance, physicalDevice \*GPUPhysicalDevice\) error](<#GPULogicalDevice.Setup>) + - [func \(g \*GPULogicalDevice\) SetupBufferDestroyer\(device \*GPUDevice\)](<#GPULogicalDevice.SetupBufferDestroyer>) + - [func \(g \*GPULogicalDevice\) WaitForFences\(fences \[\]GPUFence\)](<#GPULogicalDevice.WaitForFences>) + - [func \(g \*GPULogicalDevice\) WaitForRender\(device \*GPUDevice\)](<#GPULogicalDevice.WaitForRender>) + - [func \(g \*GPULogicalDevice\) WaitIdle\(\)](<#GPULogicalDevice.WaitIdle>) +- [type GPUMemoryFlags](<#GPUMemoryFlags>) +- [type GPUMemoryHeap](<#GPUMemoryHeap>) +- [type GPUMemoryHeapFlags](<#GPUMemoryHeapFlags>) +- [type GPUMemoryPropertyFlags](<#GPUMemoryPropertyFlags>) +- [type GPUMemoryRequirements](<#GPUMemoryRequirements>) +- [type GPUMemoryType](<#GPUMemoryType>) +- [type GPUPainter](<#GPUPainter>) + - [func \(g \*GPUPainter\) DestroyDescriptorPools\(device \*GPUDevice\)](<#GPUPainter.DestroyDescriptorPools>) +- [type GPUPhysicalDevice](<#GPUPhysicalDevice>) + - [func ListPhysicalGpuDevices\(inst \*GPUApplicationInstance\) \(\[\]GPUPhysicalDevice, error\)](<#ListPhysicalGpuDevices>) + - [func \(g \*GPUPhysicalDevice\) FindComputeFamiliy\(\) GPUQueueFamily](<#GPUPhysicalDevice.FindComputeFamiliy>) + - [func \(g \*GPUPhysicalDevice\) FindGraphicsFamiliy\(\) GPUQueueFamily](<#GPUPhysicalDevice.FindGraphicsFamiliy>) + - [func \(g \*GPUPhysicalDevice\) FindMemoryType\(typeFilter uint32, properties GPUMemoryPropertyFlags\) int](<#GPUPhysicalDevice.FindMemoryType>) + - [func \(g \*GPUPhysicalDevice\) FindPresentFamily\(\) GPUQueueFamily](<#GPUPhysicalDevice.FindPresentFamily>) + - [func \(g \*GPUPhysicalDevice\) FindSupportedFormat\(candidates \[\]GPUFormat, tiling GPUImageTiling, features GPUFormatFeatureFlags\) GPUFormat](<#GPUPhysicalDevice.FindSupportedFormat>) + - [func \(g \*GPUPhysicalDevice\) FormatIsTileable\(format GPUFormat, tiling GPUImageTiling\) bool](<#GPUPhysicalDevice.FormatIsTileable>) + - [func \(g \*GPUPhysicalDevice\) FormatProperties\(format GPUFormat\) GPUFormatProperties](<#GPUPhysicalDevice.FormatProperties>) + - [func \(g \*GPUPhysicalDevice\) IsExtensionSupported\(extension string\) bool](<#GPUPhysicalDevice.IsExtensionSupported>) + - [func \(g \*GPUPhysicalDevice\) IsValid\(\) bool](<#GPUPhysicalDevice.IsValid>) + - [func \(g \*GPUPhysicalDevice\) MaxUsableSampleCount\(\) GPUSampleCountFlags](<#GPUPhysicalDevice.MaxUsableSampleCount>) + - [func \(g \*GPUPhysicalDevice\) PadBufferSize\(size uintptr\) uintptr](<#GPUPhysicalDevice.PadBufferSize>) + - [func \(g \*GPUPhysicalDevice\) RefreshSurfaceCapabilities\(surface unsafe.Pointer\)](<#GPUPhysicalDevice.RefreshSurfaceCapabilities>) +- [type GPUPhysicalDeviceExtension](<#GPUPhysicalDeviceExtension>) +- [type GPUPhysicalDeviceFeatures](<#GPUPhysicalDeviceFeatures>) +- [type GPUPhysicalDeviceLimits](<#GPUPhysicalDeviceLimits>) +- [type GPUPhysicalDeviceMemoryProperties](<#GPUPhysicalDeviceMemoryProperties>) +- [type GPUPhysicalDeviceProperties](<#GPUPhysicalDeviceProperties>) +- [type GPUPhysicalDeviceSparseProperties](<#GPUPhysicalDeviceSparseProperties>) +- [type GPUPhysicalDeviceType](<#GPUPhysicalDeviceType>) +- [type GPUPipeline](<#GPUPipeline>) +- [type GPUPipelineLayout](<#GPUPipelineLayout>) +- [type GPUPipelineStageFlags](<#GPUPipelineStageFlags>) +- [type GPUPresentMode](<#GPUPresentMode>) +- [type GPUQueue](<#GPUQueue>) +- [type GPUQueueFamily](<#GPUQueueFamily>) + - [func InvalidGPUQueueFamily\(\) GPUQueueFamily](<#InvalidGPUQueueFamily>) + - [func \(g GPUQueueFamily\) IsValid\(\) bool](<#GPUQueueFamily.IsValid>) +- [type GPUResult](<#GPUResult>) +- [type GPUSampleCountFlags](<#GPUSampleCountFlags>) +- [type GPUSampler](<#GPUSampler>) +- [type GPUSemaphore](<#GPUSemaphore>) +- [type GPUShaderModule](<#GPUShaderModule>) +- [type GPUSurface](<#GPUSurface>) + - [func \(g \*GPUSurface\) Create\(instance \*GPUInstance, window RenderingContainer\) error](<#GPUSurface.Create>) + - [func \(g \*GPUSurface\) Destroy\(inst \*GPUApplicationInstance\)](<#GPUSurface.Destroy>) +- [type GPUSurfaceCapabilities](<#GPUSurfaceCapabilities>) +- [type GPUSurfaceFormat](<#GPUSurfaceFormat>) +- [type GPUSurfaceTransformFlags](<#GPUSurfaceTransformFlags>) +- [type GPUSwapChain](<#GPUSwapChain>) + - [func \(g \*GPUSwapChain\) CopyAndReset\(\) GPUSwapChain](<#GPUSwapChain.CopyAndReset>) + - [func \(g \*GPUSwapChain\) CreateColor\(device \*GPUDevice\) error](<#GPUSwapChain.CreateColor>) + - [func \(g \*GPUSwapChain\) CreateDepth\(device \*GPUDevice\) error](<#GPUSwapChain.CreateDepth>) + - [func \(g \*GPUSwapChain\) CreateFrameBuffer\(device \*GPUDevice\) error](<#GPUSwapChain.CreateFrameBuffer>) + - [func \(g \*GPUSwapChain\) Destroy\(device \*GPUDevice\)](<#GPUSwapChain.Destroy>) + - [func \(g \*GPUSwapChain\) SelectExtent\(window RenderingContainer, device \*GPUPhysicalDevice\) matrix.Vec2i](<#GPUSwapChain.SelectExtent>) + - [func \(g \*GPUSwapChain\) SelectPresentMode\(device \*GPUPhysicalDevice\) GPUPresentMode](<#GPUSwapChain.SelectPresentMode>) + - [func \(g \*GPUSwapChain\) SelectSurfaceFormat\(device \*GPUPhysicalDevice\) GPUSurfaceFormat](<#GPUSwapChain.SelectSurfaceFormat>) + - [func \(g \*GPUSwapChain\) Setup\(window RenderingContainer, inst \*GPUApplicationInstance, device \*GPUDevice\) error](<#GPUSwapChain.Setup>) + - [func \(g \*GPUSwapChain\) SetupImageViews\(device \*GPUDevice\) error](<#GPUSwapChain.SetupImageViews>) + - [func \(g \*GPUSwapChain\) SetupRenderPass\(device \*GPUDevice, assets assets.Database\) error](<#GPUSwapChain.SetupRenderPass>) + - [func \(g \*GPUSwapChain\) SetupSyncObjects\(device \*GPUDevice\) error](<#GPUSwapChain.SetupSyncObjects>) +- [type GPUSwapChainSupportDetails](<#GPUSwapChainSupportDetails>) +- [type GlobalShaderData](<#GlobalShaderData>) +- [type InstanceCopyData](<#InstanceCopyData>) + - [func InstanceCopyDataNew\(padding int\) InstanceCopyData](<#InstanceCopyDataNew>) +- [type InstanceDriverData](<#InstanceDriverData>) +- [type InstanceGroupSkinningData](<#InstanceGroupSkinningData>) +- [type Light](<#Light>) + - [func NewLight\(device \*GPUDevice, assetDb assets.Database, materialCache \*MaterialCache, lightType LightType\) Light](<#NewLight>) + - [func \(l \*Light\) Direction\(followcam cameras.Camera\) matrix.Vec3](<#Light.Direction>) + - [func \(l \*Light\) FrameDirty\(\) bool](<#Light.FrameDirty>) + - [func \(l \*Light\) IsValid\(\) bool](<#Light.IsValid>) + - [func \(l \*Light\) ResetFrameDirty\(\) bool](<#Light.ResetFrameDirty>) + - [func \(l \*Light\) SetAmbient\(ambient matrix.Vec3\)](<#Light.SetAmbient>) + - [func \(l \*Light\) SetCastsShadows\(castsShadows bool\)](<#Light.SetCastsShadows>) + - [func \(l \*Light\) SetConstant\(constant float32\)](<#Light.SetConstant>) + - [func \(l \*Light\) SetCutoff\(cutoff float32\)](<#Light.SetCutoff>) + - [func \(l \*Light\) SetDiffuse\(diffuse matrix.Vec3\)](<#Light.SetDiffuse>) + - [func \(l \*Light\) SetDirection\(dir matrix.Vec3\)](<#Light.SetDirection>) + - [func \(l \*Light\) SetIntensity\(intensity float32\)](<#Light.SetIntensity>) + - [func \(l \*Light\) SetLinear\(linear float32\)](<#Light.SetLinear>) + - [func \(l \*Light\) SetOuterCutoff\(outerCutoff float32\)](<#Light.SetOuterCutoff>) + - [func \(l \*Light\) SetPosition\(position matrix.Vec3\)](<#Light.SetPosition>) + - [func \(l \*Light\) SetQuadratic\(quadratic float32\)](<#Light.SetQuadratic>) + - [func \(l \*Light\) SetSpecular\(specular matrix.Vec3\)](<#Light.SetSpecular>) + - [func \(l \*Light\) Type\(\) LightType](<#Light.Type>) + - [func \(l \*Light\) WorldSpace\(followcam cameras.Camera\) matrix.Vec3](<#Light.WorldSpace>) +- [type LightShadowShaderData](<#LightShadowShaderData>) + - [func \(t LightShadowShaderData\) Size\(\) int](<#LightShadowShaderData.Size>) +- [type LightType](<#LightType>) +- [type LightsForRender](<#LightsForRender>) +- [type Material](<#Material>) + - [func \(m \*Material\) CreateInstance\(textures \[\]\*Texture\) \*Material](<#Material.CreateInstance>) + - [func \(m \*Material\) Destroy\(device \*GPUDevice\)](<#Material.Destroy>) + - [func \(m \*Material\) HasTransparentSuffix\(\) bool](<#Material.HasTransparentSuffix>) + - [func \(m \*Material\) RenderPass\(\) \*RenderPass](<#Material.RenderPass>) + - [func \(m \*Material\) SelectRoot\(\) \*Material](<#Material.SelectRoot>) +- [type MaterialCache](<#MaterialCache>) + - [func NewMaterialCache\(device \*GPUDevice, assetDatabase assets.Database\) MaterialCache](<#NewMaterialCache>) + - [func \(m \*MaterialCache\) AddMaterial\(material \*Material\) \*Material](<#MaterialCache.AddMaterial>) + - [func \(m \*MaterialCache\) Destroy\(\)](<#MaterialCache.Destroy>) + - [func \(m \*MaterialCache\) FindMaterial\(key string\) \(\*Material, bool\)](<#MaterialCache.FindMaterial>) + - [func \(m \*MaterialCache\) Material\(key string\) \(\*Material, error\)](<#MaterialCache.Material>) +- [type MaterialData](<#MaterialData>) + - [func \(d \*MaterialData\) Compile\(assets assets.Database, device \*GPUDevice\) \(\*Material, error\)](<#MaterialData.Compile>) + - [func \(d \*MaterialData\) CompileExt\(assets assets.Database, device \*GPUDevice, copyShader bool\) \(\*Material, error\)](<#MaterialData.CompileExt>) +- [type MaterialTextureData](<#MaterialTextureData>) + - [func \(d \*MaterialTextureData\) FilterToVK\(\) TextureFilter](<#MaterialTextureData.FilterToVK>) +- [type Mesh](<#Mesh>) + - [func NewMesh\(key string, verts \[\]Vertex, indexes \[\]uint32\) \*Mesh](<#NewMesh>) + - [func NewMeshArrow\(cache \*MeshCache, shaftLength, shaftRadius, tipHeight, tipRadius float32, segments int\) \*Mesh](<#NewMeshArrow>) + - [func NewMeshCapsule\(cache \*MeshCache, radius, height float32, segments, rings int\) \*Mesh](<#NewMeshCapsule>) + - [func NewMeshCircleWire\(cache \*MeshCache, radius float32, segments int\) \*Mesh](<#NewMeshCircleWire>) + - [func NewMeshCone\(cache \*MeshCache, height, baseRadius float32, segments int, capped bool\) \*Mesh](<#NewMeshCone>) + - [func NewMeshCube\(cache \*MeshCache\) \*Mesh](<#NewMeshCube>) + - [func NewMeshCubeInverse\(cache \*MeshCache\) \*Mesh](<#NewMeshCubeInverse>) + - [func NewMeshCylinder\(cache \*MeshCache, height, radius float32, segments int, capped bool\) \*Mesh](<#NewMeshCylinder>) + - [func NewMeshFrustum\(cache \*MeshCache, key string, inverseProjection matrix.Mat4\) \*Mesh](<#NewMeshFrustum>) + - [func NewMeshFrustumBox\(cache \*MeshCache, inverseProjection matrix.Mat4\) \*Mesh](<#NewMeshFrustumBox>) + - [func NewMeshGrid\(cache \*MeshCache, key string, points \[\]matrix.Vec3, vertColor matrix.Color\) \*Mesh](<#NewMeshGrid>) + - [func NewMeshLine\(cache \*MeshCache, key string, p0, p1 matrix.Vec3, vertColor matrix.Color\) \*Mesh](<#NewMeshLine>) + - [func NewMeshOffsetQuad\(cache \*MeshCache, key string, sideOffsets matrix.Vec4\) \*Mesh](<#NewMeshOffsetQuad>) + - [func NewMeshPlane\(cache \*MeshCache\) \*Mesh](<#NewMeshPlane>) + - [func NewMeshPoint\(cache \*MeshCache, key string, position matrix.Vec3, vertColor matrix.Color\) \*Mesh](<#NewMeshPoint>) + - [func NewMeshQuad\(cache \*MeshCache\) \*Mesh](<#NewMeshQuad>) + - [func NewMeshQuadAnchored\(anchor QuadPivot, cache \*MeshCache\) \*Mesh](<#NewMeshQuadAnchored>) + - [func NewMeshScreenQuad\(cache \*MeshCache\) \*Mesh](<#NewMeshScreenQuad>) + - [func NewMeshSkyboxCube\(cache \*MeshCache\) \*Mesh](<#NewMeshSkyboxCube>) + - [func NewMeshSphere\(cache \*MeshCache, radius float32, latitudeBands, longitudeBands int\) \*Mesh](<#NewMeshSphere>) + - [func NewMeshTexturableCube\(cache \*MeshCache\) \*Mesh](<#NewMeshTexturableCube>) + - [func NewMeshTriangle\(cache \*MeshCache\) \*Mesh](<#NewMeshTriangle>) + - [func NewMeshUnitQuad\(cache \*MeshCache\) \*Mesh](<#NewMeshUnitQuad>) + - [func NewMeshWireCone\(cache \*MeshCache, radius, height float32, segments, heightSegments int\) \*Mesh](<#NewMeshWireCone>) + - [func NewMeshWireCube\(cache \*MeshCache, key string, vertColor matrix.Color\) \*Mesh](<#NewMeshWireCube>) + - [func NewMeshWireCylinder\(cache \*MeshCache, radius, height float32, segments, heightSegments int\) \*Mesh](<#NewMeshWireCylinder>) + - [func NewMeshWireQuad\(cache \*MeshCache, key string, vertColor matrix.Color\) \*Mesh](<#NewMeshWireQuad>) + - [func NewMeshWireSphere\(cache \*MeshCache, radius float32, latitudeBands, longitudeBands int\) \*Mesh](<#NewMeshWireSphere>) + - [func \(m Mesh\) Bounds\(\) collision.AABB](<#Mesh.Bounds>) + - [func \(m \*Mesh\) DelayedCreate\(device \*GPUDevice\)](<#Mesh.DelayedCreate>) + - [func \(m Mesh\) IsReady\(\) bool](<#Mesh.IsReady>) + - [func \(m Mesh\) Key\(\) string](<#Mesh.Key>) + - [func \(m \*Mesh\) SetKey\(key string\)](<#Mesh.SetKey>) +- [type MeshCache](<#MeshCache>) + - [func NewMeshCache\(device \*GPUDevice, assetDatabase assets.Database\) MeshCache](<#NewMeshCache>) + - [func \(m \*MeshCache\) AddMesh\(mesh \*Mesh\) \*Mesh](<#MeshCache.AddMesh>) + - [func \(m \*MeshCache\) CreatePending\(\)](<#MeshCache.CreatePending>) + - [func \(m \*MeshCache\) Destroy\(\)](<#MeshCache.Destroy>) + - [func \(m \*MeshCache\) FindMesh\(key string\) \(\*Mesh, bool\)](<#MeshCache.FindMesh>) + - [func \(m \*MeshCache\) Mesh\(key string, verts \[\]Vertex, indexes \[\]uint32\) \*Mesh](<#MeshCache.Mesh>) + - [func \(m \*MeshCache\) RemoveMesh\(key string\)](<#MeshCache.RemoveMesh>) +- [type MeshCleanup](<#MeshCleanup>) +- [type MeshCullMode](<#MeshCullMode>) +- [type MeshDrawMode](<#MeshDrawMode>) +- [type MeshId](<#MeshId>) + - [func \(m MeshId\) IsValid\(\) bool](<#MeshId.IsValid>) +- [type PointShadow](<#PointShadow>) +- [type QuadPivot](<#QuadPivot>) +- [type RenderCaches](<#RenderCaches>) +- [type RenderPass](<#RenderPass>) + - [func NewRenderPass\(device \*GPUDevice, setup \*RenderPassDataCompiled\) \(\*RenderPass, error\)](<#NewRenderPass>) + - [func \(p \*RenderPass\) Destroy\(device \*GPUDevice\)](<#RenderPass.Destroy>) + - [func \(r \*RenderPass\) ExecuteSecondaryCommands\(\)](<#RenderPass.ExecuteSecondaryCommands>) + - [func \(r \*RenderPass\) Height\(\) int](<#RenderPass.Height>) + - [func \(r \*RenderPass\) IsShadowPass\(\) bool](<#RenderPass.IsShadowPass>) + - [func \(p \*RenderPass\) Recontstruct\(device \*GPUDevice\) error](<#RenderPass.Recontstruct>) + - [func \(r \*RenderPass\) SelectOutputAttachment\(device \*GPUDevice\) \*Texture](<#RenderPass.SelectOutputAttachment>) + - [func \(r \*RenderPass\) SelectOutputAttachmentWithSuffix\(suffix string\) \(\*Texture, bool\)](<#RenderPass.SelectOutputAttachmentWithSuffix>) + - [func \(r \*RenderPass\) Texture\(index int\) \*Texture](<#RenderPass.Texture>) + - [func \(r \*RenderPass\) Width\(\) int](<#RenderPass.Width>) +- [type RenderPassAttachmentDescription](<#RenderPassAttachmentDescription>) + - [func \(ad \*RenderPassAttachmentDescription\) FinalLayoutToVK\(\) GPUImageLayout](<#RenderPassAttachmentDescription.FinalLayoutToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) FormatToVK\(device \*GPUDevice\) GPUFormat](<#RenderPassAttachmentDescription.FormatToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) InitialLayoutToVK\(\) GPUImageLayout](<#RenderPassAttachmentDescription.InitialLayoutToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) LoadOpToVK\(\) GPUAttachmentLoadOp](<#RenderPassAttachmentDescription.LoadOpToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) SamplesToVK\(device \*GPUPhysicalDevice\) GPUSampleCountFlags](<#RenderPassAttachmentDescription.SamplesToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) StencilLoadOpToVK\(\) GPUAttachmentLoadOp](<#RenderPassAttachmentDescription.StencilLoadOpToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) StencilStoreOpToVK\(\) GPUAttachmentStoreOp](<#RenderPassAttachmentDescription.StencilStoreOpToVK>) + - [func \(ad \*RenderPassAttachmentDescription\) StoreOpToVK\(\) GPUAttachmentStoreOp](<#RenderPassAttachmentDescription.StoreOpToVK>) +- [type RenderPassAttachmentDescriptionCompiled](<#RenderPassAttachmentDescriptionCompiled>) + - [func \(p \*RenderPassAttachmentDescriptionCompiled\) IsDepthFormat\(\) bool](<#RenderPassAttachmentDescriptionCompiled.IsDepthFormat>) +- [type RenderPassAttachmentImage](<#RenderPassAttachmentImage>) + - [func \(ai \*RenderPassAttachmentImage\) AccessToVK\(\) GPUAccessFlags](<#RenderPassAttachmentImage.AccessToVK>) + - [func \(ai \*RenderPassAttachmentImage\) AspectToVK\(\) GPUImageAspectFlags](<#RenderPassAttachmentImage.AspectToVK>) + - [func \(ai \*RenderPassAttachmentImage\) FilterToVK\(\) GPUFilter](<#RenderPassAttachmentImage.FilterToVK>) + - [func \(img \*RenderPassAttachmentImage\) IsInvalid\(\) bool](<#RenderPassAttachmentImage.IsInvalid>) + - [func \(ai \*RenderPassAttachmentImage\) MemoryPropertyToVK\(\) GPUMemoryPropertyFlags](<#RenderPassAttachmentImage.MemoryPropertyToVK>) + - [func \(ai \*RenderPassAttachmentImage\) TilingToVK\(\) GPUImageTiling](<#RenderPassAttachmentImage.TilingToVK>) + - [func \(ai \*RenderPassAttachmentImage\) UsageToVK\(\) GPUImageUsageFlags](<#RenderPassAttachmentImage.UsageToVK>) +- [type RenderPassAttachmentImageClear](<#RenderPassAttachmentImageClear>) +- [type RenderPassAttachmentImageCompiled](<#RenderPassAttachmentImageCompiled>) + - [func \(img \*RenderPassAttachmentImageCompiled\) IsInvalid\(\) bool](<#RenderPassAttachmentImageCompiled.IsInvalid>) +- [type RenderPassAttachmentReference](<#RenderPassAttachmentReference>) + - [func \(ad \*RenderPassAttachmentReference\) LayoutToVK\(\) GPUImageLayout](<#RenderPassAttachmentReference.LayoutToVK>) +- [type RenderPassAttachmentReferenceCompiled](<#RenderPassAttachmentReferenceCompiled>) +- [type RenderPassData](<#RenderPassData>) + - [func NewRenderPassData\(src string\) \(RenderPassData, error\)](<#NewRenderPassData>) + - [func \(d \*RenderPassData\) Compile\(device \*GPUDevice\) RenderPassDataCompiled](<#RenderPassData.Compile>) +- [type RenderPassDataCompiled](<#RenderPassDataCompiled>) + - [func \(r \*RenderPassDataCompiled\) ConstructRenderPass\(device \*GPUDevice\) \(\*RenderPass, error\)](<#RenderPassDataCompiled.ConstructRenderPass>) +- [type RenderPassGroup](<#RenderPassGroup>) +- [type RenderPassSubpass](<#RenderPassSubpass>) +- [type RenderPassSubpassData](<#RenderPassSubpassData>) +- [type RenderPassSubpassDataCompiled](<#RenderPassSubpassDataCompiled>) +- [type RenderPassSubpassDependency](<#RenderPassSubpassDependency>) + - [func \(sd \*RenderPassSubpassDependency\) DependencyFlagsToVK\(\) vk.DependencyFlags](<#RenderPassSubpassDependency.DependencyFlagsToVK>) + - [func \(sd \*RenderPassSubpassDependency\) DstAccessMaskToVK\(\) GPUAccessFlags](<#RenderPassSubpassDependency.DstAccessMaskToVK>) + - [func \(sd \*RenderPassSubpassDependency\) DstStageMaskToVK\(\) vk.PipelineStageFlags](<#RenderPassSubpassDependency.DstStageMaskToVK>) + - [func \(sd \*RenderPassSubpassDependency\) SrcAccessMaskToVK\(\) GPUAccessFlags](<#RenderPassSubpassDependency.SrcAccessMaskToVK>) + - [func \(sd \*RenderPassSubpassDependency\) SrcStageMaskToVK\(\) vk.PipelineStageFlags](<#RenderPassSubpassDependency.SrcStageMaskToVK>) +- [type RenderPassSubpassDependencyCompiled](<#RenderPassSubpassDependencyCompiled>) +- [type RenderPassSubpassDescription](<#RenderPassSubpassDescription>) + - [func \(ad \*RenderPassSubpassDescription\) PipelineBindPointToVK\(\) vulkan\_const.PipelineBindPoint](<#RenderPassSubpassDescription.PipelineBindPointToVK>) +- [type RenderPassSubpassDescriptionCompiled](<#RenderPassSubpassDescriptionCompiled>) +- [type RenderPassSubpassImageData](<#RenderPassSubpassImageData>) +- [type RenderingContainer](<#RenderingContainer>) +- [type Shader](<#Shader>) + - [func NewShader\(shaderData ShaderDataCompiled\) \*Shader](<#NewShader>) + - [func \(s \*Shader\) AddSubShader\(key string, shader \*Shader\)](<#Shader.AddSubShader>) + - [func \(s \*Shader\) DelayedCreate\(device \*GPUDevice, assetDatabase assets.Database\)](<#Shader.DelayedCreate>) + - [func \(s \*Shader\) Reload\(shaderData ShaderDataCompiled\)](<#Shader.Reload>) + - [func \(s \*Shader\) RemoveSubShader\(key string\)](<#Shader.RemoveSubShader>) + - [func \(s \*Shader\) ShaderDataName\(\) string](<#Shader.ShaderDataName>) + - [func \(s \*Shader\) SubShader\(key string\) \*Shader](<#Shader.SubShader>) +- [type ShaderBuffer](<#ShaderBuffer>) +- [type ShaderCache](<#ShaderCache>) + - [func NewShaderCache\(device \*GPUDevice, assetDatabase assets.Database\) ShaderCache](<#NewShaderCache>) + - [func \(s \*ShaderCache\) AddShader\(shader \*Shader\)](<#ShaderCache.AddShader>) + - [func \(s \*ShaderCache\) CreatePending\(\)](<#ShaderCache.CreatePending>) + - [func \(s \*ShaderCache\) Destroy\(\)](<#ShaderCache.Destroy>) + - [func \(s \*ShaderCache\) ReloadShader\(shaderData ShaderDataCompiled\)](<#ShaderCache.ReloadShader>) + - [func \(s \*ShaderCache\) Shader\(shaderData ShaderDataCompiled\) \(shader \*Shader, isNew bool\)](<#ShaderCache.Shader>) +- [type ShaderCleanup](<#ShaderCleanup>) +- [type ShaderData](<#ShaderData>) + - [func \(d \*ShaderData\) Compile\(\) ShaderDataCompiled](<#ShaderData.Compile>) +- [type ShaderDataBase](<#ShaderDataBase>) + - [func NewShaderDataBase\(\) ShaderDataBase](<#NewShaderDataBase>) + - [func \(s \*ShaderDataBase\) Activate\(\)](<#ShaderDataBase.Activate>) + - [func \(s \*ShaderDataBase\) Base\(\) \*ShaderDataBase](<#ShaderDataBase.Base>) + - [func \(s \*ShaderDataBase\) BoundDataPointer\(\) unsafe.Pointer](<#ShaderDataBase.BoundDataPointer>) + - [func \(s \*ShaderDataBase\) CancelDestroy\(\)](<#ShaderDataBase.CancelDestroy>) + - [func \(s \*ShaderDataBase\) DataPointer\(\) unsafe.Pointer](<#ShaderDataBase.DataPointer>) + - [func \(s \*ShaderDataBase\) Deactivate\(\)](<#ShaderDataBase.Deactivate>) + - [func \(s \*ShaderDataBase\) Destroy\(\)](<#ShaderDataBase.Destroy>) + - [func \(s \*ShaderDataBase\) InstanceBoundDataSize\(\) int](<#ShaderDataBase.InstanceBoundDataSize>) + - [func \(s \*ShaderDataBase\) IsDestroyed\(\) bool](<#ShaderDataBase.IsDestroyed>) + - [func \(s \*ShaderDataBase\) IsInView\(\) bool](<#ShaderDataBase.IsInView>) + - [func \(s \*ShaderDataBase\) Model\(\) matrix.Mat4](<#ShaderDataBase.Model>) + - [func \(s \*ShaderDataBase\) ModelPtr\(\) \*matrix.Mat4](<#ShaderDataBase.ModelPtr>) + - [func \(s \*ShaderDataBase\) SelectLights\(lights LightsForRender\)](<#ShaderDataBase.SelectLights>) + - [func \(s \*ShaderDataBase\) SetModel\(model matrix.Mat4\)](<#ShaderDataBase.SetModel>) + - [func \(s \*ShaderDataBase\) Setup\(\)](<#ShaderDataBase.Setup>) + - [func \(s \*ShaderDataBase\) SkinningHeader\(\) \*SkinnedShaderDataHeader](<#ShaderDataBase.SkinningHeader>) + - [func \(s \*ShaderDataBase\) Transform\(\) \*matrix.Transform](<#ShaderDataBase.Transform>) + - [func \(s \*ShaderDataBase\) UpdateBoundData\(\) bool](<#ShaderDataBase.UpdateBoundData>) + - [func \(s \*ShaderDataBase\) UpdateModel\(viewCuller ViewCuller, container collision.AABB\)](<#ShaderDataBase.UpdateModel>) +- [type ShaderDataCombine](<#ShaderDataCombine>) + - [func \(t ShaderDataCombine\) Size\(\) int](<#ShaderDataCombine.Size>) +- [type ShaderDataCompiled](<#ShaderDataCompiled>) + - [func \(s \*ShaderDataCompiled\) IsCompute\(\) bool](<#ShaderDataCompiled.IsCompute>) + - [func \(s \*ShaderDataCompiled\) SelectLayout\(stage string\) \*ShaderLayoutGroup](<#ShaderDataCompiled.SelectLayout>) + - [func \(sd \*ShaderDataCompiled\) Stride\(\) uint32](<#ShaderDataCompiled.Stride>) + - [func \(sd \*ShaderDataCompiled\) ToAttributeDescription\(locationStart uint32\) \[\]vk.VertexInputAttributeDescription](<#ShaderDataCompiled.ToAttributeDescription>) + - [func \(sd \*ShaderDataCompiled\) ToDescriptorSetLayoutStructure\(\) DescriptorSetLayoutStructure](<#ShaderDataCompiled.ToDescriptorSetLayoutStructure>) + - [func \(sd \*ShaderDataCompiled\) WorkGroups\(\) \[3\]uint32](<#ShaderDataCompiled.WorkGroups>) +- [type ShaderDraw](<#ShaderDraw>) + - [func NewShaderDraw\(material \*Material\) ShaderDraw](<#NewShaderDraw>) + - [func \(s \*ShaderDraw\) AddInstanceGroup\(group DrawInstanceGroup\)](<#ShaderDraw.AddInstanceGroup>) + - [func \(s \*ShaderDraw\) Clear\(\)](<#ShaderDraw.Clear>) + - [func \(s \*ShaderDraw\) Destroy\(device \*GPUDevice\)](<#ShaderDraw.Destroy>) + - [func \(s \*ShaderDraw\) Filter\(filter func\(\*DrawInstanceGroup\) bool\) \[\]\*DrawInstanceGroup](<#ShaderDraw.Filter>) +- [type ShaderDriverData](<#ShaderDriverData>) + - [func NewShaderDriverData\(\) ShaderDriverData](<#NewShaderDriverData>) +- [type ShaderId](<#ShaderId>) + - [func \(s ShaderId\) IsValid\(\) bool](<#ShaderId.IsValid>) +- [type ShaderLayout](<#ShaderLayout>) + - [func \(l \*ShaderLayout\) Capacity\(\) int](<#ShaderLayout.Capacity>) + - [func \(l \*ShaderLayout\) DescriptorType\(\) vulkan\_const.DescriptorType](<#ShaderLayout.DescriptorType>) + - [func \(l \*ShaderLayout\) FullName\(\) string](<#ShaderLayout.FullName>) + - [func \(l \*ShaderLayout\) IsBuffer\(\) bool](<#ShaderLayout.IsBuffer>) + - [func \(l \*ShaderLayout\) Stride\(\) int](<#ShaderLayout.Stride>) +- [type ShaderLayoutGroup](<#ShaderLayoutGroup>) + - [func \(g \*ShaderLayoutGroup\) DescriptorFlag\(\) vulkan\_const.ShaderStageFlagBits](<#ShaderLayoutGroup.DescriptorFlag>) +- [type ShaderLayoutStructField](<#ShaderLayoutStructField>) +- [type ShaderPipelineColorBlend](<#ShaderPipelineColorBlend>) + - [func \(s \*ShaderPipelineColorBlend\) LogicOpToVK\(\) vulkan\_const.LogicOp](<#ShaderPipelineColorBlend.LogicOpToVK>) +- [type ShaderPipelineColorBlendAttachments](<#ShaderPipelineColorBlendAttachments>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) AlphaBlendOpToVK\(\) vulkan\_const.BlendOp](<#ShaderPipelineColorBlendAttachments.AlphaBlendOpToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) BlendEnableToVK\(\) vk.Bool32](<#ShaderPipelineColorBlendAttachments.BlendEnableToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ColorBlendOpToVK\(\) vulkan\_const.BlendOp](<#ShaderPipelineColorBlendAttachments.ColorBlendOpToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ColorWriteMaskToVK\(\) vulkan\_const.ColorComponentFlagBits](<#ShaderPipelineColorBlendAttachments.ColorWriteMaskToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) DstAlphaBlendFactorToVK\(\) vulkan\_const.BlendFactor](<#ShaderPipelineColorBlendAttachments.DstAlphaBlendFactorToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) DstColorBlendFactorToVK\(\) vulkan\_const.BlendFactor](<#ShaderPipelineColorBlendAttachments.DstColorBlendFactorToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListAlphaBlendOp\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListAlphaBlendOp>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListColorBlendOp\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListColorBlendOp>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListDstAlphaBlendFactor\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListDstAlphaBlendFactor>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListDstColorBlendFactor\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListDstColorBlendFactor>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListSrcAlphaBlendFactor\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListSrcAlphaBlendFactor>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) ListSrcColorBlendFactor\(\) \[\]string](<#ShaderPipelineColorBlendAttachments.ListSrcColorBlendFactor>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) SrcAlphaBlendFactorToVK\(\) vulkan\_const.BlendFactor](<#ShaderPipelineColorBlendAttachments.SrcAlphaBlendFactorToVK>) + - [func \(a \*ShaderPipelineColorBlendAttachments\) SrcColorBlendFactorToVK\(\) vulkan\_const.BlendFactor](<#ShaderPipelineColorBlendAttachments.SrcColorBlendFactorToVK>) +- [type ShaderPipelineColorBlendAttachmentsCompiled](<#ShaderPipelineColorBlendAttachmentsCompiled>) +- [type ShaderPipelineColorBlendCompiled](<#ShaderPipelineColorBlendCompiled>) +- [type ShaderPipelineData](<#ShaderPipelineData>) + - [func \(s \*ShaderPipelineData\) AlphaToCoverageEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.AlphaToCoverageEnableToVK>) + - [func \(s \*ShaderPipelineData\) AlphaToOneEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.AlphaToOneEnableToVK>) + - [func \(s \*ShaderPipelineData\) BackStencilOpStateToVK\(\) vk.StencilOpState](<#ShaderPipelineData.BackStencilOpStateToVK>) + - [func \(s \*ShaderPipelineData\) BlendConstants\(\) \[4\]float32](<#ShaderPipelineData.BlendConstants>) + - [func \(d \*ShaderPipelineData\) Compile\(device \*GPUPhysicalDevice\) ShaderPipelineDataCompiled](<#ShaderPipelineData.Compile>) + - [func \(s \*ShaderPipelineData\) DepthBiasEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.DepthBiasEnableToVK>) + - [func \(s \*ShaderPipelineData\) DepthBoundsTestEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.DepthBoundsTestEnableToVK>) + - [func \(s \*ShaderPipelineData\) DepthClampEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.DepthClampEnableToVK>) + - [func \(s \*ShaderPipelineData\) DepthTestEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.DepthTestEnableToVK>) + - [func \(s \*ShaderPipelineData\) DepthWriteEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.DepthWriteEnableToVK>) + - [func \(s \*ShaderPipelineData\) FrontStencilOpStateToVK\(\) vk.StencilOpState](<#ShaderPipelineData.FrontStencilOpStateToVK>) + - [func \(s ShaderPipelineData\) ListBackCompareOp\(\) \[\]string](<#ShaderPipelineData.ListBackCompareOp>) + - [func \(s ShaderPipelineData\) ListBackDepthFailOp\(\) \[\]string](<#ShaderPipelineData.ListBackDepthFailOp>) + - [func \(s ShaderPipelineData\) ListBackFailOp\(\) \[\]string](<#ShaderPipelineData.ListBackFailOp>) + - [func \(s ShaderPipelineData\) ListBackPassOp\(\) \[\]string](<#ShaderPipelineData.ListBackPassOp>) + - [func \(s ShaderPipelineData\) ListBlendFactor\(\) \[\]string](<#ShaderPipelineData.ListBlendFactor>) + - [func \(s ShaderPipelineData\) ListBlendOp\(\) \[\]string](<#ShaderPipelineData.ListBlendOp>) + - [func \(s ShaderPipelineData\) ListCullMode\(\) \[\]string](<#ShaderPipelineData.ListCullMode>) + - [func \(s ShaderPipelineData\) ListDepthCompareOp\(\) \[\]string](<#ShaderPipelineData.ListDepthCompareOp>) + - [func \(s ShaderPipelineData\) ListFrontCompareOp\(\) \[\]string](<#ShaderPipelineData.ListFrontCompareOp>) + - [func \(s ShaderPipelineData\) ListFrontDepthFailOp\(\) \[\]string](<#ShaderPipelineData.ListFrontDepthFailOp>) + - [func \(s ShaderPipelineData\) ListFrontFace\(\) \[\]string](<#ShaderPipelineData.ListFrontFace>) + - [func \(s ShaderPipelineData\) ListFrontFailOp\(\) \[\]string](<#ShaderPipelineData.ListFrontFailOp>) + - [func \(s ShaderPipelineData\) ListFrontPassOp\(\) \[\]string](<#ShaderPipelineData.ListFrontPassOp>) + - [func \(s ShaderPipelineData\) ListLogicOp\(\) \[\]string](<#ShaderPipelineData.ListLogicOp>) + - [func \(s ShaderPipelineData\) ListPatchControlPoints\(\) \[\]string](<#ShaderPipelineData.ListPatchControlPoints>) + - [func \(s ShaderPipelineData\) ListPolygonMode\(\) \[\]string](<#ShaderPipelineData.ListPolygonMode>) + - [func \(s ShaderPipelineData\) ListRasterizationSamples\(\) \[\]string](<#ShaderPipelineData.ListRasterizationSamples>) + - [func \(s ShaderPipelineData\) ListTopology\(\) \[\]string](<#ShaderPipelineData.ListTopology>) + - [func \(s \*ShaderPipelineData\) LogicOpEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.LogicOpEnableToVK>) + - [func \(s \*ShaderPipelineData\) PrimitiveRestartToVK\(\) vk.Bool32](<#ShaderPipelineData.PrimitiveRestartToVK>) + - [func \(s \*ShaderPipelineData\) RasterizerDiscardEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.RasterizerDiscardEnableToVK>) + - [func \(s \*ShaderPipelineData\) SampleShadingEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.SampleShadingEnableToVK>) + - [func \(s \*ShaderPipelineData\) StencilTestEnableToVK\(\) vk.Bool32](<#ShaderPipelineData.StencilTestEnableToVK>) +- [type ShaderPipelineDataCompiled](<#ShaderPipelineDataCompiled>) + - [func \(s \*ShaderPipelineDataCompiled\) ConstructPipeline\(device \*GPUDevice, shader \*Shader, renderPass \*RenderPass, stages \[\]vk.PipelineShaderStageCreateInfo\) bool](<#ShaderPipelineDataCompiled.ConstructPipeline>) +- [type ShaderPipelineDepthStencil](<#ShaderPipelineDepthStencil>) +- [type ShaderPipelineDepthStencilCompiled](<#ShaderPipelineDepthStencilCompiled>) +- [type ShaderPipelineGraphicsPipeline](<#ShaderPipelineGraphicsPipeline>) + - [func \(s \*ShaderPipelineGraphicsPipeline\) PipelineCreateFlagsToVK\(\) vk.PipelineCreateFlags](<#ShaderPipelineGraphicsPipeline.PipelineCreateFlagsToVK>) +- [type ShaderPipelineGraphicsPipelineCompiled](<#ShaderPipelineGraphicsPipelineCompiled>) +- [type ShaderPipelineInputAssembly](<#ShaderPipelineInputAssembly>) + - [func \(s \*ShaderPipelineInputAssembly\) TopologyToVK\(\) vulkan\_const.PrimitiveTopology](<#ShaderPipelineInputAssembly.TopologyToVK>) +- [type ShaderPipelineInputAssemblyCompiled](<#ShaderPipelineInputAssemblyCompiled>) +- [type ShaderPipelinePipelineMultisample](<#ShaderPipelinePipelineMultisample>) + - [func \(s \*ShaderPipelinePipelineMultisample\) RasterizationSamplesToVK\(device \*GPUPhysicalDevice\) GPUSampleCountFlags](<#ShaderPipelinePipelineMultisample.RasterizationSamplesToVK>) +- [type ShaderPipelinePipelineMultisampleCompiled](<#ShaderPipelinePipelineMultisampleCompiled>) +- [type ShaderPipelinePipelineRasterization](<#ShaderPipelinePipelineRasterization>) + - [func \(s \*ShaderPipelinePipelineRasterization\) CullModeToVK\(\) vulkan\_const.CullModeFlagBits](<#ShaderPipelinePipelineRasterization.CullModeToVK>) + - [func \(s \*ShaderPipelinePipelineRasterization\) FrontFaceToVK\(\) vulkan\_const.FrontFace](<#ShaderPipelinePipelineRasterization.FrontFaceToVK>) + - [func \(s \*ShaderPipelinePipelineRasterization\) PolygonModeToVK\(\) vulkan\_const.PolygonMode](<#ShaderPipelinePipelineRasterization.PolygonModeToVK>) +- [type ShaderPipelinePipelineRasterizationCompiled](<#ShaderPipelinePipelineRasterizationCompiled>) +- [type ShaderPipelinePushConstant](<#ShaderPipelinePushConstant>) + - [func \(s \*ShaderPipelinePushConstant\) ShaderStageFlagsToVK\(\) vk.ShaderStageFlags](<#ShaderPipelinePushConstant.ShaderStageFlagsToVK>) +- [type ShaderPipelinePushConstantCompiled](<#ShaderPipelinePushConstantCompiled>) +- [type ShaderPipelineTessellation](<#ShaderPipelineTessellation>) + - [func \(s \*ShaderPipelineTessellation\) PatchControlPointsToVK\(\) uint32](<#ShaderPipelineTessellation.PatchControlPointsToVK>) +- [type ShaderPipelineTessellationCompiled](<#ShaderPipelineTessellationCompiled>) +- [type ShaderType](<#ShaderType>) +- [type SkinnedShaderDataHeader](<#SkinnedShaderDataHeader>) + - [func \(h \*SkinnedShaderDataHeader\) BoneByIndex\(index int\) \*BoneTransform](<#SkinnedShaderDataHeader.BoneByIndex>) + - [func \(h \*SkinnedShaderDataHeader\) CreateBones\(ids \[\]int32\)](<#SkinnedShaderDataHeader.CreateBones>) + - [func \(h \*SkinnedShaderDataHeader\) FindBone\(id int32\) \*BoneTransform](<#SkinnedShaderDataHeader.FindBone>) + - [func \(h \*SkinnedShaderDataHeader\) HasBones\(\) bool](<#SkinnedShaderDataHeader.HasBones>) + - [func \(h \*SkinnedShaderDataHeader\) SkinNamedDataInstanceSize\(\) int](<#SkinnedShaderDataHeader.SkinNamedDataInstanceSize>) + - [func \(h \*SkinnedShaderDataHeader\) SkinNamedDataPointer\(\) unsafe.Pointer](<#SkinnedShaderDataHeader.SkinNamedDataPointer>) + - [func \(h \*SkinnedShaderDataHeader\) SkinUpdateNamedData\(\) bool](<#SkinnedShaderDataHeader.SkinUpdateNamedData>) +- [type TextShaderData](<#TextShaderData>) + - [func \(s TextShaderData\) Size\(\) int](<#TextShaderData.Size>) +- [type Texture](<#Texture>) + - [func NewTexture\(assetDb assets.Database, key string, filter TextureFilter\) \(\*Texture, error\)](<#NewTexture>) + - [func NewTextureFromImage\(key string, data \[\]byte, filter TextureFilter\) \(\*Texture, error\)](<#NewTextureFromImage>) + - [func NewTextureFromMemory\(key string, data \[\]byte, width, height int, filter TextureFilter\) \(\*Texture, error\)](<#NewTextureFromMemory>) + - [func \(t \*Texture\) DelayedCreate\(device \*GPUDevice\)](<#Texture.DelayedCreate>) + - [func \(t \*Texture\) ReadAllPixels\(app \*GPUApplication\) \(\[\]byte, error\)](<#Texture.ReadAllPixels>) + - [func \(t \*Texture\) ReadPendingDataForTransparency\(\) bool](<#Texture.ReadPendingDataForTransparency>) + - [func \(t \*Texture\) ReadPixel\(app \*GPUApplication, x, y int\) matrix.Color](<#Texture.ReadPixel>) + - [func \(t \*Texture\) Reload\(assetDb assets.Database\) error](<#Texture.Reload>) + - [func \(t \*Texture\) SetPendingDataDimensions\(dim TextureDimensions\)](<#Texture.SetPendingDataDimensions>) + - [func \(t Texture\) Size\(\) matrix.Vec2](<#Texture.Size>) + - [func \(t \*Texture\) WritePixels\(device \*GPUDevice, requests \[\]GPUImageWriteRequest\)](<#Texture.WritePixels>) +- [type TextureCache](<#TextureCache>) + - [func NewTextureCache\(device \*GPUDevice, assetDatabase assets.Database\) TextureCache](<#NewTextureCache>) + - [func \(t \*TextureCache\) CreatePending\(\)](<#TextureCache.CreatePending>) + - [func \(t \*TextureCache\) Destroy\(\)](<#TextureCache.Destroy>) + - [func \(t \*TextureCache\) ForceRemoveTexture\(key string, filter TextureFilter\)](<#TextureCache.ForceRemoveTexture>) + - [func \(t \*TextureCache\) InsertRawTexture\(key string, data \[\]byte, width, height int, filter TextureFilter\) \(\*Texture, error\)](<#TextureCache.InsertRawTexture>) + - [func \(t \*TextureCache\) InsertTexture\(tex \*Texture\)](<#TextureCache.InsertTexture>) + - [func \(t \*TextureCache\) ReloadTexture\(textureKey string, filter TextureFilter\) error](<#TextureCache.ReloadTexture>) + - [func \(t \*TextureCache\) Texture\(textureKey string, filter TextureFilter\) \(\*Texture, error\)](<#TextureCache.Texture>) +- [type TextureCleanup](<#TextureCleanup>) +- [type TextureColorFormat](<#TextureColorFormat>) +- [type TextureData](<#TextureData>) + - [func ReadRawTextureData\(mem \[\]byte, inputType TextureFileFormat\) TextureData](<#ReadRawTextureData>) + - [func TexturePixelsFromAsset\(assetDb assets.Database, key string\) \(TextureData, error\)](<#TexturePixelsFromAsset>) +- [type TextureDimensions](<#TextureDimensions>) +- [type TextureFileFormat](<#TextureFileFormat>) +- [type TextureFilter](<#TextureFilter>) +- [type TextureId](<#TextureId>) + - [func \(t TextureId\) IsValid\(\) bool](<#TextureId.IsValid>) +- [type TextureInputType](<#TextureInputType>) +- [type TextureMemType](<#TextureMemType>) +- [type Vertex](<#Vertex>) + - [func MeshPlaneData\(\) \(\[\]Vertex, \[\]uint32\)](<#MeshPlaneData>) + - [func MeshQuadData\(\) \(\[\]Vertex, \[\]uint32\)](<#MeshQuadData>) +- [type ViewCuller](<#ViewCuller>) + + +## Constants + + + +```go +const ( + FontJustifyLeft = FontJustify(iota) + FontJustifyCenter + FontJustifyRight +) +``` + + + +```go +const ( + FontBaselineBottom = FontBaseline(iota) + FontBaselineCenter + FontBaselineTop +) +``` + + + +```go +const ( + 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") +) +``` + + + +```go +const ( + MaxJoints = 50 + MaxSkinInstances = 50 +) +``` + + + +```go +const ( + 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 +) +``` + + + +```go +const ( + MaxLocalLights = 20 + + MaxCascades = 3 +) +``` + + + +```go +const ( + LightTypeDirectional = LightType(iota) + LightTypePoint + LightTypeSpot +) +``` + + + +```go +const ( + QuadPivotCenter = QuadPivot(iota) + QuadPivotLeft + QuadPivotTop + QuadPivotRight + QuadPivotBottom + QuadPivotBottomLeft + QuadPivotBottomRight + QuadPivotTopLeft + QuadPivotTopRight +) +``` + + + +```go +const ( + BytesInPixel = 4 + MaxCommandPools = 5 + MaxSecondaryCommands = 25 +) +``` + + + +```go +const ( + CubeMapSides = 6 +) +``` + + + +```go +const ( + DefaultFontEMSize = 14.0 +) +``` + + + +```go +const ( + GPUWholeSize = (^uintptr(0)) +) +``` + + + +```go +const ( + GenerateUniqueTextureKey = "" +) +``` + + + +```go +const ( + QuaternionSize = int(unsafe.Sizeof(matrix.Quaternion{})) +) +``` + + + +```go +const ShaderBaseDataStart = unsafe.Offsetof(ShaderDataBase{}.model) +``` + +## Variables + + + +```go +var ( + StringVkFormat = map[string]vulkan_const.Format{ + "Undefined": vulkan_const.FormatUndefined, + + "R4g4UnormPack8": vulkan_const.FormatR4g4UnormPack8, + "R4g4b4a4UnormPack16": vulkan_const.FormatR4g4b4a4UnormPack16, + "B4g4r4a4UnormPack16": vulkan_const.FormatB4g4r4a4UnormPack16, + "R5g6b5UnormPack16": vulkan_const.FormatR5g6b5UnormPack16, + "B5g6r5UnormPack16": vulkan_const.FormatB5g6r5UnormPack16, + "R5g5b5a1UnormPack16": vulkan_const.FormatR5g5b5a1UnormPack16, + "B5g5r5a1UnormPack16": vulkan_const.FormatB5g5r5a1UnormPack16, + "A1r5g5b5UnormPack16": vulkan_const.FormatA1r5g5b5UnormPack16, + "R8Unorm": vulkan_const.FormatR8Unorm, + "R8Snorm": vulkan_const.FormatR8Snorm, + "R8Uscaled": vulkan_const.FormatR8Uscaled, + "R8Sscaled": vulkan_const.FormatR8Sscaled, + "R8Uint": vulkan_const.FormatR8Uint, + "R8Sint": vulkan_const.FormatR8Sint, + "R8Srgb": vulkan_const.FormatR8Srgb, + "R8g8Unorm": vulkan_const.FormatR8g8Unorm, + "R8g8Snorm": vulkan_const.FormatR8g8Snorm, + "R8g8Uscaled": vulkan_const.FormatR8g8Uscaled, + "R8g8Sscaled": vulkan_const.FormatR8g8Sscaled, + "R8g8Uint": vulkan_const.FormatR8g8Uint, + "R8g8Sint": vulkan_const.FormatR8g8Sint, + "R8g8Srgb": vulkan_const.FormatR8g8Srgb, + "R8g8b8Unorm": vulkan_const.FormatR8g8b8Unorm, + "R8g8b8Snorm": vulkan_const.FormatR8g8b8Snorm, + "R8g8b8Uscaled": vulkan_const.FormatR8g8b8Uscaled, + "R8g8b8Sscaled": vulkan_const.FormatR8g8b8Sscaled, + "R8g8b8Uint": vulkan_const.FormatR8g8b8Uint, + "R8g8b8Sint": vulkan_const.FormatR8g8b8Sint, + "R8g8b8Srgb": vulkan_const.FormatR8g8b8Srgb, + "B8g8r8Unorm": vulkan_const.FormatB8g8r8Unorm, + "B8g8r8Snorm": vulkan_const.FormatB8g8r8Snorm, + "B8g8r8Uscaled": vulkan_const.FormatB8g8r8Uscaled, + "B8g8r8Sscaled": vulkan_const.FormatB8g8r8Sscaled, + "B8g8r8Uint": vulkan_const.FormatB8g8r8Uint, + "B8g8r8Sint": vulkan_const.FormatB8g8r8Sint, + "B8g8r8Srgb": vulkan_const.FormatB8g8r8Srgb, + "R8g8b8a8Unorm": vulkan_const.FormatR8g8b8a8Unorm, + "R8g8b8a8Snorm": vulkan_const.FormatR8g8b8a8Snorm, + "R8g8b8a8Uscaled": vulkan_const.FormatR8g8b8a8Uscaled, + "R8g8b8a8Sscaled": vulkan_const.FormatR8g8b8a8Sscaled, + "R8g8b8a8Uint": vulkan_const.FormatR8g8b8a8Uint, + "R8g8b8a8Sint": vulkan_const.FormatR8g8b8a8Sint, + "R8g8b8a8Srgb": vulkan_const.FormatR8g8b8a8Srgb, + "B8g8r8a8Unorm": vulkan_const.FormatB8g8r8a8Unorm, + "B8g8r8a8Snorm": vulkan_const.FormatB8g8r8a8Snorm, + "B8g8r8a8Uscaled": vulkan_const.FormatB8g8r8a8Uscaled, + "B8g8r8a8Sscaled": vulkan_const.FormatB8g8r8a8Sscaled, + "B8g8r8a8Uint": vulkan_const.FormatB8g8r8a8Uint, + "B8g8r8a8Sint": vulkan_const.FormatB8g8r8a8Sint, + "B8g8r8a8Srgb": vulkan_const.FormatB8g8r8a8Srgb, + "A8b8g8r8UnormPack32": vulkan_const.FormatA8b8g8r8UnormPack32, + "A8b8g8r8SnormPack32": vulkan_const.FormatA8b8g8r8SnormPack32, + "A8b8g8r8UscaledPack32": vulkan_const.FormatA8b8g8r8UscaledPack32, + "A8b8g8r8SscaledPack32": vulkan_const.FormatA8b8g8r8SscaledPack32, + "A8b8g8r8UintPack32": vulkan_const.FormatA8b8g8r8UintPack32, + "A8b8g8r8SintPack32": vulkan_const.FormatA8b8g8r8SintPack32, + "A8b8g8r8SrgbPack32": vulkan_const.FormatA8b8g8r8SrgbPack32, + "A2r10g10b10UnormPack32": vulkan_const.FormatA2r10g10b10UnormPack32, + "A2r10g10b10SnormPack32": vulkan_const.FormatA2r10g10b10SnormPack32, + "A2r10g10b10UscaledPack32": vulkan_const.FormatA2r10g10b10UscaledPack32, + "A2r10g10b10SscaledPack32": vulkan_const.FormatA2r10g10b10SscaledPack32, + "A2r10g10b10UintPack32": vulkan_const.FormatA2r10g10b10UintPack32, + "A2r10g10b10SintPack32": vulkan_const.FormatA2r10g10b10SintPack32, + "A2b10g10r10UnormPack32": vulkan_const.FormatA2b10g10r10UnormPack32, + "A2b10g10r10SnormPack32": vulkan_const.FormatA2b10g10r10SnormPack32, + "A2b10g10r10UscaledPack32": vulkan_const.FormatA2b10g10r10UscaledPack32, + "A2b10g10r10SscaledPack32": vulkan_const.FormatA2b10g10r10SscaledPack32, + "A2b10g10r10UintPack32": vulkan_const.FormatA2b10g10r10UintPack32, + "A2b10g10r10SintPack32": vulkan_const.FormatA2b10g10r10SintPack32, + "R16Unorm": vulkan_const.FormatR16Unorm, + "R16Snorm": vulkan_const.FormatR16Snorm, + "R16Uscaled": vulkan_const.FormatR16Uscaled, + "R16Sscaled": vulkan_const.FormatR16Sscaled, + "R16Uint": vulkan_const.FormatR16Uint, + "R16Sint": vulkan_const.FormatR16Sint, + "R16Sfloat": vulkan_const.FormatR16Sfloat, + "R16g16Unorm": vulkan_const.FormatR16g16Unorm, + "R16g16Snorm": vulkan_const.FormatR16g16Snorm, + "R16g16Uscaled": vulkan_const.FormatR16g16Uscaled, + "R16g16Sscaled": vulkan_const.FormatR16g16Sscaled, + "R16g16Uint": vulkan_const.FormatR16g16Uint, + "R16g16Sint": vulkan_const.FormatR16g16Sint, + "R16g16Sfloat": vulkan_const.FormatR16g16Sfloat, + "R16g16b16Unorm": vulkan_const.FormatR16g16b16Unorm, + "R16g16b16Snorm": vulkan_const.FormatR16g16b16Snorm, + "R16g16b16Uscaled": vulkan_const.FormatR16g16b16Uscaled, + "R16g16b16Sscaled": vulkan_const.FormatR16g16b16Sscaled, + "R16g16b16Uint": vulkan_const.FormatR16g16b16Uint, + "R16g16b16Sint": vulkan_const.FormatR16g16b16Sint, + "R16g16b16Sfloat": vulkan_const.FormatR16g16b16Sfloat, + "R16g16b16a16Unorm": vulkan_const.FormatR16g16b16a16Unorm, + "R16g16b16a16Snorm": vulkan_const.FormatR16g16b16a16Snorm, + "R16g16b16a16Uscaled": vulkan_const.FormatR16g16b16a16Uscaled, + "R16g16b16a16Sscaled": vulkan_const.FormatR16g16b16a16Sscaled, + "R16g16b16a16Uint": vulkan_const.FormatR16g16b16a16Uint, + "R16g16b16a16Sint": vulkan_const.FormatR16g16b16a16Sint, + "R16g16b16a16Sfloat": vulkan_const.FormatR16g16b16a16Sfloat, + "R32Uint": vulkan_const.FormatR32Uint, + "R32Sint": vulkan_const.FormatR32Sint, + "R32Sfloat": vulkan_const.FormatR32Sfloat, + "R32g32Uint": vulkan_const.FormatR32g32Uint, + "R32g32Sint": vulkan_const.FormatR32g32Sint, + "R32g32Sfloat": vulkan_const.FormatR32g32Sfloat, + "R32g32b32Uint": vulkan_const.FormatR32g32b32Uint, + "R32g32b32Sint": vulkan_const.FormatR32g32b32Sint, + "R32g32b32Sfloat": vulkan_const.FormatR32g32b32Sfloat, + "R32g32b32a32Uint": vulkan_const.FormatR32g32b32a32Uint, + "R32g32b32a32Sint": vulkan_const.FormatR32g32b32a32Sint, + "R32g32b32a32Sfloat": vulkan_const.FormatR32g32b32a32Sfloat, + "R64Uint": vulkan_const.FormatR64Uint, + "R64Sint": vulkan_const.FormatR64Sint, + "R64Sfloat": vulkan_const.FormatR64Sfloat, + "R64g64Uint": vulkan_const.FormatR64g64Uint, + "R64g64Sint": vulkan_const.FormatR64g64Sint, + "R64g64Sfloat": vulkan_const.FormatR64g64Sfloat, + "R64g64b64Uint": vulkan_const.FormatR64g64b64Uint, + "R64g64b64Sint": vulkan_const.FormatR64g64b64Sint, + "R64g64b64Sfloat": vulkan_const.FormatR64g64b64Sfloat, + "R64g64b64a64Uint": vulkan_const.FormatR64g64b64a64Uint, + "R64g64b64a64Sint": vulkan_const.FormatR64g64b64a64Sint, + "R64g64b64a64Sfloat": vulkan_const.FormatR64g64b64a64Sfloat, + "B10g11r11UfloatPack32": vulkan_const.FormatB10g11r11UfloatPack32, + "E5b9g9r9UfloatPack32": vulkan_const.FormatE5b9g9r9UfloatPack32, + "D16Unorm": vulkan_const.FormatD16Unorm, + "X8D24UnormPack32": vulkan_const.FormatX8D24UnormPack32, + "D32Sfloat": vulkan_const.FormatD32Sfloat, + "S8Uint": vulkan_const.FormatS8Uint, + "D16UnormS8Uint": vulkan_const.FormatD16UnormS8Uint, + "D24UnormS8Uint": vulkan_const.FormatD24UnormS8Uint, + "D32SfloatS8Uint": vulkan_const.FormatD32SfloatS8Uint, + "Bc1RgbUnormBlock": vulkan_const.FormatBc1RgbUnormBlock, + "Bc1RgbSrgbBlock": vulkan_const.FormatBc1RgbSrgbBlock, + "Bc1RgbaUnormBlock": vulkan_const.FormatBc1RgbaUnormBlock, + "Bc1RgbaSrgbBlock": vulkan_const.FormatBc1RgbaSrgbBlock, + "Bc2UnormBlock": vulkan_const.FormatBc2UnormBlock, + "Bc2SrgbBlock": vulkan_const.FormatBc2SrgbBlock, + "Bc3UnormBlock": vulkan_const.FormatBc3UnormBlock, + "Bc3SrgbBlock": vulkan_const.FormatBc3SrgbBlock, + "Bc4UnormBlock": vulkan_const.FormatBc4UnormBlock, + "Bc4SnormBlock": vulkan_const.FormatBc4SnormBlock, + "Bc5UnormBlock": vulkan_const.FormatBc5UnormBlock, + "Bc5SnormBlock": vulkan_const.FormatBc5SnormBlock, + "Bc6hUfloatBlock": vulkan_const.FormatBc6hUfloatBlock, + "Bc6hSfloatBlock": vulkan_const.FormatBc6hSfloatBlock, + "Bc7UnormBlock": vulkan_const.FormatBc7UnormBlock, + "Bc7SrgbBlock": vulkan_const.FormatBc7SrgbBlock, + "Etc2R8g8b8UnormBlock": vulkan_const.FormatEtc2R8g8b8UnormBlock, + "Etc2R8g8b8SrgbBlock": vulkan_const.FormatEtc2R8g8b8SrgbBlock, + "Etc2R8g8b8a1UnormBlock": vulkan_const.FormatEtc2R8g8b8a1UnormBlock, + "Etc2R8g8b8a1SrgbBlock": vulkan_const.FormatEtc2R8g8b8a1SrgbBlock, + "Etc2R8g8b8a8UnormBlock": vulkan_const.FormatEtc2R8g8b8a8UnormBlock, + "Etc2R8g8b8a8SrgbBlock": vulkan_const.FormatEtc2R8g8b8a8SrgbBlock, + "EacR11UnormBlock": vulkan_const.FormatEacR11UnormBlock, + "EacR11SnormBlock": vulkan_const.FormatEacR11SnormBlock, + "EacR11g11UnormBlock": vulkan_const.FormatEacR11g11UnormBlock, + "EacR11g11SnormBlock": vulkan_const.FormatEacR11g11SnormBlock, + "Astc4x4UnormBlock": vulkan_const.FormatAstc4x4UnormBlock, + "Astc4x4SrgbBlock": vulkan_const.FormatAstc4x4SrgbBlock, + "Astc5x4UnormBlock": vulkan_const.FormatAstc5x4UnormBlock, + "Astc5x4SrgbBlock": vulkan_const.FormatAstc5x4SrgbBlock, + "Astc5x5UnormBlock": vulkan_const.FormatAstc5x5UnormBlock, + "Astc5x5SrgbBlock": vulkan_const.FormatAstc5x5SrgbBlock, + "Astc6x5UnormBlock": vulkan_const.FormatAstc6x5UnormBlock, + "Astc6x5SrgbBlock": vulkan_const.FormatAstc6x5SrgbBlock, + "Astc6x6UnormBlock": vulkan_const.FormatAstc6x6UnormBlock, + "Astc6x6SrgbBlock": vulkan_const.FormatAstc6x6SrgbBlock, + "Astc8x5UnormBlock": vulkan_const.FormatAstc8x5UnormBlock, + "Astc8x5SrgbBlock": vulkan_const.FormatAstc8x5SrgbBlock, + "Astc8x6UnormBlock": vulkan_const.FormatAstc8x6UnormBlock, + "Astc8x6SrgbBlock": vulkan_const.FormatAstc8x6SrgbBlock, + "Astc8x8UnormBlock": vulkan_const.FormatAstc8x8UnormBlock, + "Astc8x8SrgbBlock": vulkan_const.FormatAstc8x8SrgbBlock, + "Astc10x5UnormBlock": vulkan_const.FormatAstc10x5UnormBlock, + "Astc10x5SrgbBlock": vulkan_const.FormatAstc10x5SrgbBlock, + "Astc10x6UnormBlock": vulkan_const.FormatAstc10x6UnormBlock, + "Astc10x6SrgbBlock": vulkan_const.FormatAstc10x6SrgbBlock, + "Astc10x8UnormBlock": vulkan_const.FormatAstc10x8UnormBlock, + "Astc10x8SrgbBlock": vulkan_const.FormatAstc10x8SrgbBlock, + "Astc10x10UnormBlock": vulkan_const.FormatAstc10x10UnormBlock, + "Astc10x10SrgbBlock": vulkan_const.FormatAstc10x10SrgbBlock, + "Astc12x10UnormBlock": vulkan_const.FormatAstc12x10UnormBlock, + "Astc12x10SrgbBlock": vulkan_const.FormatAstc12x10SrgbBlock, + "Astc12x12UnormBlock": vulkan_const.FormatAstc12x12UnormBlock, + "Astc12x12SrgbBlock": vulkan_const.FormatAstc12x12SrgbBlock, + "G8b8g8r8422Unorm": vulkan_const.FormatG8b8g8r8422Unorm, + "B8g8r8g8422Unorm": vulkan_const.FormatB8g8r8g8422Unorm, + "G8B8R83plane420Unorm": vulkan_const.FormatG8B8R83plane420Unorm, + "G8B8r82plane420Unorm": vulkan_const.FormatG8B8r82plane420Unorm, + "G8B8R83plane422Unorm": vulkan_const.FormatG8B8R83plane422Unorm, + "G8B8r82plane422Unorm": vulkan_const.FormatG8B8r82plane422Unorm, + "G8B8R83plane444Unorm": vulkan_const.FormatG8B8R83plane444Unorm, + "R10x6UnormPack16": vulkan_const.FormatR10x6UnormPack16, + "R10x6g10x6Unorm2pack16": vulkan_const.FormatR10x6g10x6Unorm2pack16, + "R10x6g10x6b10x6a10x6Unorm4pack16": vulkan_const.FormatR10x6g10x6b10x6a10x6Unorm4pack16, + "G10x6b10x6g10x6r10x6422Unorm4pack16": vulkan_const.FormatG10x6b10x6g10x6r10x6422Unorm4pack16, + "B10x6g10x6r10x6g10x6422Unorm4pack16": vulkan_const.FormatB10x6g10x6r10x6g10x6422Unorm4pack16, + "G10x6B10x6R10x63plane420Unorm3pack16": vulkan_const.FormatG10x6B10x6R10x63plane420Unorm3pack16, + "G10x6B10x6r10x62plane420Unorm3pack16": vulkan_const.FormatG10x6B10x6r10x62plane420Unorm3pack16, + "G10x6B10x6R10x63plane422Unorm3pack16": vulkan_const.FormatG10x6B10x6R10x63plane422Unorm3pack16, + "G10x6B10x6r10x62plane422Unorm3pack16": vulkan_const.FormatG10x6B10x6r10x62plane422Unorm3pack16, + "G10x6B10x6R10x63plane444Unorm3pack16": vulkan_const.FormatG10x6B10x6R10x63plane444Unorm3pack16, + "R12x4UnormPack16": vulkan_const.FormatR12x4UnormPack16, + "R12x4g12x4Unorm2pack16": vulkan_const.FormatR12x4g12x4Unorm2pack16, + "R12x4g12x4b12x4a12x4Unorm4pack16": vulkan_const.FormatR12x4g12x4b12x4a12x4Unorm4pack16, + "G12x4b12x4g12x4r12x4422Unorm4pack16": vulkan_const.FormatG12x4b12x4g12x4r12x4422Unorm4pack16, + "B12x4g12x4r12x4g12x4422Unorm4pack16": vulkan_const.FormatB12x4g12x4r12x4g12x4422Unorm4pack16, + "G12x4B12x4R12x43plane420Unorm3pack16": vulkan_const.FormatG12x4B12x4R12x43plane420Unorm3pack16, + "G12x4B12x4r12x42plane420Unorm3pack16": vulkan_const.FormatG12x4B12x4r12x42plane420Unorm3pack16, + "G12x4B12x4R12x43plane422Unorm3pack16": vulkan_const.FormatG12x4B12x4R12x43plane422Unorm3pack16, + "G12x4B12x4r12x42plane422Unorm3pack16": vulkan_const.FormatG12x4B12x4r12x42plane422Unorm3pack16, + "G12x4B12x4R12x43plane444Unorm3pack16": vulkan_const.FormatG12x4B12x4R12x43plane444Unorm3pack16, + "G16b16g16r16422Unorm": vulkan_const.FormatG16b16g16r16422Unorm, + "B16g16r16g16422Unorm": vulkan_const.FormatB16g16r16g16422Unorm, + "G16B16R163plane420Unorm": vulkan_const.FormatG16B16R163plane420Unorm, + "G16B16r162plane420Unorm": vulkan_const.FormatG16B16r162plane420Unorm, + "G16B16R163plane422Unorm": vulkan_const.FormatG16B16R163plane422Unorm, + "G16B16r162plane422Unorm": vulkan_const.FormatG16B16r162plane422Unorm, + "G16B16R163plane444Unorm": vulkan_const.FormatG16B16R163plane444Unorm, + "Pvrtc12bppUnormBlockImg": vulkan_const.FormatPvrtc12bppUnormBlockImg, + "Pvrtc14bppUnormBlockImg": vulkan_const.FormatPvrtc14bppUnormBlockImg, + "Pvrtc22bppUnormBlockImg": vulkan_const.FormatPvrtc22bppUnormBlockImg, + "Pvrtc24bppUnormBlockImg": vulkan_const.FormatPvrtc24bppUnormBlockImg, + "Pvrtc12bppSrgbBlockImg": vulkan_const.FormatPvrtc12bppSrgbBlockImg, + "Pvrtc14bppSrgbBlockImg": vulkan_const.FormatPvrtc14bppSrgbBlockImg, + "Pvrtc22bppSrgbBlockImg": vulkan_const.FormatPvrtc22bppSrgbBlockImg, + "Pvrtc24bppSrgbBlockImg": vulkan_const.FormatPvrtc24bppSrgbBlockImg, + // contains filtered or unexported fields + } + StringVkBlendFactor = map[string]vulkan_const.BlendFactor{ + "Zero": vulkan_const.BlendFactorZero, + "One": vulkan_const.BlendFactorOne, + "SrcColor": vulkan_const.BlendFactorSrcColor, + "SrcAlpha": vulkan_const.BlendFactorSrcAlpha, + "OneMinusSrcColor": vulkan_const.BlendFactorOneMinusSrcColor, + "DstColor": vulkan_const.BlendFactorDstColor, + "OneMinusDstColor": vulkan_const.BlendFactorOneMinusDstColor, + "OneMinusSrcAlpha": vulkan_const.BlendFactorOneMinusSrcAlpha, + "DstAlpha": vulkan_const.BlendFactorDstAlpha, + "OneMinusDstAlpha": vulkan_const.BlendFactorOneMinusDstAlpha, + "ConstantColor": vulkan_const.BlendFactorConstantColor, + "OneMinusConstantColor": vulkan_const.BlendFactorOneMinusConstantColor, + "ConstantAlpha": vulkan_const.BlendFactorConstantAlpha, + "OneMinusConstantAlpha": vulkan_const.BlendFactorOneMinusConstantAlpha, + "SrcAlphaSaturate": vulkan_const.BlendFactorSrcAlphaSaturate, + "Src1Color": vulkan_const.BlendFactorSrc1Color, + "OneMinusSrc1Color": vulkan_const.BlendFactorOneMinusSrc1Color, + "Src1Alpha": vulkan_const.BlendFactorSrc1Alpha, + "OneMinusSrc1Alpha": vulkan_const.BlendFactorOneMinusSrc1Alpha, + } + StringVkBlendOp = map[string]vulkan_const.BlendOp{ + "Add": vulkan_const.BlendOpAdd, + "Subtract": vulkan_const.BlendOpSubtract, + "ReverseSubtract": vulkan_const.BlendOpReverseSubtract, + "Min": vulkan_const.BlendOpMin, + "Max": vulkan_const.BlendOpMax, + "Zero": vulkan_const.BlendOpZero, + "Src": vulkan_const.BlendOpSrc, + "Dst": vulkan_const.BlendOpDst, + "SrcOver": vulkan_const.BlendOpSrcOver, + "DstOver": vulkan_const.BlendOpDstOver, + "SrcIn": vulkan_const.BlendOpSrcIn, + "DstIn": vulkan_const.BlendOpDstIn, + "SrcOut": vulkan_const.BlendOpSrcOut, + "DstOut": vulkan_const.BlendOpDstOut, + "SrcAtop": vulkan_const.BlendOpSrcAtop, + "DstAtop": vulkan_const.BlendOpDstAtop, + "Xor": vulkan_const.BlendOpXor, + "Multiply": vulkan_const.BlendOpMultiply, + "Screen": vulkan_const.BlendOpScreen, + "Overlay": vulkan_const.BlendOpOverlay, + "Darken": vulkan_const.BlendOpDarken, + "Lighten": vulkan_const.BlendOpLighten, + "Colordodge": vulkan_const.BlendOpColordodge, + "Colorburn": vulkan_const.BlendOpColorburn, + "Hardlight": vulkan_const.BlendOpHardlight, + "Softlight": vulkan_const.BlendOpSoftlight, + "Difference": vulkan_const.BlendOpDifference, + "Exclusion": vulkan_const.BlendOpExclusion, + "Invert": vulkan_const.BlendOpInvert, + "InvertRgb": vulkan_const.BlendOpInvertRgb, + "Lineardodge": vulkan_const.BlendOpLineardodge, + "Linearburn": vulkan_const.BlendOpLinearburn, + "Vividlight": vulkan_const.BlendOpVividlight, + "Linearlight": vulkan_const.BlendOpLinearlight, + "Pinlight": vulkan_const.BlendOpPinlight, + "Hardmix": vulkan_const.BlendOpHardmix, + "HslHue": vulkan_const.BlendOpHslHue, + "HslSaturation": vulkan_const.BlendOpHslSaturation, + "HslColor": vulkan_const.BlendOpHslColor, + "HslLuminosity": vulkan_const.BlendOpHslLuminosity, + "Plus": vulkan_const.BlendOpPlus, + "PlusClamped": vulkan_const.BlendOpPlusClamped, + "PlusClampedAlpha": vulkan_const.BlendOpPlusClampedAlpha, + "PlusDarker": vulkan_const.BlendOpPlusDarker, + "Minus": vulkan_const.BlendOpMinus, + "MinusClamped": vulkan_const.BlendOpMinusClamped, + "Contrast": vulkan_const.BlendOpContrast, + "InvertOvg": vulkan_const.BlendOpInvertOvg, + "Red": vulkan_const.BlendOpRed, + "Green": vulkan_const.BlendOpBlue, + "Blue": vulkan_const.BlendOpBlue, + } + StringVkLogicOp = map[string]vulkan_const.LogicOp{ + "Clear": vulkan_const.LogicOpClear, + "And": vulkan_const.LogicOpAnd, + "AndReverse": vulkan_const.LogicOpAndReverse, + "Copy": vulkan_const.LogicOpCopy, + "AndInverted": vulkan_const.LogicOpAndInverted, + "NoOp": vulkan_const.LogicOpNoOp, + "Xor": vulkan_const.LogicOpXor, + "Or": vulkan_const.LogicOpOr, + "Nor": vulkan_const.LogicOpNor, + "Equivalent": vulkan_const.LogicOpEquivalent, + "Invert": vulkan_const.LogicOpInvert, + "OrReverse": vulkan_const.LogicOpOrReverse, + "CopyInverted": vulkan_const.LogicOpCopyInverted, + "OrInverted": vulkan_const.LogicOpOrInverted, + "Nand": vulkan_const.LogicOpNand, + "Set": vulkan_const.LogicOpSet, + } + StringVkCompareOp = map[string]vulkan_const.CompareOp{ + "Never": vulkan_const.CompareOpNever, + "Equal": vulkan_const.CompareOpEqual, + "LessOrEqual": vulkan_const.CompareOpLessOrEqual, + "Greater": vulkan_const.CompareOpGreater, + "NotEqual": vulkan_const.CompareOpNotEqual, + "GreaterOrEqual": vulkan_const.CompareOpGreaterOrEqual, + "Always": vulkan_const.CompareOpAlways, + "Less": vulkan_const.CompareOpLess, + } + StringVkStencilOp = map[string]vulkan_const.StencilOp{ + "Zero": vulkan_const.StencilOpZero, + "Replace": vulkan_const.StencilOpReplace, + "IncrementAndClamp": vulkan_const.StencilOpIncrementAndClamp, + "DecrementAndClamp": vulkan_const.StencilOpDecrementAndClamp, + "Invert": vulkan_const.StencilOpInvert, + "IncrementAndWrap": vulkan_const.StencilOpIncrementAndWrap, + "DecrementAndWrap": vulkan_const.StencilOpDecrementAndWrap, + "Keep": vulkan_const.StencilOpKeep, + } + StringVkPrimitiveTopology = map[string]vulkan_const.PrimitiveTopology{ + "Points": vulkan_const.PrimitiveTopologyPointList, + "Lines": vulkan_const.PrimitiveTopologyLineList, + "Triangles": vulkan_const.PrimitiveTopologyTriangleList, + "Patches": vulkan_const.PrimitiveTopologyPatchList, + } + StringVkPolygonMode = map[string]vulkan_const.PolygonMode{ + "Point": vulkan_const.PolygonModePoint, + "Line": vulkan_const.PolygonModeLine, + "Fill": vulkan_const.PolygonModeFill, + } + StringVkCullModeFlagBits = map[string]vulkan_const.CullModeFlagBits{ + "None": vulkan_const.CullModeNone, + "Front": vulkan_const.CullModeFrontBit, + "Back": vulkan_const.CullModeBackBit, + } + StringVkFrontFace = map[string]vulkan_const.FrontFace{ + "Clockwise": vulkan_const.FrontFaceClockwise, + "CounterClockwise": vulkan_const.FrontFaceCounterClockwise, + } + StringVkSampleCountFlagBits = map[string]GPUSampleCountFlags{ + + "1Bit": GPUSampleCount1Bit, + "2Bit": GPUSampleCount2Bit, + "4Bit": GPUSampleCount4Bit, + "8Bit": GPUSampleCount8Bit, + "16Bit": GPUSampleCount16Bit, + "32Bit": GPUSampleCount32Bit, + "64Bit": GPUSampleCount64Bit, + // contains filtered or unexported fields + } + StringVkPatchControlPoints = map[string]uint32{ + "Lines": 2, + "Triangles": 3, + "Quads": 4, + } + StringVkAttachmentLoadOp = map[string]GPUAttachmentLoadOp{ + "Load": GPUAttachmentLoadOpLoad, + "Clear": GPUAttachmentLoadOpClear, + "DontCare": GPUAttachmentLoadOpDontCare, + } + StringVkAttachmentStoreOp = map[string]GPUAttachmentStoreOp{ + "Store": GPUAttachmentStoreOpStore, + "DontCare": GPUAttachmentStoreOpDontCare, + } + StringVkImageLayout = map[string]GPUImageLayout{ + "Undefined": GPUImageLayoutUndefined, + "General": GPUImageLayoutGeneral, + "ColorAttachmentOptimal": GPUImageLayoutColorAttachmentOptimal, + "DepthStencilAttachmentOptimal": GPUImageLayoutDepthStencilAttachmentOptimal, + "DepthStencilReadOnlyOptimal": GPUImageLayoutDepthStencilReadOnlyOptimal, + "ShaderReadOnlyOptimal": GPUImageLayoutShaderReadOnlyOptimal, + "TransferSrcOptimal": GPUImageLayoutTransferSrcOptimal, + "TransferDstOptimal": GPUImageLayoutTransferDstOptimal, + "Preinitialized": GPUImageLayoutPreinitialized, + "DepthReadOnlyStencilAttachmentOptimal": GPUImageLayoutDepthReadOnlyStencilAttachmentOptimal, + "DepthAttachmentStencilReadOnlyOptimal": GPUImageLayoutDepthAttachmentStencilReadOnlyOptimal, + "PresentSrc": GPUImageLayoutPresentSrc, + "SharedPresent": GPUImageLayoutSharedPresent, + "ShadingRateOptimalNv": GPUImageLayoutShadingRateOptimalNv, + } + StringVkPipelineStageFlagBits = map[string]vulkan_const.PipelineStageFlagBits{ + "TopOfPipeBit": vulkan_const.PipelineStageTopOfPipeBit, + "DrawIndirectBit": vulkan_const.PipelineStageDrawIndirectBit, + "VertexInputBit": vulkan_const.PipelineStageVertexInputBit, + "VertexShaderBit": vulkan_const.PipelineStageVertexShaderBit, + "TessellationControlShaderBit": vulkan_const.PipelineStageTessellationControlShaderBit, + "TessellationEvaluationShaderBit": vulkan_const.PipelineStageTessellationEvaluationShaderBit, + "GeometryShaderBit": vulkan_const.PipelineStageGeometryShaderBit, + "FragmentShaderBit": vulkan_const.PipelineStageFragmentShaderBit, + "EarlyFragmentTestsBit": vulkan_const.PipelineStageEarlyFragmentTestsBit, + "LateFragmentTestsBit": vulkan_const.PipelineStageLateFragmentTestsBit, + "ColorAttachmentOutputBit": vulkan_const.PipelineStageColorAttachmentOutputBit, + "ComputeShaderBit": vulkan_const.PipelineStageComputeShaderBit, + "TransferBit": vulkan_const.PipelineStageTransferBit, + "BottomOfPipeBit": vulkan_const.PipelineStageBottomOfPipeBit, + "HostBit": vulkan_const.PipelineStageHostBit, + "AllGraphicsBit": vulkan_const.PipelineStageAllGraphicsBit, + "AllCommandsBit": vulkan_const.PipelineStageAllCommandsBit, + "TransformFeedbackBit": vulkan_const.PipelineStageTransformFeedbackBit, + "ConditionalRenderingBit": vulkan_const.PipelineStageConditionalRenderingBit, + "CommandProcessBitNvx": vulkan_const.PipelineStageCommandProcessBitNvx, + "ShadingRateImageBitNv": vulkan_const.PipelineStageShadingRateImageBitNv, + "RaytracingBitNvx": vulkan_const.PipelineStageRaytracingBitNvx, + "TaskShaderBitNv": vulkan_const.PipelineStageTaskShaderBitNv, + "MeshShaderBitNv": vulkan_const.PipelineStageMeshShaderBitNv, + } + StringVkAccessFlagBits = map[string]GPUAccessFlags{ + "IndirectCommandReadBit": GPUAccessIndirectCommandReadBit, + "IndexReadBit": GPUAccessIndexReadBit, + "VertexAttributeReadBit": GPUAccessVertexAttributeReadBit, + "UniformReadBit": GPUAccessUniformReadBit, + "InputAttachmentReadBit": GPUAccessInputAttachmentReadBit, + "ShaderReadBit": GPUAccessShaderReadBit, + "ShaderWriteBit": GPUAccessShaderWriteBit, + "ColorAttachmentReadBit": GPUAccessColorAttachmentReadBit, + "ColorAttachmentWriteBit": GPUAccessColorAttachmentWriteBit, + "DepthStencilAttachmentReadBit": GPUAccessDepthStencilAttachmentReadBit, + "DepthStencilAttachmentWriteBit": GPUAccessDepthStencilAttachmentWriteBit, + "TransferReadBit": GPUAccessTransferReadBit, + "TransferWriteBit": GPUAccessTransferWriteBit, + "HostReadBit": GPUAccessHostReadBit, + "HostWriteBit": GPUAccessHostWriteBit, + "MemoryReadBit": GPUAccessMemoryReadBit, + "MemoryWriteBit": GPUAccessMemoryWriteBit, + "TransformFeedbackWriteBit": GPUAccessTransformFeedbackWriteBit, + "TransformFeedbackCounterReadBit": GPUAccessTransformFeedbackCounterReadBit, + "TransformFeedbackCounterWriteBit": GPUAccessTransformFeedbackCounterWriteBit, + "ConditionalRenderingReadBit": GPUAccessConditionalRenderingReadBit, + "CommandProcessReadBitNvx": GPUAccessCommandProcessReadBitNvx, + "CommandProcessWriteBitNvx": GPUAccessCommandProcessWriteBitNvx, + "ColorAttachmentReadNoncoherentBit": GPUAccessColorAttachmentReadNoncoherentBit, + "ShadingRateImageReadBitNv": GPUAccessShadingRateImageReadBitNv, + "AccelerationStructureReadBitNvx": GPUAccessAccelerationStructureReadBitNvx, + "AccelerationStructureWriteBitNvx": GPUAccessAccelerationStructureWriteBitNvx, + } + StringVkShaderStageFlagBits = map[string]vulkan_const.ShaderStageFlagBits{ + "VertexBit": vulkan_const.ShaderStageVertexBit, + "TessellationControlBit": vulkan_const.ShaderStageTessellationControlBit, + "TessellationEvaluationBit": vulkan_const.ShaderStageTessellationEvaluationBit, + "GeometryBit": vulkan_const.ShaderStageGeometryBit, + "FragmentBit": vulkan_const.ShaderStageFragmentBit, + "ComputeBit": vulkan_const.ShaderStageComputeBit, + "AllGraphics": vulkan_const.ShaderStageAllGraphics, + "All": vulkan_const.ShaderStageAll, + "RaygenBitNvx": vulkan_const.ShaderStageRaygenBitNvx, + "AnyHitBitNvx": vulkan_const.ShaderStageAnyHitBitNvx, + "ClosestHitBitNvx": vulkan_const.ShaderStageClosestHitBitNvx, + "MissBitNvx": vulkan_const.ShaderStageMissBitNvx, + "IntersectionBitNvx": vulkan_const.ShaderStageIntersectionBitNvx, + "CallableBitNvx": vulkan_const.ShaderStageCallableBitNvx, + "TaskBitNv": vulkan_const.ShaderStageTaskBitNv, + "MeshBitNv": vulkan_const.ShaderStageMeshBitNv, + "FlagBitsMaxEnum": vulkan_const.ShaderStageFlagBitsMaxEnum, + } + StringVkPipelineBindPoint = map[string]vulkan_const.PipelineBindPoint{ + "Graphics": vulkan_const.PipelineBindPointGraphics, + "Compute": vulkan_const.PipelineBindPointCompute, + "RaytracingNvx": vulkan_const.PipelineBindPointRaytracingNvx, + } + StringVkDependencyFlagBits = map[string]vulkan_const.DependencyFlagBits{ + "ByRegionBit": vulkan_const.DependencyByRegionBit, + "DeviceGroupBit": vulkan_const.DependencyDeviceGroupBit, + "ViewLocalBit": vulkan_const.DependencyViewLocalBit, + } + StringVkColorComponentFlagBits = map[string]vulkan_const.ColorComponentFlagBits{ + "R": vulkan_const.ColorComponentRBit, + "G": vulkan_const.ColorComponentGBit, + "B": vulkan_const.ColorComponentBBit, + "A": vulkan_const.ColorComponentABit, + } + StringVkPipelineCreateFlagBits = map[string]vulkan_const.PipelineCreateFlagBits{ + "DisableOptimizationBit": vulkan_const.PipelineCreateDisableOptimizationBit, + "AllowDerivativesBit": vulkan_const.PipelineCreateAllowDerivativesBit, + "DerivativeBit": vulkan_const.PipelineCreateDerivativeBit, + "ViewIndexFromDeviceIndexBit": vulkan_const.PipelineCreateViewIndexFromDeviceIndexBit, + "DispatchBase": vulkan_const.PipelineCreateDispatchBase, + "DeferCompileBitNvx": vulkan_const.PipelineCreateDeferCompileBitNvx, + } + StringVkImageTiling = map[string]GPUImageTiling{ + "Optimal": GPUImageTilingOptimal, + "Linear": GPUImageTilingLinear, + "DrmFormatModifier": GPUImageTilingDrmFormatModifier, + } + StringVkFilter = map[string]GPUFilter{ + "Nearest": GPUFilterNearest, + "Linear": GPUFilterLinear, + "CubicImg": GPUFilterCubicImg, + } + StringVkImageUsageFlagBits = map[string]GPUImageUsageFlags{ + "TransferSrcBit": GPUImageUsageTransferSrcBit, + "TransferDstBit": GPUImageUsageTransferDstBit, + "SampledBit": GPUImageUsageSampledBit, + "StorageBit": GPUImageUsageStorageBit, + "ColorAttachmentBit": GPUImageUsageColorAttachmentBit, + "DepthStencilAttachmentBit": GPUImageUsageDepthStencilAttachmentBit, + "TransientAttachmentBit": GPUImageUsageTransientAttachmentBit, + "InputAttachmentBit": GPUImageUsageInputAttachmentBit, + "ShadingRateImageBitNv": GPUImageUsageShadingRateImageBitNv, + } + StringVkMemoryPropertyFlagBits = map[string]GPUMemoryPropertyFlags{ + "DeviceLocalBit": GPUMemoryPropertyDeviceLocalBit, + "HostVisibleBit": GPUMemoryPropertyHostVisibleBit, + "HostCoherentBit": GPUMemoryPropertyHostCoherentBit, + "HostCachedBit": GPUMemoryPropertyHostCachedBit, + "LazilyAllocatedBit": GPUMemoryPropertyLazilyAllocatedBit, + "ProtectedBit": GPUMemoryPropertyProtectedBit, + } + StringVkImageAspectFlagBits = map[string]GPUImageAspectFlags{ + "ColorBit": GPUImageAspectColorBit, + "DepthBit": GPUImageAspectDepthBit, + "StencilBit": GPUImageAspectStencilBit, + "MetadataBit": GPUImageAspectMetadataBit, + "Plane0Bit": GPUImageAspectPlane0Bit, + "Plane1Bit": GPUImageAspectPlane1Bit, + "Plane2Bit": GPUImageAspectPlane2Bit, + "MemoryPlane0Bit": GPUImageAspectMemoryPlane0Bit, + "MemoryPlane1Bit": GPUImageAspectMemoryPlane1Bit, + "MemoryPlane2Bit": GPUImageAspectMemoryPlane2Bit, + "MemoryPlane3Bit": GPUImageAspectMemoryPlane3Bit, + } + StringVkMap = map[string]any{ + "StringVkFormat": StringVkFormat, + "StringVkBlendFactor": StringVkBlendFactor, + "StringVkBlendOp": StringVkBlendOp, + "StringVkLogicOp": StringVkLogicOp, + "StringVkCompareOp": StringVkCompareOp, + "StringVkStencilOp": StringVkStencilOp, + "StringVkPrimitiveTopology": StringVkPrimitiveTopology, + "StringVkPolygonMode": StringVkPolygonMode, + "StringVkCullModeFlagBits": StringVkCullModeFlagBits, + "StringVkFrontFace": StringVkFrontFace, + "StringVkSampleCountFlagBits": StringVkSampleCountFlagBits, + "StringVkPatchControlPoints": StringVkPatchControlPoints, + "StringVkAttachmentLoadOp": StringVkAttachmentLoadOp, + "StringVkAttachmentStoreOp": StringVkAttachmentStoreOp, + "StringVkImageLayout": StringVkImageLayout, + "StringVkPipelineStageFlagBits": StringVkPipelineStageFlagBits, + "StringVkAccessFlagBits": StringVkAccessFlagBits, + "StringVkPipelineBindPoint": StringVkPipelineBindPoint, + "StringVkDependencyFlagBits": StringVkDependencyFlagBits, + "StringVkColorComponentFlagBits": StringVkColorComponentFlagBits, + "StringVkPipelineCreateFlagBits": StringVkPipelineCreateFlagBits, + "StringVkImageTiling": StringVkImageTiling, + "StringVkFilter": StringVkFilter, + "StringVkImageUsageFlagBits": StringVkImageUsageFlagBits, + "StringVkMemoryPropertyFlagBits": StringVkMemoryPropertyFlagBits, + "StringVkImageAspectFlagBits": StringVkImageAspectFlagBits, + } +) +``` + + +## func [SetupLightMaterials]() + +```go +func SetupLightMaterials(materialCache *MaterialCache) error +``` + + + + +## func [TextureKeys]() + +```go +func TextureKeys(textures []*Texture) []string +``` + + + + +## func [VertexFaceNormal]() + +```go +func VertexFaceNormal(verts [3]Vertex) matrix.Vec3 +``` + + + + +## type [BoneTransform]() + + + +```go +type BoneTransform struct { + Id int32 + Transform matrix.Transform + Skin matrix.Mat4 +} +``` + + +## type [CommandRecorder]() + + + +```go +type CommandRecorder struct { + // contains filtered or unexported fields +} +``` + + +### func [NewCommandRecorder]() + +```go +func NewCommandRecorder(device *GPUDevice) (CommandRecorder, error) +``` + + + + +### func \(\*CommandRecorder\) [Begin]() + +```go +func (c *CommandRecorder) Begin() +``` + + + + +### func \(\*CommandRecorder\) [Destroy]() + +```go +func (c *CommandRecorder) Destroy(device *GPUDevice) +``` + + + + +### func \(\*CommandRecorder\) [End]() + +```go +func (c *CommandRecorder) End() +``` + + + + +### func \(\*CommandRecorder\) [Reset]() + +```go +func (c *CommandRecorder) Reset() +``` + + + + +## type [CommandRecorderSecondary]() + + + +```go +type CommandRecorderSecondary struct { + CommandRecorder + // contains filtered or unexported fields +} +``` + + +### func [NewCommandRecorderSecondary]() + +```go +func NewCommandRecorderSecondary(device *GPUDevice, rp *RenderPass, subpassIdx int) (CommandRecorderSecondary, error) +``` + + + + +### func \(\*CommandRecorderSecondary\) [Begin]() + +```go +func (c *CommandRecorderSecondary) Begin(viewport vk.Viewport, scissor vk.Rect2D) +``` + + + + +## type [ComputeShaderBuffer]() + + + +```go +type ComputeShaderBuffer struct { + ShaderBuffer + Shader *Shader + // contains filtered or unexported fields +} +``` + + +### func \(\*ComputeShaderBuffer\) [Initialize]() + +```go +func (b *ComputeShaderBuffer) Initialize(device *GPUDevice, size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags) error +``` + + + + +### func \(\*ComputeShaderBuffer\) [WriteDescriptors]() + +```go +func (b *ComputeShaderBuffer) WriteDescriptors(device *GPUDevice) +``` + + + + +## type [ComputeTask]() + + + +```go +type ComputeTask struct { + Shader *Shader + DescriptorSets []GPUDescriptorSet + WorkGroups [3]uint32 +} +``` + + +## type [DescriptorSetLayoutStructure]() + + + +```go +type DescriptorSetLayoutStructure struct { + Types []DescriptorSetLayoutStructureType +} +``` + + +## type [DescriptorSetLayoutStructureType]() + + + +```go +type DescriptorSetLayoutStructureType struct { + Type vulkan_const.DescriptorType + Flags vulkan_const.ShaderStageFlagBits + Count, Binding uint32 +} +``` + + +## type [DrawInstance]() + + + +```go +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) + // contains filtered or unexported methods +} +``` + + +### func [ReflectDuplicateDrawInstance]() + +```go +func ReflectDuplicateDrawInstance(target DrawInstance) DrawInstance +``` + + + + +## type [DrawInstanceGroup]() + + + +```go +type DrawInstanceGroup struct { + Mesh *Mesh + InstanceDriverData + MaterialInstance *Material + + Instances []DrawInstance + // contains filtered or unexported fields +} +``` + + +### func [NewDrawInstanceGroup]() + +```go +func NewDrawInstanceGroup(mesh *Mesh, dataSize int, viewCuller ViewCuller) DrawInstanceGroup +``` + + + + +### func \(\*DrawInstanceGroup\) [AddInstance]() + +```go +func (d *DrawInstanceGroup) AddInstance(instance DrawInstance) +``` + + + + +### func \(\*DrawInstanceGroup\) [AlterPadding]() + +```go +func (d *DrawInstanceGroup) AlterPadding(blockSize int) +``` + + + + +### func \(\*DrawInstanceGroup\) [AnyVisible]() + +```go +func (d *DrawInstanceGroup) AnyVisible() bool +``` + + + + +### func \(\*DrawInstanceGroup\) [Clear]() + +```go +func (d *DrawInstanceGroup) Clear() +``` + + + + +### func \(\*DrawInstanceGroup\) [Destroy]() + +```go +func (d *DrawInstanceGroup) Destroy(device *GPUDevice) +``` + + + + +### func \(\*DrawInstanceGroup\) [IsEmpty]() + +```go +func (d *DrawInstanceGroup) IsEmpty() bool +``` + + + + +### func \(\*DrawInstanceGroup\) [IsReady]() + +```go +func (d *DrawInstanceGroup) IsReady() bool +``` + + + + +### func \(\*DrawInstanceGroup\) [TotalSize]() + +```go +func (d *DrawInstanceGroup) TotalSize() int +``` + + + + +### func \(\*DrawInstanceGroup\) [UpdateData]() + +```go +func (d *DrawInstanceGroup) UpdateData(device *GPUDevice, frame int, lights LightsForRender) +``` + + + + +### func \(\*DrawInstanceGroup\) [VisibleCount]() + +```go +func (d *DrawInstanceGroup) VisibleCount() int +``` + + + + +### func \(\*DrawInstanceGroup\) [VisibleSize]() + +```go +func (d *DrawInstanceGroup) VisibleSize() int +``` + + + + +## type [Drawing]() + +Drawing represents a renderable entity in the engine. It bundles together the material, mesh, shader instance data, transform, sorting order, and an optional view culler used during rendering. + +```go +type Drawing struct { + // Material defines the visual appearance and render pass for the drawing. + Material *Material + // Mesh contains the geometry to be rendered. + Mesh *Mesh + // ShaderData holds per‑instance data for the shader (e.g., uniforms). + ShaderData DrawInstance + // Transform specifies the transform this drawing follows. + Transform *matrix.Transform + // Sort determines the draw order within a render pass. + Sort int + // ViewCuller optionally culls the drawing based on the view frustum. + ViewCuller ViewCuller +} +``` + + +### func \(\*Drawing\) [IsValid]() + +```go +func (d *Drawing) IsValid() bool +``` + +IsValid reports whether the Drawing is properly configured for rendering. A Drawing is considered valid if it has a non\-nil Material. This check is used before submitting the drawing to the render pipeline. + + +## type [Drawings]() + + + +```go +type Drawings struct { + // contains filtered or unexported fields +} +``` + + +### func [NewDrawings]() + +```go +func NewDrawings() Drawings +``` + + + + +### func \(\*Drawings\) [AddDrawing]() + +```go +func (d *Drawings) AddDrawing(drawing Drawing) +``` + + + + +### func \(\*Drawings\) [AddDrawings]() + +```go +func (d *Drawings) AddDrawings(drawings []Drawing) +``` + + + + +### func \(\*Drawings\) [Clear]() + +```go +func (d *Drawings) Clear() +``` + + + + +### func \(\*Drawings\) [Destroy]() + +```go +func (d *Drawings) Destroy(device *GPUDevice) +``` + + + + +### func \(\*Drawings\) [HasDrawings]() + +```go +func (d *Drawings) HasDrawings() bool +``` + + + + +### func \(\*Drawings\) [PreparePending]() + +```go +func (d *Drawings) PreparePending(shadowCascades uint8) +``` + + + + +### func \(\*Drawings\) [Render]() + +```go +func (d *Drawings) Render(device *GPUDevice, lights LightsForRender) +``` + + + + +## type [FontBaseline]() + + + +```go +type FontBaseline int +``` + + +## type [FontCache]() + + + +```go +type FontCache struct { + FaceMutex sync.RWMutex + // contains filtered or unexported fields +} +``` + + +### func [NewFontCache]() + +```go +func NewFontCache(device *GPUDevice, assetDb assets.Database) FontCache +``` + + + + +### func \(\*FontCache\) [Destroy]() + +```go +func (cache *FontCache) Destroy() +``` + + + + +### func \(\*FontCache\) [EMSize]() + +```go +func (cache *FontCache) EMSize(face FontFace) float32 +``` + + + + +### func \(\*FontCache\) [Init]() + +```go +func (cache *FontCache) Init(caches RenderCaches) error +``` + + + + +### func \(\*FontCache\) [LineCountWithin]() + +```go +func (cache *FontCache) LineCountWithin(face FontFace, text string, scale, maxWidth float32) int +``` + + + + +### func \(\*FontCache\) [MeasureCharacter]() + +```go +func (cache *FontCache) MeasureCharacter(face string, r rune, pixelSize float32) matrix.Vec2 +``` + + + + +### func \(\*FontCache\) [MeasureString]() + +```go +func (cache *FontCache) MeasureString(face FontFace, text string, scale float32) float32 +``` + + + + +### func \(\*FontCache\) [MeasureStringWithin]() + +```go +func (cache *FontCache) MeasureStringWithin(face FontFace, text string, scale, maxWidth float32, lineHeight float32) matrix.Vec2 +``` + + + + +### func \(\*FontCache\) [PointOffsetWithin]() + +```go +func (cache *FontCache) PointOffsetWithin(face FontFace, text string, point matrix.Vec2, scale, maxWidth float32) int +``` + + + + +### func \(\*FontCache\) [PreloadFace]() + +```go +func (cache *FontCache) PreloadFace(face FontFace) +``` + + + + +### func \(\*FontCache\) [RenderMeshes]() + +```go +func (cache *FontCache) RenderMeshes(caches RenderCaches, 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 +``` + + + + +### func \(\*FontCache\) [StringRectsWithinNew]() + +```go +func (cache *FontCache) StringRectsWithinNew(face FontFace, text string, scale, maxWidth float32) []matrix.Vec4 +``` + + + + +### func \(\*FontCache\) [TransparentMaterial]() + +```go +func (cache *FontCache) TransparentMaterial(target *Material) *Material +``` + + + + +## type [FontFace]() + + + +```go +type FontFace string +``` + + +### func \(FontFace\) [AsBold]() + +```go +func (f FontFace) AsBold() FontFace +``` + + + + +### func \(FontFace\) [AsExtraBold]() + +```go +func (f FontFace) AsExtraBold() FontFace +``` + + + + +### func \(FontFace\) [AsItalic]() + +```go +func (f FontFace) AsItalic() FontFace +``` + + + + +### func \(FontFace\) [AsLight]() + +```go +func (f FontFace) AsLight() FontFace +``` + + + + +### func \(FontFace\) [AsMedium]() + +```go +func (f FontFace) AsMedium() FontFace +``` + + + + +### func \(FontFace\) [AsRegular]() + +```go +func (f FontFace) AsRegular() FontFace +``` + + + + +### func \(FontFace\) [AsSemiBold]() + +```go +func (f FontFace) AsSemiBold() FontFace +``` + + + + +### func \(FontFace\) [Base]() + +```go +func (f FontFace) Base() FontFace +``` + + + + +### func \(FontFace\) [IsBold]() + +```go +func (f FontFace) IsBold() bool +``` + + + + +### func \(FontFace\) [IsExtraBold]() + +```go +func (f FontFace) IsExtraBold() bool +``` + + + + +### func \(FontFace\) [IsItalic]() + +```go +func (f FontFace) IsItalic() bool +``` + + + + +### func \(FontFace\) [RemoveBold]() + +```go +func (f FontFace) RemoveBold() FontFace +``` + + + + +### func \(FontFace\) [RemoveItalic]() + +```go +func (f FontFace) RemoveItalic() FontFace +``` + + + + +## type [FontJustify]() + + + +```go +type FontJustify int +``` + + +## type [FuncPipeline]() + + + +```go +type FuncPipeline func(device *GPUDevice, shader *Shader, shaderStages []vk.PipelineShaderStageCreateInfo) bool +``` + + +## type [GPUAccessFlags]() + + + +```go +type GPUAccessFlags uint32 +``` + + + +```go +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 +) +``` + + +## type [GPUApplication]() + + + +```go +type GPUApplication struct { + Name string + Version GPUApplicationVersion + Instances []*GPUApplicationInstance +} +``` + + +### func \(\*GPUApplication\) [ApplicationVersion]() + +```go +func (g *GPUApplication) ApplicationVersion() (major int, minor int, patch int) +``` + + + + +### func \(\*GPUApplication\) [CreateInstance]() + +```go +func (g *GPUApplication) CreateInstance(window RenderingContainer, assets assets.Database) (*GPUApplicationInstance, error) +``` + + + + +### func \(\*GPUApplication\) [Destroy]() + +```go +func (g *GPUApplication) Destroy() +``` + + + + +### func \(\*GPUApplication\) [EngineVersion]() + +```go +func (g *GPUApplication) EngineVersion() (major int, minor int, patch int) +``` + + + + +### func \(\*GPUApplication\) [FirstInstance]() + +```go +func (g *GPUApplication) FirstInstance() *GPUApplicationInstance +``` + + + + +### func \(\*GPUApplication\) [Instance]() + +```go +func (g *GPUApplication) Instance(index int) (*GPUApplicationInstance, bool) +``` + + + + +### func \(\*GPUApplication\) [IsValid]() + +```go +func (g *GPUApplication) IsValid() bool +``` + + + + +### func \(\*GPUApplication\) [Setup]() + +```go +func (g *GPUApplication) Setup(name string, version GPUApplicationVersion) +``` + + + + +## type [GPUApplicationInstance]() + + + +```go +type GPUApplicationInstance struct { + GPUInstance + Surface GPUSurface + Devices []GPUDevice + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUApplicationInstance\) [Destroy]() + +```go +func (g *GPUApplicationInstance) Destroy() +``` + + + + +### func \(\*GPUApplicationInstance\) [FinalizeLogicalDeviceSetup]() + +```go +func (g *GPUApplicationInstance) FinalizeLogicalDeviceSetup() +``` + + + + +### func \(\*GPUApplicationInstance\) [Initialize]() + +```go +func (g *GPUApplicationInstance) Initialize(window RenderingContainer, app *GPUApplication, assets assets.Database) error +``` + + + + +### func \(\*GPUApplicationInstance\) [PhysicalDevice]() + +```go +func (g *GPUApplicationInstance) PhysicalDevice() *GPUPhysicalDevice +``` + + + + +### func \(\*GPUApplicationInstance\) [PrimaryDevice]() + +```go +func (g *GPUApplicationInstance) PrimaryDevice() *GPUDevice +``` + + + + +### func \(\*GPUApplicationInstance\) [SelectPhysicalDevice]() + +```go +func (g *GPUApplicationInstance) SelectPhysicalDevice(method func(options []GPUPhysicalDevice) int) error +``` + + + + +### func \(\*GPUApplicationInstance\) [SetupCaches]() + +```go +func (g *GPUApplicationInstance) SetupCaches(caches RenderCaches, width, height int32) error +``` + + + + +### func \(\*GPUApplicationInstance\) [SetupLogicalDevice]() + +```go +func (g *GPUApplicationInstance) SetupLogicalDevice(index int) error +``` + + + + +## type [GPUApplicationVersion]() + + + +```go +type GPUApplicationVersion struct { + Major int + Minor int + Patch int +} +``` + + +## type [GPUAttachmentLoadOp]() + + + +```go +type GPUAttachmentLoadOp uint8 +``` + + + +```go +const ( + GPUAttachmentLoadOpLoad GPUAttachmentLoadOp = iota + GPUAttachmentLoadOpClear + GPUAttachmentLoadOpDontCare +) +``` + + +## type [GPUAttachmentStoreOp]() + + + +```go +type GPUAttachmentStoreOp uint8 +``` + + + +```go +const ( + GPUAttachmentStoreOpStore GPUAttachmentStoreOp = iota + GPUAttachmentStoreOpDontCare +) +``` + + +## type [GPUBuffer]() + + + +```go +type GPUBuffer struct{ GPUHandle } +``` + + +## type [GPUBufferUsageFlags]() + + + +```go +type GPUBufferUsageFlags uint16 +``` + + + +```go +const ( + GPUBufferUsageTransferSrcBit GPUBufferUsageFlags = (1 << iota) + GPUBufferUsageTransferDstBit + GPUBufferUsageUniformTexelBufferBit + GPUBufferUsageStorageTexelBufferBit + GPUBufferUsageUniformBufferBit + GPUBufferUsageStorageBufferBit + GPUBufferUsageIndexBufferBit + GPUBufferUsageVertexBufferBit + GPUBufferUsageIndirectBufferBit + GPUBufferUsageTransformFeedbackBufferBit + GPUBufferUsageTransformFeedbackCounterBufferBit + GPUBufferUsageConditionalRenderingBit + GPUBufferUsageRaytracingBitNvx +) +``` + + +## type [GPUColorSpace]() + + + +```go +type GPUColorSpace int32 +``` + + + +```go +const ( + GPUColorSpaceSrgbNonlinear GPUColorSpace = iota + GPUColorSpaceDisplayP3Nonlinear + GPUColorSpaceExtendedSrgbLinear + GPUColorSpaceDciP3Linear + GPUColorSpaceDciP3Nonlinear + GPUColorSpaceBt709Linear + GPUColorSpaceBt709Nonlinear + GPUColorSpaceBt2020Linear + GPUColorSpaceHdr10St2084 + GPUColorSpaceDolbyvision + GPUColorSpaceHdr10Hlg + GPUColorSpaceAdobergbLinear + GPUColorSpaceAdobergbNonlinear + GPUColorSpacePassThrough + GPUColorSpaceExtendedSrgbNonlinear +) +``` + + +## type [GPUCompositeAlphaFlags]() + + + +```go +type GPUCompositeAlphaFlags int32 +``` + + + +```go +const ( + GPUCompositeAlphaOpaqueBit GPUCompositeAlphaFlags = (1 << iota) + GPUCompositeAlphaPreMultipliedBit + GPUCompositeAlphaPostMultipliedBit + GPUCompositeAlphaInheritBit +) +``` + + +## type [GPUDescriptorImageInfo]() + + + +```go +type GPUDescriptorImageInfo struct { + Sampler GPUSampler + ImageView GPUImageView + ImageLayout GPUImageLayout +} +``` + + +## type [GPUDescriptorPool]() + + + +```go +type GPUDescriptorPool struct{ GPUHandle } +``` + + +## type [GPUDescriptorSet]() + + + +```go +type GPUDescriptorSet struct{ GPUHandle } +``` + + +## type [GPUDescriptorSetLayout]() + + + +```go +type GPUDescriptorSetLayout struct{ GPUHandle } +``` + + +## type [GPUDevice]() + + + +```go +type GPUDevice struct { + PhysicalDevice GPUPhysicalDevice + LogicalDevice GPULogicalDevice + Painter GPUPainter + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUDevice\) [BlitTargets]() + +```go +func (g *GPUDevice) BlitTargets(passes []*RenderPass) +``` + + + + +### func \(\*GPUDevice\) [CopyBuffer]() + +```go +func (g *GPUDevice) CopyBuffer(srcBuffer GPUBuffer, dstBuffer GPUBuffer, size uintptr) +``` + + + + +### func \(\*GPUDevice\) [CopyBufferToImage]() + +```go +func (g *GPUDevice) CopyBufferToImage(buffer GPUBuffer, image GPUImage, width, height uint32, layerCount int) +``` + + + + +### func \(\*GPUDevice\) [CreateBuffer]() + +```go +func (g *GPUDevice) CreateBuffer(size uintptr, usage GPUBufferUsageFlags, properties GPUMemoryPropertyFlags) (GPUBuffer, GPUDeviceMemory, error) +``` + + + + +### func \(\*GPUDevice\) [CreateFrameBuffer]() + +```go +func (g *GPUDevice) CreateFrameBuffer(renderPass *RenderPass, attachments []GPUImageView, width, height int32) (GPUFrameBuffer, error) +``` + + + + +### func \(\*GPUDevice\) [CreateImage]() + +```go +func (g *GPUDevice) CreateImage(id *TextureId, properties GPUMemoryPropertyFlags, req GPUImageCreateRequest) error +``` + + + + +### func \(\*GPUDevice\) [CreateIndexBuffer]() + +```go +func (g *GPUDevice) CreateIndexBuffer(indices []uint32) (GPUBuffer, GPUDeviceMemory, error) +``` + + + + +### func \(\*GPUDevice\) [CreateMesh]() + +```go +func (g *GPUDevice) CreateMesh(mesh *Mesh, verts []Vertex, indices []uint32) +``` + + + + +### func \(\*GPUDevice\) [CreateShader]() + +```go +func (g *GPUDevice) CreateShader(shader *Shader, assetDB assets.Database) error +``` + + + + +### func \(\*GPUDevice\) [CreateSwapChain]() + +```go +func (g *GPUDevice) CreateSwapChain(window RenderingContainer, inst *GPUApplicationInstance) error +``` + + + + +### func \(\*GPUDevice\) [CreateTextureSampler]() + +```go +func (g *GPUDevice) CreateTextureSampler(mipLevels uint32, filter GPUFilter) (GPUSampler, error) +``` + + + + +### func \(\*GPUDevice\) [CreateVertexBuffer]() + +```go +func (g *GPUDevice) CreateVertexBuffer(verts []Vertex) (GPUBuffer, GPUDeviceMemory, error) +``` + + + + +### func \(\*GPUDevice\) [DestroyBuffer]() + +```go +func (g *GPUDevice) DestroyBuffer(buffer GPUBuffer) +``` + + + + +### func \(\*GPUDevice\) [DestroyFrameBuffer]() + +```go +func (g *GPUDevice) DestroyFrameBuffer(frameBuffer GPUFrameBuffer) +``` + + + + +### func \(\*GPUDevice\) [DestroyShaderHandle]() + +```go +func (g *GPUDevice) DestroyShaderHandle(id ShaderId) +``` + + + + +### func \(\*GPUDevice\) [Draw]() + +```go +func (g *GPUDevice) Draw(renderPass *RenderPass, drawings []ShaderDraw, lights LightsForRender, shadows []TextureId) +``` + + + + +### func \(\*GPUDevice\) [FreeMemory]() + +```go +func (g *GPUDevice) FreeMemory(memory GPUDeviceMemory) +``` + + + + +### func \(\*GPUDevice\) [GenerateMipMaps]() + +```go +func (g *GPUDevice) GenerateMipMaps(texId *TextureId, imageFormat GPUFormat, texWidth, texHeight, mipLevels uint32, filter GPUFilter) error +``` + + + + +### func \(\*GPUDevice\) [MapMemory]() + +```go +func (g *GPUDevice) MapMemory(memory GPUDeviceMemory, offset uintptr, size uintptr, flags GPUMemoryFlags, out *unsafe.Pointer) error +``` + + + + +### func \(\*GPUDevice\) [Memcopy]() + +```go +func (g *GPUDevice) Memcopy(dst unsafe.Pointer, src []byte) int +``` + + + + +### func \(\*GPUDevice\) [MeshIsReady]() + +```go +func (g *GPUDevice) MeshIsReady(mesh Mesh) bool +``` + + + + +### func \(\*GPUDevice\) [QueueCompute]() + +```go +func (g *GPUDevice) QueueCompute(buffer *ComputeShaderBuffer) +``` + + + + +### func \(\*GPUDevice\) [ReadyFrame]() + +```go +func (g *GPUDevice) ReadyFrame(inst *GPUApplicationInstance, window RenderingContainer, camera cameras.Camera, uiCamera cameras.Camera, lights LightsForRender, runtime float32) bool +``` + + + + +### func \(\*GPUDevice\) [SetupTexture]() + +```go +func (g *GPUDevice) SetupTexture(texture *Texture, data *TextureData) error +``` + + + + +### func \(\*GPUDevice\) [SwapFrame]() + +```go +func (g *GPUDevice) SwapFrame(window RenderingContainer, inst *GPUApplicationInstance, width, height int32) bool +``` + + + + +### func \(\*GPUDevice\) [TextureRead]() + +```go +func (g *GPUDevice) TextureRead(texture *Texture) ([]byte, error) +``` + + + + +### func \(\*GPUDevice\) [TextureReadPixel]() + +```go +func (g *GPUDevice) TextureReadPixel(texture *Texture, x, y int) matrix.Color +``` + + + + +### func \(\*GPUDevice\) [TextureWritePixels]() + +```go +func (g *GPUDevice) TextureWritePixels(texture *Texture, requests []GPUImageWriteRequest) +``` + + + + +### func \(\*GPUDevice\) [TransitionImageLayout]() + +```go +func (g *GPUDevice) TransitionImageLayout(vt *TextureId, newLayout GPUImageLayout, aspectMask GPUImageAspectFlags, newAccess GPUAccessFlags, cmd *CommandRecorder) +``` + + + + +### func \(\*GPUDevice\) [UnmapMemory]() + +```go +func (g *GPUDevice) UnmapMemory(memory GPUDeviceMemory) +``` + + + + +### func \(\*GPUDevice\) [WriteBufferToImageRegion]() + +```go +func (g *GPUDevice) WriteBufferToImageRegion(image GPUImage, requests []GPUImageWriteRequest) error +``` + + + + +## type [GPUDeviceMemory]() + + + +```go +type GPUDeviceMemory struct{ GPUHandle } +``` + + +## type [GPUFence]() + + + +```go +type GPUFence struct{ GPUHandle } +``` + + +## type [GPUFilter]() + + + +```go +type GPUFilter uint8 +``` + + + +```go +const ( + GPUFilterNearest GPUFilter = iota + GPUFilterLinear + GPUFilterCubicImg +) +``` + + +## type [GPUFormat]() + + + +```go +type GPUFormat int32 +``` + + + +```go +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 +) +``` + + +## type [GPUFormatFeatureFlags]() + + + +```go +type GPUFormatFeatureFlags int32 +``` + + + +```go +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 +) +``` + + +## type [GPUFormatProperties]() + + + +```go +type GPUFormatProperties struct { + LinearTilingFeatures GPUFormatFeatureFlags + OptimalTilingFeatures GPUFormatFeatureFlags + BufferFeatures GPUFormatFeatureFlags +} +``` + + +## type [GPUFrameBuffer]() + + + +```go +type GPUFrameBuffer struct{ GPUHandle } +``` + + +## type [GPUHandle]() + + + +```go +type GPUHandle struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUHandle\) [HandleAddr]() + +```go +func (g *GPUHandle) HandleAddr() unsafe.Pointer +``` + + + + +### func \(\*GPUHandle\) [IsValid]() + +```go +func (g *GPUHandle) IsValid() bool +``` + + + + +### func \(\*GPUHandle\) [Reset]() + +```go +func (g *GPUHandle) Reset() +``` + + + + +## type [GPUImage]() + + + +```go +type GPUImage struct{ GPUHandle } +``` + + +## type [GPUImageAspectFlags]() + + + +```go +type GPUImageAspectFlags uint16 +``` + + + +```go +const ( + GPUImageAspectColorBit GPUImageAspectFlags = (1 << iota) + GPUImageAspectDepthBit + GPUImageAspectStencilBit + GPUImageAspectMetadataBit + GPUImageAspectPlane0Bit + GPUImageAspectPlane1Bit + GPUImageAspectPlane2Bit + GPUImageAspectMemoryPlane0Bit + GPUImageAspectMemoryPlane1Bit + GPUImageAspectMemoryPlane2Bit + GPUImageAspectMemoryPlane3Bit +) +``` + + +## type [GPUImageCreateFlags]() + + + +```go +type GPUImageCreateFlags uint16 +``` + + + +```go +const ( + GPUImageCreateSparseBindingBit GPUImageCreateFlags = (1 << iota) + GPUImageCreateSparseResidencyBit + GPUImageCreateSparseAliasedBit + GPUImageCreateMutableFormatBit + GPUImageCreateCubeCompatibleBit + GPUImageCreateAliasBit + GPUImageCreateSplitInstanceBindRegionsBit + GPUImageCreate2dArrayCompatibleBit + GPUImageCreateBlockTexelViewCompatibleBit + GPUImageCreateExtendedUsageBit + GPUImageCreateProtectedBit + GPUImageCreateDisjointBit + GPUImageCreateCornerSampledBitNv + GPUImageCreateSampleLocationsCompatibleDepthBit +) +``` + + +## type [GPUImageCreateRequest]() + + + +```go +type GPUImageCreateRequest struct { + Flags GPUImageCreateFlags + ImageType GPUImageType + Format GPUFormat + Extent matrix.Vec3i + MipLevels uint32 + ArrayLayers uint32 + Samples GPUSampleCountFlags + Tiling GPUImageTiling + Usage GPUImageUsageFlags +} +``` + + +## type [GPUImageLayout]() + + + +```go +type GPUImageLayout uint16 +``` + + + +```go +const ( + GPUImageLayoutUndefined GPUImageLayout = iota + GPUImageLayoutGeneral + GPUImageLayoutColorAttachmentOptimal + GPUImageLayoutDepthStencilAttachmentOptimal + GPUImageLayoutDepthStencilReadOnlyOptimal + GPUImageLayoutShaderReadOnlyOptimal + GPUImageLayoutTransferSrcOptimal + GPUImageLayoutTransferDstOptimal + GPUImageLayoutPreinitialized + GPUImageLayoutDepthReadOnlyStencilAttachmentOptimal + GPUImageLayoutDepthAttachmentStencilReadOnlyOptimal + GPUImageLayoutPresentSrc + GPUImageLayoutSharedPresent + GPUImageLayoutShadingRateOptimalNv +) +``` + + +## type [GPUImageTiling]() + + + +```go +type GPUImageTiling uint8 +``` + + + +```go +const ( + GPUImageTilingOptimal GPUImageTiling = iota + GPUImageTilingLinear + GPUImageTilingDrmFormatModifier +) +``` + + +## type [GPUImageType]() + + + +```go +type GPUImageType uint8 +``` + + + +```go +const ( + GPUImageType1d GPUImageType = iota + GPUImageType2d + GPUImageType3d +) +``` + + +## type [GPUImageUsageFlags]() + + + +```go +type GPUImageUsageFlags int32 +``` + + + +```go +const ( + GPUImageUsageTransferSrcBit GPUImageUsageFlags = (1 << iota) + GPUImageUsageTransferDstBit + GPUImageUsageSampledBit + GPUImageUsageStorageBit + GPUImageUsageColorAttachmentBit + GPUImageUsageDepthStencilAttachmentBit + GPUImageUsageTransientAttachmentBit + GPUImageUsageInputAttachmentBit + GPUImageUsageShadingRateImageBitNv +) +``` + + +## type [GPUImageView]() + + + +```go +type GPUImageView struct{ GPUHandle } +``` + + +## type [GPUImageViewType]() + + + +```go +type GPUImageViewType uint8 +``` + + + +```go +const ( + GPUImageViewType1d GPUImageViewType = iota + GPUImageViewType2d + GPUImageViewType3d + GPUImageViewTypeCube + GPUImageViewType1dArray + GPUImageViewType2dArray + GPUImageViewTypeCubeArray +) +``` + + +## type [GPUImageWriteRequest]() + + + +```go +type GPUImageWriteRequest struct { + Region matrix.Vec4i + Pixels []byte +} +``` + + +## type [GPUInstance]() + + + +```go +type GPUInstance struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUInstance\) [Destroy]() + +```go +func (g *GPUInstance) Destroy() +``` + + + + +### func \(\*GPUInstance\) [IsValid]() + +```go +func (g *GPUInstance) IsValid() bool +``` + + + + +### func \(\*GPUInstance\) [Setup]() + +```go +func (g *GPUInstance) Setup(window RenderingContainer, app *GPUApplication) error +``` + + + + +## type [GPULight]() + + + +```go +type GPULight struct { + Matrix [cubeMapSides]matrix.Mat4 + Position matrix.Vec3 + + Direction matrix.Vec3 + // contains filtered or unexported fields +} +``` + + +## type [GPULightInfo]() + + + +```go +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 + // contains filtered or unexported fields +} +``` + + +## type [GPULogicalDevice]() + + + +```go +type GPULogicalDevice struct { + GPUHandle + + SwapChain GPUSwapChain + // contains filtered or unexported fields +} +``` + + +### func \(\*GPULogicalDevice\) [CreateImageView]() + +```go +func (g *GPULogicalDevice) CreateImageView(id *TextureId, aspectFlags GPUImageAspectFlags, viewType GPUImageViewType) error +``` + + + + +### func \(\*GPULogicalDevice\) [Destroy]() + +```go +func (g *GPULogicalDevice) Destroy() +``` + + + + +### func \(\*GPULogicalDevice\) [DestroyFence]() + +```go +func (g *GPULogicalDevice) DestroyFence(fence *GPUFence) +``` + + + + +### func \(\*GPULogicalDevice\) [DestroyGroup]() + +```go +func (g *GPULogicalDevice) DestroyGroup(group *DrawInstanceGroup) +``` + + + + +### func \(\*GPULogicalDevice\) [DestroySemaphore]() + +```go +func (g *GPULogicalDevice) DestroySemaphore(semaphore *GPUSemaphore) +``` + + + + +### func \(\*GPULogicalDevice\) [FreeTexture]() + +```go +func (g *GPULogicalDevice) FreeTexture(texId *TextureId) +``` + + + + +### func \(\*GPULogicalDevice\) [ImageMemoryRequirements]() + +```go +func (g *GPULogicalDevice) ImageMemoryRequirements(image GPUImage) GPUMemoryRequirements +``` + + + + +### func \(\*GPULogicalDevice\) [RemakeSwapChain]() + +```go +func (g *GPULogicalDevice) RemakeSwapChain(window RenderingContainer, inst *GPUApplicationInstance, device *GPUDevice) error +``` + + + + +### func \(\*GPULogicalDevice\) [Setup]() + +```go +func (g *GPULogicalDevice) Setup(inst *GPUApplicationInstance, physicalDevice *GPUPhysicalDevice) error +``` + + + + +### func \(\*GPULogicalDevice\) [SetupBufferDestroyer]() + +```go +func (g *GPULogicalDevice) SetupBufferDestroyer(device *GPUDevice) +``` + + + + +### func \(\*GPULogicalDevice\) [WaitForFences]() + +```go +func (g *GPULogicalDevice) WaitForFences(fences []GPUFence) +``` + + + + +### func \(\*GPULogicalDevice\) [WaitForRender]() + +```go +func (g *GPULogicalDevice) WaitForRender(device *GPUDevice) +``` + + + + +### func \(\*GPULogicalDevice\) [WaitIdle]() + +```go +func (g *GPULogicalDevice) WaitIdle() +``` + + + + +## type [GPUMemoryFlags]() + + + +```go +type GPUMemoryFlags uint16 +``` + + + +```go +const ( + GPUMemoryMapPlacedBit GPUMemoryFlags = (1 << iota) +) +``` + + +## type [GPUMemoryHeap]() + + + +```go +type GPUMemoryHeap struct { + Size uintptr + Flags GPUMemoryHeapFlags +} +``` + + +## type [GPUMemoryHeapFlags]() + + + +```go +type GPUMemoryHeapFlags uint8 +``` + + + +```go +const ( + GPUMemoryHeapDeviceLocalBit GPUMemoryHeapFlags = (1 << iota) + GPUMemoryHeapMultiInstanceBit +) +``` + + +## type [GPUMemoryPropertyFlags]() + + + +```go +type GPUMemoryPropertyFlags uint8 +``` + + + +```go +const ( + GPUMemoryPropertyDeviceLocalBit GPUMemoryPropertyFlags = (1 << iota) + GPUMemoryPropertyHostVisibleBit + GPUMemoryPropertyHostCoherentBit + GPUMemoryPropertyHostCachedBit + GPUMemoryPropertyLazilyAllocatedBit + GPUMemoryPropertyProtectedBit +) +``` + + +## type [GPUMemoryRequirements]() + + + +```go +type GPUMemoryRequirements struct { + Size uintptr + Alignment uintptr + MemoryTypeBits uint32 +} +``` + + +## type [GPUMemoryType]() + + + +```go +type GPUMemoryType struct { + PropertyFlags GPUMemoryPropertyFlags + HeapIndex uint32 +} +``` + + +## type [GPUPainter]() + + + +```go +type GPUPainter struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUPainter\) [DestroyDescriptorPools]() + +```go +func (g *GPUPainter) DestroyDescriptorPools(device *GPUDevice) +``` + + + + +## type [GPUPhysicalDevice]() + + + +```go +type GPUPhysicalDevice struct { + Features GPUPhysicalDeviceFeatures + Properties GPUPhysicalDeviceProperties + QueueFamilies []GPUQueueFamily + Extensions []GPUPhysicalDeviceExtension + SurfaceFormats []GPUSurfaceFormat + PresentModes []GPUPresentMode + SurfaceCapabilities GPUSurfaceCapabilities + // contains filtered or unexported fields +} +``` + + +### func [ListPhysicalGpuDevices]() + +```go +func ListPhysicalGpuDevices(inst *GPUApplicationInstance) ([]GPUPhysicalDevice, error) +``` + + + + +### func \(\*GPUPhysicalDevice\) [FindComputeFamiliy]() + +```go +func (g *GPUPhysicalDevice) FindComputeFamiliy() GPUQueueFamily +``` + + + + +### func \(\*GPUPhysicalDevice\) [FindGraphicsFamiliy]() + +```go +func (g *GPUPhysicalDevice) FindGraphicsFamiliy() GPUQueueFamily +``` + + + + +### func \(\*GPUPhysicalDevice\) [FindMemoryType]() + +```go +func (g *GPUPhysicalDevice) FindMemoryType(typeFilter uint32, properties GPUMemoryPropertyFlags) int +``` + + + + +### func \(\*GPUPhysicalDevice\) [FindPresentFamily]() + +```go +func (g *GPUPhysicalDevice) FindPresentFamily() GPUQueueFamily +``` + + + + +### func \(\*GPUPhysicalDevice\) [FindSupportedFormat]() + +```go +func (g *GPUPhysicalDevice) FindSupportedFormat(candidates []GPUFormat, tiling GPUImageTiling, features GPUFormatFeatureFlags) GPUFormat +``` + + + + +### func \(\*GPUPhysicalDevice\) [FormatIsTileable]() + +```go +func (g *GPUPhysicalDevice) FormatIsTileable(format GPUFormat, tiling GPUImageTiling) bool +``` + + + + +### func \(\*GPUPhysicalDevice\) [FormatProperties]() + +```go +func (g *GPUPhysicalDevice) FormatProperties(format GPUFormat) GPUFormatProperties +``` + + + + +### func \(\*GPUPhysicalDevice\) [IsExtensionSupported]() + +```go +func (g *GPUPhysicalDevice) IsExtensionSupported(extension string) bool +``` + + + + +### func \(\*GPUPhysicalDevice\) [IsValid]() + +```go +func (g *GPUPhysicalDevice) IsValid() bool +``` + + + + +### func \(\*GPUPhysicalDevice\) [MaxUsableSampleCount]() + +```go +func (g *GPUPhysicalDevice) MaxUsableSampleCount() GPUSampleCountFlags +``` + + + + +### func \(\*GPUPhysicalDevice\) [PadBufferSize]() + +```go +func (g *GPUPhysicalDevice) PadBufferSize(size uintptr) uintptr +``` + + + + +### func \(\*GPUPhysicalDevice\) [RefreshSurfaceCapabilities]() + +```go +func (g *GPUPhysicalDevice) RefreshSurfaceCapabilities(surface unsafe.Pointer) +``` + + + + +## type [GPUPhysicalDeviceExtension]() + + + +```go +type GPUPhysicalDeviceExtension struct { + Name string + Version uint32 +} +``` + + +## type [GPUPhysicalDeviceFeatures]() + + + +```go +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 +} +``` + + +## type [GPUPhysicalDeviceLimits]() + + + +```go +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 +} +``` + + +## type [GPUPhysicalDeviceMemoryProperties]() + + + +```go +type GPUPhysicalDeviceMemoryProperties struct { + MemoryTypes []GPUMemoryType + MemoryHeaps []GPUMemoryHeap +} +``` + + +## type [GPUPhysicalDeviceProperties]() + + + +```go +type GPUPhysicalDeviceProperties struct { + ApiVersion uint32 + DriverVersion uint32 + VendorID uint32 + DeviceID uint32 + DeviceType GPUPhysicalDeviceType + DeviceName string + PipelineCacheUUID string + Limits GPUPhysicalDeviceLimits + SparseProperties GPUPhysicalDeviceSparseProperties +} +``` + + +## type [GPUPhysicalDeviceSparseProperties]() + + + +```go +type GPUPhysicalDeviceSparseProperties struct { + ResidencyStandard2DBlockShape bool + ResidencyStandard2DMultisampleBlockShape bool + ResidencyStandard3DBlockShape bool + ResidencyAlignedMipSize bool + ResidencyNonResidentStrict bool +} +``` + + +## type [GPUPhysicalDeviceType]() + + + +```go +type GPUPhysicalDeviceType uint8 +``` + + + +```go +const ( + GPUPhysicalDeviceTypeOther GPUPhysicalDeviceType = iota + GPUPhysicalDeviceTypeIntegratedGpu + GPUPhysicalDeviceTypeDiscreteGpu + GPUPhysicalDeviceTypeVirtualGpu + GPUPhysicalDeviceTypeCpu +) +``` + + +## type [GPUPipeline]() + + + +```go +type GPUPipeline struct{ GPUHandle } +``` + + +## type [GPUPipelineLayout]() + + + +```go +type GPUPipelineLayout struct{ GPUHandle } +``` + + +## type [GPUPipelineStageFlags]() + + + +```go +type GPUPipelineStageFlags uint32 +``` + + + +```go +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 +) +``` + + +## type [GPUPresentMode]() + + + +```go +type GPUPresentMode int32 +``` + + + +```go +const ( + GPUPresentModeImmediate GPUPresentMode = iota + GPUPresentModeMailbox + GPUPresentModeFifo + GPUPresentModeFifoRelaxed + GPUPresentModeSharedDemandRefresh + GPUPresentModeSharedContinuousRefresh +) +``` + + +## type [GPUQueue]() + + + +```go +type GPUQueue struct{ GPUHandle } +``` + + +## type [GPUQueueFamily]() + + + +```go +type GPUQueueFamily struct { + Index int + MinImageTransferGranularity matrix.Vec3i + IsGraphics bool + IsCompute bool + IsTransfer bool + IsSparseBinding bool + IsProtected bool + HasPresentSupport bool +} +``` + + +### func [InvalidGPUQueueFamily]() + +```go +func InvalidGPUQueueFamily() GPUQueueFamily +``` + + + + +### func \(GPUQueueFamily\) [IsValid]() + +```go +func (g GPUQueueFamily) IsValid() bool +``` + + + + +## type [GPUResult]() + + + +```go +type GPUResult int32 +``` + + +## type [GPUSampleCountFlags]() + + + +```go +type GPUSampleCountFlags uint8 +``` + + + +```go +const ( + GPUSampleCount1Bit GPUSampleCountFlags = (1 << iota) + GPUSampleCount2Bit + GPUSampleCount4Bit + GPUSampleCount8Bit + GPUSampleCount16Bit + GPUSampleCount32Bit + GPUSampleCount64Bit + GPUSampleSwapChainCount +) +``` + + +## type [GPUSampler]() + + + +```go +type GPUSampler struct{ GPUHandle } +``` + + +## type [GPUSemaphore]() + + + +```go +type GPUSemaphore struct{ GPUHandle } +``` + + +## type [GPUShaderModule]() + + + +```go +type GPUShaderModule struct{ GPUHandle } +``` + + +## type [GPUSurface]() + + + +```go +type GPUSurface struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUSurface\) [Create]() + +```go +func (g *GPUSurface) Create(instance *GPUInstance, window RenderingContainer) error +``` + + + + +### func \(\*GPUSurface\) [Destroy]() + +```go +func (g *GPUSurface) Destroy(inst *GPUApplicationInstance) +``` + + + + +## type [GPUSurfaceCapabilities]() + + + +```go +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 +} +``` + + +## type [GPUSurfaceFormat]() + + + +```go +type GPUSurfaceFormat struct { + Format GPUFormat + ColorSpace GPUColorSpace +} +``` + + +## type [GPUSurfaceTransformFlags]() + + + +```go +type GPUSurfaceTransformFlags int32 +``` + + + +```go +const ( + GPUSurfaceTransformIdentityBit GPUSurfaceTransformFlags = (1 << iota) + GPUSurfaceTransformRotate90Bit + GPUSurfaceTransformRotate180Bit + GPUSurfaceTransformRotate270Bit + GPUSurfaceTransformHorizontalMirrorBit + GPUSurfaceTransformHorizontalMirrorRotate90Bit + GPUSurfaceTransformHorizontalMirrorRotate180Bit + GPUSurfaceTransformHorizontalMirrorRotate270Bit + GPUSurfaceTransformInheritBit +) +``` + + +## type [GPUSwapChain]() + + + +```go +type GPUSwapChain struct { + GPUHandle + Images []TextureId + Extent matrix.Vec2i + Depth TextureId + Color TextureId + FrameBuffers []GPUFrameBuffer + // contains filtered or unexported fields +} +``` + + +### func \(\*GPUSwapChain\) [CopyAndReset]() + +```go +func (g *GPUSwapChain) CopyAndReset() GPUSwapChain +``` + + + + +### func \(\*GPUSwapChain\) [CreateColor]() + +```go +func (g *GPUSwapChain) CreateColor(device *GPUDevice) error +``` + + + + +### func \(\*GPUSwapChain\) [CreateDepth]() + +```go +func (g *GPUSwapChain) CreateDepth(device *GPUDevice) error +``` + + + + +### func \(\*GPUSwapChain\) [CreateFrameBuffer]() + +```go +func (g *GPUSwapChain) CreateFrameBuffer(device *GPUDevice) error +``` + + + + +### func \(\*GPUSwapChain\) [Destroy]() + +```go +func (g *GPUSwapChain) Destroy(device *GPUDevice) +``` + + + + +### func \(\*GPUSwapChain\) [SelectExtent]() + +```go +func (g *GPUSwapChain) SelectExtent(window RenderingContainer, device *GPUPhysicalDevice) matrix.Vec2i +``` + + + + +### func \(\*GPUSwapChain\) [SelectPresentMode]() + +```go +func (g *GPUSwapChain) SelectPresentMode(device *GPUPhysicalDevice) GPUPresentMode +``` + + + + +### func \(\*GPUSwapChain\) [SelectSurfaceFormat]() + +```go +func (g *GPUSwapChain) SelectSurfaceFormat(device *GPUPhysicalDevice) GPUSurfaceFormat +``` + + + + +### func \(\*GPUSwapChain\) [Setup]() + +```go +func (g *GPUSwapChain) Setup(window RenderingContainer, inst *GPUApplicationInstance, device *GPUDevice) error +``` + + + + +### func \(\*GPUSwapChain\) [SetupImageViews]() + +```go +func (g *GPUSwapChain) SetupImageViews(device *GPUDevice) error +``` + + + + +### func \(\*GPUSwapChain\) [SetupRenderPass]() + +```go +func (g *GPUSwapChain) SetupRenderPass(device *GPUDevice, assets assets.Database) error +``` + + + + +### func \(\*GPUSwapChain\) [SetupSyncObjects]() + +```go +func (g *GPUSwapChain) SetupSyncObjects(device *GPUDevice) error +``` + + + + +## type [GPUSwapChainSupportDetails]() + + + +```go +type GPUSwapChainSupportDetails struct { + // contains filtered or unexported fields +} +``` + + +## type [GlobalShaderData]() + + + +```go +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 + // contains filtered or unexported fields +} +``` + + +## type [InstanceCopyData]() + + + +```go +type InstanceCopyData struct { + // contains filtered or unexported fields +} +``` + + +### func [InstanceCopyDataNew]() + +```go +func InstanceCopyDataNew(padding int) InstanceCopyData +``` + + + + +## type [InstanceDriverData]() + + + +```go +type InstanceDriverData struct { + // contains filtered or unexported fields +} +``` + + +## type [InstanceGroupSkinningData]() + + + +```go +type InstanceGroupSkinningData struct { +} +``` + + +## type [Light]() + + + +```go +type Light struct { + // contains filtered or unexported fields +} +``` + + +### func [NewLight]() + +```go +func NewLight(device *GPUDevice, assetDb assets.Database, materialCache *MaterialCache, lightType LightType) Light +``` + + + + +### func \(\*Light\) [Direction]() + +```go +func (l *Light) Direction(followcam cameras.Camera) matrix.Vec3 +``` + + + + +### func \(\*Light\) [FrameDirty]() + +```go +func (l *Light) FrameDirty() bool +``` + + + + +### func \(\*Light\) [IsValid]() + +```go +func (l *Light) IsValid() bool +``` + + + + +### func \(\*Light\) [ResetFrameDirty]() + +```go +func (l *Light) ResetFrameDirty() bool +``` + + + + +### func \(\*Light\) [SetAmbient]() + +```go +func (l *Light) SetAmbient(ambient matrix.Vec3) +``` + + + + +### func \(\*Light\) [SetCastsShadows]() + +```go +func (l *Light) SetCastsShadows(castsShadows bool) +``` + + + + +### func \(\*Light\) [SetConstant]() + +```go +func (l *Light) SetConstant(constant float32) +``` + + + + +### func \(\*Light\) [SetCutoff]() + +```go +func (l *Light) SetCutoff(cutoff float32) +``` + + + + +### func \(\*Light\) [SetDiffuse]() + +```go +func (l *Light) SetDiffuse(diffuse matrix.Vec3) +``` + + + + +### func \(\*Light\) [SetDirection]() + +```go +func (l *Light) SetDirection(dir matrix.Vec3) +``` + + + + +### func \(\*Light\) [SetIntensity]() + +```go +func (l *Light) SetIntensity(intensity float32) +``` + + + + +### func \(\*Light\) [SetLinear]() + +```go +func (l *Light) SetLinear(linear float32) +``` + + + + +### func \(\*Light\) [SetOuterCutoff]() + +```go +func (l *Light) SetOuterCutoff(outerCutoff float32) +``` + + + + +### func \(\*Light\) [SetPosition]() + +```go +func (l *Light) SetPosition(position matrix.Vec3) +``` + + + + +### func \(\*Light\) [SetQuadratic]() + +```go +func (l *Light) SetQuadratic(quadratic float32) +``` + + + + +### func \(\*Light\) [SetSpecular]() + +```go +func (l *Light) SetSpecular(specular matrix.Vec3) +``` + + + + +### func \(\*Light\) [Type]() + +```go +func (l *Light) Type() LightType +``` + + + + +### func \(\*Light\) [WorldSpace]() + +```go +func (l *Light) WorldSpace(followcam cameras.Camera) matrix.Vec3 +``` + + + + +## type [LightShadowShaderData]() + + + +```go +type LightShadowShaderData struct { + ShaderDataBase + LightIndex int32 +} +``` + + +### func \(LightShadowShaderData\) [Size]() + +```go +func (t LightShadowShaderData) Size() int +``` + + + + +## type [LightType]() + + + +```go +type LightType int +``` + + +## type [LightsForRender]() + + + +```go +type LightsForRender struct { + Lights []Light + HasChanges bool +} +``` + + +## type [Material]() + + + +```go +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 + // contains filtered or unexported fields +} +``` + + +### func \(\*Material\) [CreateInstance]() + +```go +func (m *Material) CreateInstance(textures []*Texture) *Material +``` + + + + +### func \(\*Material\) [Destroy]() + +```go +func (m *Material) Destroy(device *GPUDevice) +``` + + + + +### func \(\*Material\) [HasTransparentSuffix]() + +```go +func (m *Material) HasTransparentSuffix() bool +``` + + + + +### func \(\*Material\) [RenderPass]() + +```go +func (m *Material) RenderPass() *RenderPass +``` + + + + +### func \(\*Material\) [SelectRoot]() + +```go +func (m *Material) SelectRoot() *Material +``` + + + + +## type [MaterialCache]() + + + +```go +type MaterialCache struct { + // contains filtered or unexported fields +} +``` + + +### func [NewMaterialCache]() + +```go +func NewMaterialCache(device *GPUDevice, assetDatabase assets.Database) MaterialCache +``` + + + + +### func \(\*MaterialCache\) [AddMaterial]() + +```go +func (m *MaterialCache) AddMaterial(material *Material) *Material +``` + + + + +### func \(\*MaterialCache\) [Destroy]() + +```go +func (m *MaterialCache) Destroy() +``` + + + + +### func \(\*MaterialCache\) [FindMaterial]() + +```go +func (m *MaterialCache) FindMaterial(key string) (*Material, bool) +``` + + + + +### func \(\*MaterialCache\) [Material]() + +```go +func (m *MaterialCache) Material(key string) (*Material, error) +``` + + + + +## type [MaterialData]() + + + +```go +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 +} +``` + + +### func \(\*MaterialData\) [Compile]() + +```go +func (d *MaterialData) Compile(assets assets.Database, device *GPUDevice) (*Material, error) +``` + + + + +### func \(\*MaterialData\) [CompileExt]() + +```go +func (d *MaterialData) CompileExt(assets assets.Database, device *GPUDevice, copyShader bool) (*Material, error) +``` + + + + +## type [MaterialTextureData]() + + + +```go +type MaterialTextureData struct { + Label string `static:"true"` + Texture string `content:"Texture"` + Filter string `options:"StringVkFilter"` +} +``` + + +### func \(\*MaterialTextureData\) [FilterToVK]() + +```go +func (d *MaterialTextureData) FilterToVK() TextureFilter +``` + + + + +## type [Mesh]() + + + +```go +type Mesh struct { + MeshId MeshId + // contains filtered or unexported fields +} +``` + + +### func [NewMesh]() + +```go +func NewMesh(key string, verts []Vertex, indexes []uint32) *Mesh +``` + + + + +### func [NewMeshArrow]() + +```go +func NewMeshArrow(cache *MeshCache, shaftLength, shaftRadius, tipHeight, tipRadius float32, segments int) *Mesh +``` + + + + +### func [NewMeshCapsule]() + +```go +func NewMeshCapsule(cache *MeshCache, radius, height float32, segments, rings int) *Mesh +``` + +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. + + +### func [NewMeshCircleWire]() + +```go +func NewMeshCircleWire(cache *MeshCache, radius float32, segments int) *Mesh +``` + +NewMeshCircleWire creates a wireframe circle \(line loop\) mesh. It follows the same pattern as the other wireframe mesh generators \(e.g. NewMeshWireCube, NewMeshWireSphereLatLon, etc.\). + + +### func [NewMeshCone]() + +```go +func NewMeshCone(cache *MeshCache, height, baseRadius float32, segments int, capped bool) *Mesh +``` + + + + +### func [NewMeshCube]() + +```go +func NewMeshCube(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshCubeInverse]() + +```go +func NewMeshCubeInverse(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshCylinder]() + +```go +func NewMeshCylinder(cache *MeshCache, height, radius float32, segments int, capped bool) *Mesh +``` + + + + +### func [NewMeshFrustum]() + +```go +func NewMeshFrustum(cache *MeshCache, key string, inverseProjection matrix.Mat4) *Mesh +``` + + + + +### func [NewMeshFrustumBox]() + +```go +func NewMeshFrustumBox(cache *MeshCache, inverseProjection matrix.Mat4) *Mesh +``` + + + + +### func [NewMeshGrid]() + +```go +func NewMeshGrid(cache *MeshCache, key string, points []matrix.Vec3, vertColor matrix.Color) *Mesh +``` + + + + +### func [NewMeshLine]() + +```go +func NewMeshLine(cache *MeshCache, key string, p0, p1 matrix.Vec3, vertColor matrix.Color) *Mesh +``` + + + + +### func [NewMeshOffsetQuad]() + +```go +func NewMeshOffsetQuad(cache *MeshCache, key string, sideOffsets matrix.Vec4) *Mesh +``` + + + + +### func [NewMeshPlane]() + +```go +func NewMeshPlane(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshPoint]() + +```go +func NewMeshPoint(cache *MeshCache, key string, position matrix.Vec3, vertColor matrix.Color) *Mesh +``` + + + + +### func [NewMeshQuad]() + +```go +func NewMeshQuad(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshQuadAnchored]() + +```go +func NewMeshQuadAnchored(anchor QuadPivot, cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshScreenQuad]() + +```go +func NewMeshScreenQuad(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshSkyboxCube]() + +```go +func NewMeshSkyboxCube(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshSphere]() + +```go +func NewMeshSphere(cache *MeshCache, radius float32, latitudeBands, longitudeBands int) *Mesh +``` + + + + +### func [NewMeshTexturableCube]() + +```go +func NewMeshTexturableCube(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshTriangle]() + +```go +func NewMeshTriangle(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshUnitQuad]() + +```go +func NewMeshUnitQuad(cache *MeshCache) *Mesh +``` + + + + +### func [NewMeshWireCone]() + +```go +func NewMeshWireCone(cache *MeshCache, radius, height float32, segments, heightSegments int) *Mesh +``` + + + + +### func [NewMeshWireCube]() + +```go +func NewMeshWireCube(cache *MeshCache, key string, vertColor matrix.Color) *Mesh +``` + + + + +### func [NewMeshWireCylinder]() + +```go +func NewMeshWireCylinder(cache *MeshCache, radius, height float32, segments, heightSegments int) *Mesh +``` + + + + +### func [NewMeshWireQuad]() + +```go +func NewMeshWireQuad(cache *MeshCache, key string, vertColor matrix.Color) *Mesh +``` + + + + +### func [NewMeshWireSphere]() + +```go +func NewMeshWireSphere(cache *MeshCache, radius float32, latitudeBands, longitudeBands int) *Mesh +``` + + + + +### func \(Mesh\) [Bounds]() + +```go +func (m Mesh) Bounds() collision.AABB +``` + + + + +### func \(\*Mesh\) [DelayedCreate]() + +```go +func (m *Mesh) DelayedCreate(device *GPUDevice) +``` + + + + +### func \(Mesh\) [IsReady]() + +```go +func (m Mesh) IsReady() bool +``` + + + + +### func \(Mesh\) [Key]() + +```go +func (m Mesh) Key() string +``` + + + + +### func \(\*Mesh\) [SetKey]() + +```go +func (m *Mesh) SetKey(key string) +``` + + + + +## type [MeshCache]() + + + +```go +type MeshCache struct { + // contains filtered or unexported fields +} +``` + + +### func [NewMeshCache]() + +```go +func NewMeshCache(device *GPUDevice, assetDatabase assets.Database) MeshCache +``` + + + + +### func \(\*MeshCache\) [AddMesh]() + +```go +func (m *MeshCache) AddMesh(mesh *Mesh) *Mesh +``` + +Try to add the mesh to the cache, if it already exists, return the existing mesh + + +### func \(\*MeshCache\) [CreatePending]() + +```go +func (m *MeshCache) CreatePending() +``` + + + + +### func \(\*MeshCache\) [Destroy]() + +```go +func (m *MeshCache) Destroy() +``` + + + + +### func \(\*MeshCache\) [FindMesh]() + +```go +func (m *MeshCache) FindMesh(key string) (*Mesh, bool) +``` + + + + +### func \(\*MeshCache\) [Mesh]() + +```go +func (m *MeshCache) Mesh(key string, verts []Vertex, indexes []uint32) *Mesh +``` + + + + +### func \(\*MeshCache\) [RemoveMesh]() + +```go +func (m *MeshCache) RemoveMesh(key string) +``` + + + + +## type [MeshCleanup]() + + + +```go +type MeshCleanup struct { + // contains filtered or unexported fields +} +``` + + +## type [MeshCullMode]() + + + +```go +type MeshCullMode = int +``` + + + +```go +const ( + MeshCullModeBack MeshCullMode = iota + MeshCullModeFront + MeshCullModeNone +) +``` + + +## type [MeshDrawMode]() + + + +```go +type MeshDrawMode = int +``` + + + +```go +const ( + MeshDrawModePoints MeshDrawMode = iota + MeshDrawModeLines + MeshDrawModeTriangles + MeshDrawModePatches +) +``` + + +## type [MeshId]() + + + +```go +type MeshId struct { + // contains filtered or unexported fields +} +``` + + +### func \(MeshId\) [IsValid]() + +```go +func (m MeshId) IsValid() bool +``` + + + + +## type [PointShadow]() + + + +```go +type PointShadow struct { + Point matrix.Vec2 // X,Z + Radius float32 + Strength float32 +} +``` + + +## type [QuadPivot]() + + + +```go +type QuadPivot = int32 +``` + + +## type [RenderCaches]() + + + +```go +type RenderCaches interface { + ShaderCache() *ShaderCache + TextureCache() *TextureCache + MeshCache() *MeshCache + FontCache() *FontCache + MaterialCache() *MaterialCache + AssetDatabase() assets.Database +} +``` + + +## type [RenderPass]() + + + +```go +type RenderPass struct { + Handle vk.RenderPass + Buffer GPUFrameBuffer + // contains filtered or unexported fields +} +``` + + +### func [NewRenderPass]() + +```go +func NewRenderPass(device *GPUDevice, setup *RenderPassDataCompiled) (*RenderPass, error) +``` + + + + +### func \(\*RenderPass\) [Destroy]() + +```go +func (p *RenderPass) Destroy(device *GPUDevice) +``` + + + + +### func \(\*RenderPass\) [ExecuteSecondaryCommands]() + +```go +func (r *RenderPass) ExecuteSecondaryCommands() +``` + + + + +### func \(\*RenderPass\) [Height]() + +```go +func (r *RenderPass) Height() int +``` + + + + +### func \(\*RenderPass\) [IsShadowPass]() + +```go +func (r *RenderPass) IsShadowPass() bool +``` + + + + +### func \(\*RenderPass\) [Recontstruct]() + +```go +func (p *RenderPass) Recontstruct(device *GPUDevice) error +``` + + + + +### func \(\*RenderPass\) [SelectOutputAttachment]() + +```go +func (r *RenderPass) SelectOutputAttachment(device *GPUDevice) *Texture +``` + + + + +### func \(\*RenderPass\) [SelectOutputAttachmentWithSuffix]() + +```go +func (r *RenderPass) SelectOutputAttachmentWithSuffix(suffix string) (*Texture, bool) +``` + + + + +### func \(\*RenderPass\) [Texture]() + +```go +func (r *RenderPass) Texture(index int) *Texture +``` + + + + +### func \(\*RenderPass\) [Width]() + +```go +func (r *RenderPass) Width() int +``` + + + + +## type [RenderPassAttachmentDescription]() + + + +```go +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 +} +``` + + +### func \(\*RenderPassAttachmentDescription\) [FinalLayoutToVK]() + +```go +func (ad *RenderPassAttachmentDescription) FinalLayoutToVK() GPUImageLayout +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [FormatToVK]() + +```go +func (ad *RenderPassAttachmentDescription) FormatToVK(device *GPUDevice) GPUFormat +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [InitialLayoutToVK]() + +```go +func (ad *RenderPassAttachmentDescription) InitialLayoutToVK() GPUImageLayout +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [LoadOpToVK]() + +```go +func (ad *RenderPassAttachmentDescription) LoadOpToVK() GPUAttachmentLoadOp +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [SamplesToVK]() + +```go +func (ad *RenderPassAttachmentDescription) SamplesToVK(device *GPUPhysicalDevice) GPUSampleCountFlags +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [StencilLoadOpToVK]() + +```go +func (ad *RenderPassAttachmentDescription) StencilLoadOpToVK() GPUAttachmentLoadOp +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [StencilStoreOpToVK]() + +```go +func (ad *RenderPassAttachmentDescription) StencilStoreOpToVK() GPUAttachmentStoreOp +``` + + + + +### func \(\*RenderPassAttachmentDescription\) [StoreOpToVK]() + +```go +func (ad *RenderPassAttachmentDescription) StoreOpToVK() GPUAttachmentStoreOp +``` + + + + +## type [RenderPassAttachmentDescriptionCompiled]() + + + +```go +type RenderPassAttachmentDescriptionCompiled struct { + Format GPUFormat + Samples GPUSampleCountFlags + LoadOp GPUAttachmentLoadOp + StoreOp GPUAttachmentStoreOp + StencilLoadOp GPUAttachmentLoadOp + StencilStoreOp GPUAttachmentStoreOp + InitialLayout GPUImageLayout + FinalLayout GPUImageLayout + Image RenderPassAttachmentImageCompiled +} +``` + + +### func \(\*RenderPassAttachmentDescriptionCompiled\) [IsDepthFormat]() + +```go +func (p *RenderPassAttachmentDescriptionCompiled) IsDepthFormat() bool +``` + + + + +## type [RenderPassAttachmentImage]() + + + +```go +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"` +} +``` + + +### func \(\*RenderPassAttachmentImage\) [AccessToVK]() + +```go +func (ai *RenderPassAttachmentImage) AccessToVK() GPUAccessFlags +``` + + + + +### func \(\*RenderPassAttachmentImage\) [AspectToVK]() + +```go +func (ai *RenderPassAttachmentImage) AspectToVK() GPUImageAspectFlags +``` + + + + +### func \(\*RenderPassAttachmentImage\) [FilterToVK]() + +```go +func (ai *RenderPassAttachmentImage) FilterToVK() GPUFilter +``` + + + + +### func \(\*RenderPassAttachmentImage\) [IsInvalid]() + +```go +func (img *RenderPassAttachmentImage) IsInvalid() bool +``` + + + + +### func \(\*RenderPassAttachmentImage\) [MemoryPropertyToVK]() + +```go +func (ai *RenderPassAttachmentImage) MemoryPropertyToVK() GPUMemoryPropertyFlags +``` + + + + +### func \(\*RenderPassAttachmentImage\) [TilingToVK]() + +```go +func (ai *RenderPassAttachmentImage) TilingToVK() GPUImageTiling +``` + + + + +### func \(\*RenderPassAttachmentImage\) [UsageToVK]() + +```go +func (ai *RenderPassAttachmentImage) UsageToVK() GPUImageUsageFlags +``` + + + + +## type [RenderPassAttachmentImageClear]() + + + +```go +type RenderPassAttachmentImageClear struct { + R float32 + G float32 + B float32 + A float32 + Depth float32 + Stencil uint32 +} +``` + + +## type [RenderPassAttachmentImageCompiled]() + + + +```go +type RenderPassAttachmentImageCompiled struct { + Name string + ExistingImage string + MipLevels uint32 + LayerCount uint32 + Tiling GPUImageTiling + Filter GPUFilter + Usage GPUImageUsageFlags + MemoryProperty GPUMemoryPropertyFlags + Aspect GPUImageAspectFlags + Access GPUAccessFlags +} +``` + + +### func \(\*RenderPassAttachmentImageCompiled\) [IsInvalid]() + +```go +func (img *RenderPassAttachmentImageCompiled) IsInvalid() bool +``` + + + + +## type [RenderPassAttachmentReference]() + + + +```go +type RenderPassAttachmentReference struct { + Attachment uint32 + Layout string `options:"StringVkImageLayout"` +} +``` + + +### func \(\*RenderPassAttachmentReference\) [LayoutToVK]() + +```go +func (ad *RenderPassAttachmentReference) LayoutToVK() GPUImageLayout +``` + + + + +## type [RenderPassAttachmentReferenceCompiled]() + + + +```go +type RenderPassAttachmentReferenceCompiled struct { + Attachment uint32 + Layout vulkan_const.ImageLayout +} +``` + + +## type [RenderPassData]() + + + +```go +type RenderPassData struct { + Name string + Sort int + AttachmentDescriptions []RenderPassAttachmentDescription + SubpassDescriptions []RenderPassSubpassDescription + SubpassDependencies []RenderPassSubpassDependency + Width int + Height int + SkipCombine bool +} +``` + + +### func [NewRenderPassData]() + +```go +func NewRenderPassData(src string) (RenderPassData, error) +``` + + + + +### func \(\*RenderPassData\) [Compile]() + +```go +func (d *RenderPassData) Compile(device *GPUDevice) RenderPassDataCompiled +``` + + + + +## type [RenderPassDataCompiled]() + + + +```go +type RenderPassDataCompiled struct { + Name string + Sort int + Width int + Height int + AttachmentDescriptions []RenderPassAttachmentDescriptionCompiled + SubpassDescriptions []RenderPassSubpassDescriptionCompiled + SubpassDependencies []RenderPassSubpassDependencyCompiled + ImageClears []vk.ClearValue + Subpass []RenderPassSubpassDataCompiled + SkipCombine bool +} +``` + + +### func \(\*RenderPassDataCompiled\) [ConstructRenderPass]() + +```go +func (r *RenderPassDataCompiled) ConstructRenderPass(device *GPUDevice) (*RenderPass, error) +``` + + + + +## type [RenderPassGroup]() + + + +```go +type RenderPassGroup struct { + // contains filtered or unexported fields +} +``` + + +## type [RenderPassSubpass]() + + + +```go +type RenderPassSubpass struct { + // contains filtered or unexported fields +} +``` + + +## type [RenderPassSubpassData]() + + + +```go +type RenderPassSubpassData struct { + Shader string `options:""` + ShaderPipeline string `options:""` + SampledImages []RenderPassSubpassImageData +} +``` + + +## type [RenderPassSubpassDataCompiled]() + + + +```go +type RenderPassSubpassDataCompiled struct { + Shader string + ShaderPipeline string + SampledImages []int +} +``` + + +## type [RenderPassSubpassDependency]() + + + +```go +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"` +} +``` + + +### func \(\*RenderPassSubpassDependency\) [DependencyFlagsToVK]() + +```go +func (sd *RenderPassSubpassDependency) DependencyFlagsToVK() vk.DependencyFlags +``` + + + + +### func \(\*RenderPassSubpassDependency\) [DstAccessMaskToVK]() + +```go +func (sd *RenderPassSubpassDependency) DstAccessMaskToVK() GPUAccessFlags +``` + + + + +### func \(\*RenderPassSubpassDependency\) [DstStageMaskToVK]() + +```go +func (sd *RenderPassSubpassDependency) DstStageMaskToVK() vk.PipelineStageFlags +``` + + + + +### func \(\*RenderPassSubpassDependency\) [SrcAccessMaskToVK]() + +```go +func (sd *RenderPassSubpassDependency) SrcAccessMaskToVK() GPUAccessFlags +``` + + + + +### func \(\*RenderPassSubpassDependency\) [SrcStageMaskToVK]() + +```go +func (sd *RenderPassSubpassDependency) SrcStageMaskToVK() vk.PipelineStageFlags +``` + + + + +## type [RenderPassSubpassDependencyCompiled]() + + + +```go +type RenderPassSubpassDependencyCompiled struct { + SrcSubpass uint32 + DstSubpass uint32 + SrcStageMask vk.PipelineStageFlags + DstStageMask vk.PipelineStageFlags + SrcAccessMask vk.AccessFlags + DstAccessMask vk.AccessFlags + DependencyFlags vk.DependencyFlags +} +``` + + +## type [RenderPassSubpassDescription]() + + + +```go +type RenderPassSubpassDescription struct { + PipelineBindPoint string `options:"StringVkPipelineBindPoint"` + ColorAttachmentReferences []RenderPassAttachmentReference + InputAttachmentReferences []RenderPassAttachmentReference + ResolveAttachments []RenderPassAttachmentReference + DepthStencilAttachment []RenderPassAttachmentReference // 1 max + PreserveAttachments []uint32 // TODO + Subpass RenderPassSubpassData +} +``` + + +### func \(\*RenderPassSubpassDescription\) [PipelineBindPointToVK]() + +```go +func (ad *RenderPassSubpassDescription) PipelineBindPointToVK() vulkan_const.PipelineBindPoint +``` + + + + +## type [RenderPassSubpassDescriptionCompiled]() + + + +```go +type RenderPassSubpassDescriptionCompiled struct { + PipelineBindPoint vulkan_const.PipelineBindPoint + ColorAttachmentReferences []RenderPassAttachmentReferenceCompiled + InputAttachmentReferences []RenderPassAttachmentReferenceCompiled + ResolveAttachments []RenderPassAttachmentReferenceCompiled + DepthStencilAttachment []RenderPassAttachmentReferenceCompiled // 1 max + PreserveAttachments []uint32 // TODO +} +``` + + +## type [RenderPassSubpassImageData]() + + + +```go +type RenderPassSubpassImageData struct { + SampledImage string +} +``` + + +## type [RenderingContainer]() + + + +```go +type RenderingContainer interface { + GetDrawableSize() (int32, int32) + GetInstanceExtensions() []string + PlatformWindow() unsafe.Pointer + PlatformInstance() unsafe.Pointer +} +``` + + +## type [Shader]() + + + +```go +type Shader struct { + RenderId ShaderId + + Material MaterialData + DriverData ShaderDriverData + + Type ShaderType + // contains filtered or unexported fields +} +``` + + +### func [NewShader]() + +```go +func NewShader(shaderData ShaderDataCompiled) *Shader +``` + + + + +### func \(\*Shader\) [AddSubShader]() + +```go +func (s *Shader) AddSubShader(key string, shader *Shader) +``` + + + + +### func \(\*Shader\) [DelayedCreate]() + +```go +func (s *Shader) DelayedCreate(device *GPUDevice, assetDatabase assets.Database) +``` + + + + +### func \(\*Shader\) [Reload]() + +```go +func (s *Shader) Reload(shaderData ShaderDataCompiled) +``` + + + + +### func \(\*Shader\) [RemoveSubShader]() + +```go +func (s *Shader) RemoveSubShader(key string) +``` + + + + +### func \(\*Shader\) [ShaderDataName]() + +```go +func (s *Shader) ShaderDataName() string +``` + + + + +### func \(\*Shader\) [SubShader]() + +```go +func (s *Shader) SubShader(key string) *Shader +``` + + + + +## type [ShaderBuffer]() + + + +```go +type ShaderBuffer struct { + // contains filtered or unexported fields +} +``` + + +## type [ShaderCache]() + + + +```go +type ShaderCache struct { + // contains filtered or unexported fields +} +``` + + +### func [NewShaderCache]() + +```go +func NewShaderCache(device *GPUDevice, assetDatabase assets.Database) ShaderCache +``` + + + + +### func \(\*ShaderCache\) [AddShader]() + +```go +func (s *ShaderCache) AddShader(shader *Shader) +``` + + + + +### func \(\*ShaderCache\) [CreatePending]() + +```go +func (s *ShaderCache) CreatePending() +``` + + + + +### func \(\*ShaderCache\) [Destroy]() + +```go +func (s *ShaderCache) Destroy() +``` + + + + +### func \(\*ShaderCache\) [ReloadShader]() + +```go +func (s *ShaderCache) ReloadShader(shaderData ShaderDataCompiled) +``` + + + + +### func \(\*ShaderCache\) [Shader]() + +```go +func (s *ShaderCache) Shader(shaderData ShaderDataCompiled) (shader *Shader, isNew bool) +``` + + + + +## type [ShaderCleanup]() + + + +```go +type ShaderCleanup struct { + // contains filtered or unexported fields +} +``` + + +## type [ShaderData]() + + + +```go +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 +} +``` + + +### func \(\*ShaderData\) [Compile]() + +```go +func (d *ShaderData) Compile() ShaderDataCompiled +``` + + + + +## type [ShaderDataBase]() + + + +```go +type ShaderDataBase struct { + InitModel matrix.Mat4 + // contains filtered or unexported fields +} +``` + + +### func [NewShaderDataBase]() + +```go +func NewShaderDataBase() ShaderDataBase +``` + + + + +### func \(\*ShaderDataBase\) [Activate]() + +```go +func (s *ShaderDataBase) Activate() +``` + + + + +### func \(\*ShaderDataBase\) [Base]() + +```go +func (s *ShaderDataBase) Base() *ShaderDataBase +``` + + + + +### func \(\*ShaderDataBase\) [BoundDataPointer]() + +```go +func (s *ShaderDataBase) BoundDataPointer() unsafe.Pointer +``` + + + + +### func \(\*ShaderDataBase\) [CancelDestroy]() + +```go +func (s *ShaderDataBase) CancelDestroy() +``` + + + + +### func \(\*ShaderDataBase\) [DataPointer]() + +```go +func (s *ShaderDataBase) DataPointer() unsafe.Pointer +``` + + + + +### func \(\*ShaderDataBase\) [Deactivate]() + +```go +func (s *ShaderDataBase) Deactivate() +``` + + + + +### func \(\*ShaderDataBase\) [Destroy]() + +```go +func (s *ShaderDataBase) Destroy() +``` + + + + +### func \(\*ShaderDataBase\) [InstanceBoundDataSize]() + +```go +func (s *ShaderDataBase) InstanceBoundDataSize() int +``` + + + + +### func \(\*ShaderDataBase\) [IsDestroyed]() + +```go +func (s *ShaderDataBase) IsDestroyed() bool +``` + + + + +### func \(\*ShaderDataBase\) [IsInView]() + +```go +func (s *ShaderDataBase) IsInView() bool +``` + + + + +### func \(\*ShaderDataBase\) [Model]() + +```go +func (s *ShaderDataBase) Model() matrix.Mat4 +``` + + + + +### func \(\*ShaderDataBase\) [ModelPtr]() + +```go +func (s *ShaderDataBase) ModelPtr() *matrix.Mat4 +``` + + + + +### func \(\*ShaderDataBase\) [SelectLights]() + +```go +func (s *ShaderDataBase) SelectLights(lights LightsForRender) +``` + + + + +### func \(\*ShaderDataBase\) [SetModel]() + +```go +func (s *ShaderDataBase) SetModel(model matrix.Mat4) +``` + + + + +### func \(\*ShaderDataBase\) [Setup]() + +```go +func (s *ShaderDataBase) Setup() +``` + + + + +### func \(\*ShaderDataBase\) [SkinningHeader]() + +```go +func (s *ShaderDataBase) SkinningHeader() *SkinnedShaderDataHeader +``` + + + + +### func \(\*ShaderDataBase\) [Transform]() + +```go +func (s *ShaderDataBase) Transform() *matrix.Transform +``` + + + + +### func \(\*ShaderDataBase\) [UpdateBoundData]() + +```go +func (s *ShaderDataBase) UpdateBoundData() bool +``` + + + + +### func \(\*ShaderDataBase\) [UpdateModel]() + +```go +func (s *ShaderDataBase) UpdateModel(viewCuller ViewCuller, container collision.AABB) +``` + + + + +## type [ShaderDataCombine]() + + + +```go +type ShaderDataCombine struct { + ShaderDataBase + Color matrix.Color +} +``` + + +### func \(ShaderDataCombine\) [Size]() + +```go +func (t ShaderDataCombine) Size() int +``` + + + + +## type [ShaderDataCompiled]() + + + +```go +type ShaderDataCompiled struct { + Name string + Vertex string + Fragment string + Geometry string + TessellationControl string + TessellationEvaluation string + Compute string + LayoutGroups []ShaderLayoutGroup + SamplerLabels []string +} +``` + + +### func \(\*ShaderDataCompiled\) [IsCompute]() + +```go +func (s *ShaderDataCompiled) IsCompute() bool +``` + + + + +### func \(\*ShaderDataCompiled\) [SelectLayout]() + +```go +func (s *ShaderDataCompiled) SelectLayout(stage string) *ShaderLayoutGroup +``` + + + + +### func \(\*ShaderDataCompiled\) [Stride]() + +```go +func (sd *ShaderDataCompiled) Stride() uint32 +``` + + + + +### func \(\*ShaderDataCompiled\) [ToAttributeDescription]() + +```go +func (sd *ShaderDataCompiled) ToAttributeDescription(locationStart uint32) []vk.VertexInputAttributeDescription +``` + + + + +### func \(\*ShaderDataCompiled\) [ToDescriptorSetLayoutStructure]() + +```go +func (sd *ShaderDataCompiled) ToDescriptorSetLayoutStructure() DescriptorSetLayoutStructure +``` + + + + +### func \(\*ShaderDataCompiled\) [WorkGroups]() + +```go +func (sd *ShaderDataCompiled) WorkGroups() [3]uint32 +``` + + + + +## type [ShaderDraw]() + + + +```go +type ShaderDraw struct { + // contains filtered or unexported fields +} +``` + + +### func [NewShaderDraw]() + +```go +func NewShaderDraw(material *Material) ShaderDraw +``` + + + + +### func \(\*ShaderDraw\) [AddInstanceGroup]() + +```go +func (s *ShaderDraw) AddInstanceGroup(group DrawInstanceGroup) +``` + + + + +### func \(\*ShaderDraw\) [Clear]() + +```go +func (s *ShaderDraw) Clear() +``` + + + + +### func \(\*ShaderDraw\) [Destroy]() + +```go +func (s *ShaderDraw) Destroy(device *GPUDevice) +``` + + + + +### func \(\*ShaderDraw\) [Filter]() + +```go +func (s *ShaderDraw) Filter(filter func(*DrawInstanceGroup) bool) []*DrawInstanceGroup +``` + + + + +## type [ShaderDriverData]() + + + +```go +type ShaderDriverData struct { + DescriptorSetLayoutStructure + Stride uint32 + AttributeDescriptions []vk.VertexInputAttributeDescription +} +``` + + +### func [NewShaderDriverData]() + +```go +func NewShaderDriverData() ShaderDriverData +``` + + + + +## type [ShaderId]() + + + +```go +type ShaderId struct { + // contains filtered or unexported fields +} +``` + + +### func \(ShaderId\) [IsValid]() + +```go +func (s ShaderId) IsValid() bool +``` + + + + +## type [ShaderLayout]() + + + +```go +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 +} +``` + + +### func \(\*ShaderLayout\) [Capacity]() + +```go +func (l *ShaderLayout) Capacity() int +``` + + + + +### func \(\*ShaderLayout\) [DescriptorType]() + +```go +func (l *ShaderLayout) DescriptorType() vulkan_const.DescriptorType +``` + + + + +### func \(\*ShaderLayout\) [FullName]() + +```go +func (l *ShaderLayout) FullName() string +``` + + + + +### func \(\*ShaderLayout\) [IsBuffer]() + +```go +func (l *ShaderLayout) IsBuffer() bool +``` + + + + +### func \(\*ShaderLayout\) [Stride]() + +```go +func (l *ShaderLayout) Stride() int +``` + + + + +## type [ShaderLayoutGroup]() + + + +```go +type ShaderLayoutGroup struct { + Type string + WorkGroups [3]uint32 + Layouts []ShaderLayout +} +``` + + +### func \(\*ShaderLayoutGroup\) [DescriptorFlag]() + +```go +func (g *ShaderLayoutGroup) DescriptorFlag() vulkan_const.ShaderStageFlagBits +``` + + + + +## type [ShaderLayoutStructField]() + + + +```go +type ShaderLayoutStructField struct { + Type string // float, vec3, mat4, etc. + Name string +} +``` + + +## type [ShaderPipelineColorBlend]() + + + +```go +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"` +} +``` + + +### func \(\*ShaderPipelineColorBlend\) [LogicOpToVK]() + +```go +func (s *ShaderPipelineColorBlend) LogicOpToVK() vulkan_const.LogicOp +``` + + + + +## type [ShaderPipelineColorBlendAttachments]() + + + +```go +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"` +} +``` + + +### func \(\*ShaderPipelineColorBlendAttachments\) [AlphaBlendOpToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) AlphaBlendOpToVK() vulkan_const.BlendOp +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [BlendEnableToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) BlendEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ColorBlendOpToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ColorBlendOpToVK() vulkan_const.BlendOp +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ColorWriteMaskToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ColorWriteMaskToVK() vulkan_const.ColorComponentFlagBits +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [DstAlphaBlendFactorToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) DstAlphaBlendFactorToVK() vulkan_const.BlendFactor +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [DstColorBlendFactorToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) DstColorBlendFactorToVK() vulkan_const.BlendFactor +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListAlphaBlendOp]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListAlphaBlendOp() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListColorBlendOp]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListColorBlendOp() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListDstAlphaBlendFactor]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListDstAlphaBlendFactor() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListDstColorBlendFactor]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListDstColorBlendFactor() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListSrcAlphaBlendFactor]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListSrcAlphaBlendFactor() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [ListSrcColorBlendFactor]() + +```go +func (a *ShaderPipelineColorBlendAttachments) ListSrcColorBlendFactor() []string +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [SrcAlphaBlendFactorToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) SrcAlphaBlendFactorToVK() vulkan_const.BlendFactor +``` + + + + +### func \(\*ShaderPipelineColorBlendAttachments\) [SrcColorBlendFactorToVK]() + +```go +func (a *ShaderPipelineColorBlendAttachments) SrcColorBlendFactorToVK() vulkan_const.BlendFactor +``` + + + + +## type [ShaderPipelineColorBlendAttachmentsCompiled]() + + + +```go +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 +} +``` + + +## type [ShaderPipelineColorBlendCompiled]() + + + +```go +type ShaderPipelineColorBlendCompiled struct { + LogicOpEnable vk.Bool32 + LogicOp vulkan_const.LogicOp + BlendConstants [4]float32 +} +``` + + +## type [ShaderPipelineData]() + + + +```go +type ShaderPipelineData struct { + Name string + InputAssembly ShaderPipelineInputAssembly + Rasterization ShaderPipelinePipelineRasterization + Multisample ShaderPipelinePipelineMultisample + ColorBlend ShaderPipelineColorBlend + ColorBlendAttachments []ShaderPipelineColorBlendAttachments + DepthStencil ShaderPipelineDepthStencil + Tessellation ShaderPipelineTessellation + GraphicsPipeline ShaderPipelineGraphicsPipeline + PushConstant ShaderPipelinePushConstant +} +``` + + +### func \(\*ShaderPipelineData\) [AlphaToCoverageEnableToVK]() + +```go +func (s *ShaderPipelineData) AlphaToCoverageEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [AlphaToOneEnableToVK]() + +```go +func (s *ShaderPipelineData) AlphaToOneEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [BackStencilOpStateToVK]() + +```go +func (s *ShaderPipelineData) BackStencilOpStateToVK() vk.StencilOpState +``` + + + + +### func \(\*ShaderPipelineData\) [BlendConstants]() + +```go +func (s *ShaderPipelineData) BlendConstants() [4]float32 +``` + + + + +### func \(\*ShaderPipelineData\) [Compile]() + +```go +func (d *ShaderPipelineData) Compile(device *GPUPhysicalDevice) ShaderPipelineDataCompiled +``` + + + + +### func \(\*ShaderPipelineData\) [DepthBiasEnableToVK]() + +```go +func (s *ShaderPipelineData) DepthBiasEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [DepthBoundsTestEnableToVK]() + +```go +func (s *ShaderPipelineData) DepthBoundsTestEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [DepthClampEnableToVK]() + +```go +func (s *ShaderPipelineData) DepthClampEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [DepthTestEnableToVK]() + +```go +func (s *ShaderPipelineData) DepthTestEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [DepthWriteEnableToVK]() + +```go +func (s *ShaderPipelineData) DepthWriteEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [FrontStencilOpStateToVK]() + +```go +func (s *ShaderPipelineData) FrontStencilOpStateToVK() vk.StencilOpState +``` + +TODO: This and the BackStencilOpStateToVK are duplicates because of a bad structure setup, please fix later + + +### func \(ShaderPipelineData\) [ListBackCompareOp]() + +```go +func (s ShaderPipelineData) ListBackCompareOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListBackDepthFailOp]() + +```go +func (s ShaderPipelineData) ListBackDepthFailOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListBackFailOp]() + +```go +func (s ShaderPipelineData) ListBackFailOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListBackPassOp]() + +```go +func (s ShaderPipelineData) ListBackPassOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListBlendFactor]() + +```go +func (s ShaderPipelineData) ListBlendFactor() []string +``` + + + + +### func \(ShaderPipelineData\) [ListBlendOp]() + +```go +func (s ShaderPipelineData) ListBlendOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListCullMode]() + +```go +func (s ShaderPipelineData) ListCullMode() []string +``` + + + + +### func \(ShaderPipelineData\) [ListDepthCompareOp]() + +```go +func (s ShaderPipelineData) ListDepthCompareOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListFrontCompareOp]() + +```go +func (s ShaderPipelineData) ListFrontCompareOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListFrontDepthFailOp]() + +```go +func (s ShaderPipelineData) ListFrontDepthFailOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListFrontFace]() + +```go +func (s ShaderPipelineData) ListFrontFace() []string +``` + + + + +### func \(ShaderPipelineData\) [ListFrontFailOp]() + +```go +func (s ShaderPipelineData) ListFrontFailOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListFrontPassOp]() + +```go +func (s ShaderPipelineData) ListFrontPassOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListLogicOp]() + +```go +func (s ShaderPipelineData) ListLogicOp() []string +``` + + + + +### func \(ShaderPipelineData\) [ListPatchControlPoints]() + +```go +func (s ShaderPipelineData) ListPatchControlPoints() []string +``` + + + + +### func \(ShaderPipelineData\) [ListPolygonMode]() + +```go +func (s ShaderPipelineData) ListPolygonMode() []string +``` + + + + +### func \(ShaderPipelineData\) [ListRasterizationSamples]() + +```go +func (s ShaderPipelineData) ListRasterizationSamples() []string +``` + + + + +### func \(ShaderPipelineData\) [ListTopology]() + +```go +func (s ShaderPipelineData) ListTopology() []string +``` + + + + +### func \(\*ShaderPipelineData\) [LogicOpEnableToVK]() + +```go +func (s *ShaderPipelineData) LogicOpEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [PrimitiveRestartToVK]() + +```go +func (s *ShaderPipelineData) PrimitiveRestartToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [RasterizerDiscardEnableToVK]() + +```go +func (s *ShaderPipelineData) RasterizerDiscardEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [SampleShadingEnableToVK]() + +```go +func (s *ShaderPipelineData) SampleShadingEnableToVK() vk.Bool32 +``` + + + + +### func \(\*ShaderPipelineData\) [StencilTestEnableToVK]() + +```go +func (s *ShaderPipelineData) StencilTestEnableToVK() vk.Bool32 +``` + + + + +## type [ShaderPipelineDataCompiled]() + + + +```go +type ShaderPipelineDataCompiled struct { + Name string + InputAssembly ShaderPipelineInputAssemblyCompiled + Rasterization ShaderPipelinePipelineRasterizationCompiled + Multisample ShaderPipelinePipelineMultisampleCompiled + ColorBlend ShaderPipelineColorBlendCompiled + ColorBlendAttachments []ShaderPipelineColorBlendAttachmentsCompiled + DepthStencil ShaderPipelineDepthStencilCompiled + Tessellation ShaderPipelineTessellationCompiled + GraphicsPipeline ShaderPipelineGraphicsPipelineCompiled + PushConstant ShaderPipelinePushConstantCompiled +} +``` + + +### func \(\*ShaderPipelineDataCompiled\) [ConstructPipeline]() + +```go +func (s *ShaderPipelineDataCompiled) ConstructPipeline(device *GPUDevice, shader *Shader, renderPass *RenderPass, stages []vk.PipelineShaderStageCreateInfo) bool +``` + + + + +## type [ShaderPipelineDepthStencil]() + + + +```go +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 +} +``` + + +## type [ShaderPipelineDepthStencilCompiled]() + + + +```go +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 +} +``` + + +## type [ShaderPipelineGraphicsPipeline]() + + + +```go +type ShaderPipelineGraphicsPipeline struct { + Subpass uint32 + PipelineCreateFlags []string `options:"StringVkPipelineCreateFlagBits"` +} +``` + + +### func \(\*ShaderPipelineGraphicsPipeline\) [PipelineCreateFlagsToVK]() + +```go +func (s *ShaderPipelineGraphicsPipeline) PipelineCreateFlagsToVK() vk.PipelineCreateFlags +``` + + + + +## type [ShaderPipelineGraphicsPipelineCompiled]() + + + +```go +type ShaderPipelineGraphicsPipelineCompiled struct { + Subpass uint32 + PipelineCreateFlags vk.PipelineCreateFlags +} +``` + + +## type [ShaderPipelineInputAssembly]() + + + +```go +type ShaderPipelineInputAssembly struct { + Topology string `options:"StringVkPrimitiveTopology"` + PrimitiveRestart bool +} +``` + + +### func \(\*ShaderPipelineInputAssembly\) [TopologyToVK]() + +```go +func (s *ShaderPipelineInputAssembly) TopologyToVK() vulkan_const.PrimitiveTopology +``` + + + + +## type [ShaderPipelineInputAssemblyCompiled]() + + + +```go +type ShaderPipelineInputAssemblyCompiled struct { + Topology vulkan_const.PrimitiveTopology + PrimitiveRestart vk.Bool32 +} +``` + + +## type [ShaderPipelinePipelineMultisample]() + + + +```go +type ShaderPipelinePipelineMultisample struct { + RasterizationSamples string `options:"StringVkSampleCountFlagBits"` + SampleShadingEnable bool + MinSampleShading float32 + AlphaToCoverageEnable bool + AlphaToOneEnable bool +} +``` + + +### func \(\*ShaderPipelinePipelineMultisample\) [RasterizationSamplesToVK]() + +```go +func (s *ShaderPipelinePipelineMultisample) RasterizationSamplesToVK(device *GPUPhysicalDevice) GPUSampleCountFlags +``` + + + + +## type [ShaderPipelinePipelineMultisampleCompiled]() + + + +```go +type ShaderPipelinePipelineMultisampleCompiled struct { + RasterizationSamples vulkan_const.SampleCountFlagBits + SampleShadingEnable vk.Bool32 + MinSampleShading float32 + AlphaToCoverageEnable vk.Bool32 + AlphaToOneEnable vk.Bool32 +} +``` + + +## type [ShaderPipelinePipelineRasterization]() + + + +```go +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 +} +``` + + +### func \(\*ShaderPipelinePipelineRasterization\) [CullModeToVK]() + +```go +func (s *ShaderPipelinePipelineRasterization) CullModeToVK() vulkan_const.CullModeFlagBits +``` + + + + +### func \(\*ShaderPipelinePipelineRasterization\) [FrontFaceToVK]() + +```go +func (s *ShaderPipelinePipelineRasterization) FrontFaceToVK() vulkan_const.FrontFace +``` + + + + +### func \(\*ShaderPipelinePipelineRasterization\) [PolygonModeToVK]() + +```go +func (s *ShaderPipelinePipelineRasterization) PolygonModeToVK() vulkan_const.PolygonMode +``` + + + + +## type [ShaderPipelinePipelineRasterizationCompiled]() + + + +```go +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 +} +``` + + +## type [ShaderPipelinePushConstant]() + + + +```go +type ShaderPipelinePushConstant struct { + Size uint32 + StageFlags []string `options:"StringVkAccessFlagBits"` +} +``` + + +### func \(\*ShaderPipelinePushConstant\) [ShaderStageFlagsToVK]() + +```go +func (s *ShaderPipelinePushConstant) ShaderStageFlagsToVK() vk.ShaderStageFlags +``` + + + + +## type [ShaderPipelinePushConstantCompiled]() + + + +```go +type ShaderPipelinePushConstantCompiled struct { + Size uint32 + StageFlags vk.ShaderStageFlags +} +``` + + +## type [ShaderPipelineTessellation]() + + + +```go +type ShaderPipelineTessellation struct { + PatchControlPoints string `options:"StringVkPatchControlPoints"` +} +``` + + +### func \(\*ShaderPipelineTessellation\) [PatchControlPointsToVK]() + +```go +func (s *ShaderPipelineTessellation) PatchControlPointsToVK() uint32 +``` + + + + +## type [ShaderPipelineTessellationCompiled]() + + + +```go +type ShaderPipelineTessellationCompiled struct { + PatchControlPoints uint32 +} +``` + + +## type [ShaderType]() + + + +```go +type ShaderType int +``` + + + +```go +const ( + ShaderTypeGraphics ShaderType = iota + ShaderTypeCompute +) +``` + + +## type [SkinnedShaderDataHeader]() + + + +```go +type SkinnedShaderDataHeader struct { + // contains filtered or unexported fields +} +``` + + +### func \(\*SkinnedShaderDataHeader\) [BoneByIndex]() + +```go +func (h *SkinnedShaderDataHeader) BoneByIndex(index int) *BoneTransform +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [CreateBones]() + +```go +func (h *SkinnedShaderDataHeader) CreateBones(ids []int32) +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [FindBone]() + +```go +func (h *SkinnedShaderDataHeader) FindBone(id int32) *BoneTransform +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [HasBones]() + +```go +func (h *SkinnedShaderDataHeader) HasBones() bool +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [SkinNamedDataInstanceSize]() + +```go +func (h *SkinnedShaderDataHeader) SkinNamedDataInstanceSize() int +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [SkinNamedDataPointer]() + +```go +func (h *SkinnedShaderDataHeader) SkinNamedDataPointer() unsafe.Pointer +``` + + + + +### func \(\*SkinnedShaderDataHeader\) [SkinUpdateNamedData]() + +```go +func (h *SkinnedShaderDataHeader) SkinUpdateNamedData() bool +``` + + + + +## type [TextShaderData]() + + + +```go +type TextShaderData struct { + ShaderDataBase + UVs matrix.Vec4 + FgColor matrix.Color + BgColor matrix.Color + Scissor matrix.Vec4 + PxRange matrix.Vec2 +} +``` + + +### func \(TextShaderData\) [Size]() + +```go +func (s TextShaderData) Size() int +``` + + + + +## type [Texture]() + + + +```go +type Texture struct { + Key string + TexturePixelCache []byte + RenderId TextureId + Channels int + Filter int + MipLevels int + Width int + Height int + CacheInvalid bool + // contains filtered or unexported fields +} +``` + + +### func [NewTexture]() + +```go +func NewTexture(assetDb assets.Database, key string, filter TextureFilter) (*Texture, error) +``` + + + + +### func [NewTextureFromImage]() + +```go +func NewTextureFromImage(key string, data []byte, filter TextureFilter) (*Texture, error) +``` + + + + +### func [NewTextureFromMemory]() + +```go +func NewTextureFromMemory(key string, data []byte, width, height int, filter TextureFilter) (*Texture, error) +``` + + + + +### func \(\*Texture\) [DelayedCreate]() + +```go +func (t *Texture) DelayedCreate(device *GPUDevice) +``` + + + + +### func \(\*Texture\) [ReadAllPixels]() + +```go +func (t *Texture) ReadAllPixels(app *GPUApplication) ([]byte, error) +``` + + + + +### func \(\*Texture\) [ReadPendingDataForTransparency]() + +```go +func (t *Texture) ReadPendingDataForTransparency() bool +``` + + + + +### func \(\*Texture\) [ReadPixel]() + +```go +func (t *Texture) ReadPixel(app *GPUApplication, x, y int) matrix.Color +``` + + + + +### func \(\*Texture\) [Reload]() + +```go +func (t *Texture) Reload(assetDb assets.Database) error +``` + + + + +### func \(\*Texture\) [SetPendingDataDimensions]() + +```go +func (t *Texture) SetPendingDataDimensions(dim TextureDimensions) +``` + + + + +### func \(Texture\) [Size]() + +```go +func (t Texture) Size() matrix.Vec2 +``` + + + + +### func \(\*Texture\) [WritePixels]() + +```go +func (t *Texture) WritePixels(device *GPUDevice, requests []GPUImageWriteRequest) +``` + + + + +## type [TextureCache]() + + + +```go +type TextureCache struct { + // contains filtered or unexported fields +} +``` + + +### func [NewTextureCache]() + +```go +func NewTextureCache(device *GPUDevice, assetDatabase assets.Database) TextureCache +``` + + + + +### func \(\*TextureCache\) [CreatePending]() + +```go +func (t *TextureCache) CreatePending() +``` + + + + +### func \(\*TextureCache\) [Destroy]() + +```go +func (t *TextureCache) Destroy() +``` + + + + +### func \(\*TextureCache\) [ForceRemoveTexture]() + +```go +func (t *TextureCache) ForceRemoveTexture(key string, filter TextureFilter) +``` + + + + +### func \(\*TextureCache\) [InsertRawTexture]() + +```go +func (t *TextureCache) InsertRawTexture(key string, data []byte, width, height int, filter TextureFilter) (*Texture, error) +``` + + + + +### func \(\*TextureCache\) [InsertTexture]() + +```go +func (t *TextureCache) InsertTexture(tex *Texture) +``` + + + + +### func \(\*TextureCache\) [ReloadTexture]() + +```go +func (t *TextureCache) ReloadTexture(textureKey string, filter TextureFilter) error +``` + + + + +### func \(\*TextureCache\) [Texture]() + +```go +func (t *TextureCache) Texture(textureKey string, filter TextureFilter) (*Texture, error) +``` + + + + +## type [TextureCleanup]() + + + +```go +type TextureCleanup struct { + // contains filtered or unexported fields +} +``` + + +## type [TextureColorFormat]() + + + +```go +type TextureColorFormat int +``` + + + +```go +const ( + TextureColorFormatRgbaUnorm TextureColorFormat = iota + TextureColorFormatRgbUnorm + TextureColorFormatRgbaSrgb + TextureColorFormatRgbSrgb + TextureColorFormatLuminance +) +``` + + +## type [TextureData]() + + + +```go +type TextureData struct { + Mem []byte + InternalFormat TextureInputType + Format TextureColorFormat + Type TextureMemType + Width int + Height int + InputType TextureFileFormat + Dimensions TextureDimensions +} +``` + + +### func [ReadRawTextureData]() + +```go +func ReadRawTextureData(mem []byte, inputType TextureFileFormat) TextureData +``` + + + + +### func [TexturePixelsFromAsset]() + +```go +func TexturePixelsFromAsset(assetDb assets.Database, key string) (TextureData, error) +``` + + + + +## type [TextureDimensions]() + + + +```go +type TextureDimensions = int +``` + + + +```go +const ( + TextureDimensions2 TextureDimensions = iota + TextureDimensions1 + TextureDimensions3 + TextureDimensionsCube +) +``` + + +## type [TextureFileFormat]() + + + +```go +type TextureFileFormat = int +``` + + + +```go +const ( + TextureFileFormatAstc TextureFileFormat = iota + TextureFileFormatPng + TextureFileFormatRaw +) +``` + + +## type [TextureFilter]() + + + +```go +type TextureFilter = int +``` + + + +```go +const ( + TextureFilterLinear TextureFilter = iota + TextureFilterNearest + TextureFilterMax +) +``` + + +## type [TextureId]() + + + +```go +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 +} +``` + + +### func \(TextureId\) [IsValid]() + +```go +func (t TextureId) IsValid() bool +``` + + + + +## type [TextureInputType]() + + + +```go +type TextureInputType int +``` + + + +```go +const ( + TextureInputTypeCompressedRgbaAstc4x4 TextureInputType = iota + TextureInputTypeCompressedRgbaAstc5x4 + TextureInputTypeCompressedRgbaAstc5x5 + TextureInputTypeCompressedRgbaAstc6x5 + TextureInputTypeCompressedRgbaAstc6x6 + TextureInputTypeCompressedRgbaAstc8x5 + TextureInputTypeCompressedRgbaAstc8x6 + TextureInputTypeCompressedRgbaAstc8x8 + TextureInputTypeCompressedRgbaAstc10x5 + TextureInputTypeCompressedRgbaAstc10x6 + TextureInputTypeCompressedRgbaAstc10x8 + TextureInputTypeCompressedRgbaAstc10x10 + TextureInputTypeCompressedRgbaAstc12x10 + TextureInputTypeCompressedRgbaAstc12x12 + TextureInputTypeRgba8 + TextureInputTypeRgb8 + TextureInputTypeLuminance +) +``` + + +## type [TextureMemType]() + + + +```go +type TextureMemType = int +``` + + + +```go +const ( + TextureMemTypeUnsignedByte TextureMemType = iota +) +``` + + +## type [Vertex]() + + + +```go +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 +} +``` + + +### func [MeshPlaneData]() + +```go +func MeshPlaneData() ([]Vertex, []uint32) +``` + + + + +### func [MeshQuadData]() + +```go +func MeshQuadData() ([]Vertex, []uint32) +``` + + + + +## type [ViewCuller]() + + + +```go +type ViewCuller interface { + IsInView(box collision.AABB) bool + ViewChanged() bool +} +``` + +Generated by [gomarkdoc]() diff --git a/docs/api/root.md b/docs/api/root.md new file mode 100644 index 000000000..c9140eee3 --- /dev/null +++ b/docs/api/root.md @@ -0,0 +1,55 @@ + + +# src + +```go +import "kaijuengine.com" +``` + +## Index + +- [type Game](<#Game>) + - [func \(Game\) ContentDatabase\(\) \(assets.Database, error\)](<#Game.ContentDatabase>) + - [func \(g \*Game\) Launch\(host \*engine.Host\)](<#Game.Launch>) + - [func \(Game\) PluginRegistry\(\) \[\]reflect.Type](<#Game.PluginRegistry>) + + + +## type [Game]() + + + +```go +type Game struct { + // contains filtered or unexported fields +} +``` + + +### func \(Game\) [ContentDatabase]() + +```go +func (Game) ContentDatabase() (assets.Database, error) +``` + + + + +### func \(\*Game\) [Launch]() + +```go +func (g *Game) Launch(host *engine.Host) +``` + + + + +### func \(Game\) [PluginRegistry]() + +```go +func (Game) PluginRegistry() []reflect.Type +``` + + + +Generated by [gomarkdoc]() diff --git a/src/tools/gendocs.go b/src/tools/gendocs.go new file mode 100644 index 000000000..ac9fc606a --- /dev/null +++ b/src/tools/gendocs.go @@ -0,0 +1,224 @@ +package main + +import ( + "fmt" + "log/slog" + "os" + "os/exec" + "path/filepath" + "strings" +) + +type App struct { + srcPath string + docsPath string + logger *slog.Logger +} + +func main() { + logger := slog.New(slog.NewTextHandler(os.Stdout, nil)) + + if len(os.Args) < 2 { + logger.Error("missing project path argument", "usage", os.Args[0]+" ") + os.Exit(1) + } + + app := NewApp(os.Args[1], logger) + + if err := app.Run(); err != nil { + logger.Error("application failed", "error", err) + os.Exit(1) + } + + logger.Info("documentation generated successfully") +} + +func NewApp(srcPath string, logger *slog.Logger) *App { + docsPath := filepath.Join(filepath.Dir(srcPath), "docs", "api") + return &App{ + srcPath: srcPath, + docsPath: docsPath, + logger: logger, + } +} + +func (a *App) Run() error { + if err := os.MkdirAll(a.docsPath, os.ModePerm); err != nil { + return fmt.Errorf("error creating docs directory: %w", err) + } + + packages, err := findPackages(a.srcPath) + if err != nil { + return err + } + + a.printPackages(packages) + + for name, path := range packages { + if err := a.generatePackageDoc(name, path); err != nil { + a.logger.Warn("failed to generate docs", "package", name, "error", err) + } + } + + return createIndex(packages, a.docsPath) +} + +func (a *App) printPackages(packages map[string]string) { + a.logger.Info("packages discovered", "count", len(packages)) + + for name, path := range packages { + a.logger.Info("package", "name", name, "path", path) + } +} + +func (a *App) generatePackageDoc(name, path string) error { + outputFile := filepath.Join(a.docsPath, name+".md") + + a.logger.Info("generating docs", "package", name) + + if err := runGomarkdoc(a.srcPath, path, outputFile); err != nil { + return err + } + + a.logger.Info("generated", "file", outputFile) + return nil +} + +func findPackages(srcPath string) (map[string]string, error) { + packages := make(map[string]string) + + entries, err := os.ReadDir(srcPath) + if err != nil { + return nil, err + } + + if hasGoFiles(srcPath) { + packages["root"] = "." + } + + for _, entry := range entries { + if !entry.IsDir() { + continue + } + + name := entry.Name() + if shouldSkip(name) { + continue + } + + packagePath := filepath.Join(srcPath, name) + if hasGoFiles(packagePath) { + packages[name] = name + } + } + + return packages, nil +} + +func hasGoFiles(dir string) bool { + entries, err := os.ReadDir(dir) + if err != nil { + return false + } + + for _, entry := range entries { + if !entry.IsDir() && strings.HasSuffix(entry.Name(), ".go") { + return true + } + } + return false +} + +func shouldSkip(name string) bool { + skipDirs := map[string]struct{}{ + ".git": {}, "vendor": {}, "node_modules": {}, "build": {}, "dist": {}, "docs": {}, + "bullet3": {}, "soloud": {}, "libs": {}, "tools": {}, "file_templates": {}, + "generators": {}, "ollama": {}, "network": {}, + } + + _, exists := skipDirs[name] + return exists +} + +func runGomarkdoc(srcPath, packagePath, outputFile string) error { + target := "." + if packagePath != "." { + target = "./" + packagePath + } + + cmd := exec.Command("gomarkdoc", "--output", outputFile, target) + cmd.Dir = srcPath + + output, err := cmd.CombinedOutput() + if err != nil { + return fmt.Errorf("gomarkdoc failed: %w | output: %s", err, string(output)) + } + + return nil +} + +func createIndex(packages map[string]string, docsPath string) error { + var builder strings.Builder + + builder.WriteString("# API Documentation\n\n") + builder.WriteString("Auto-generated documentation using gomarkdoc.\n\n") + + categories := categorizePackages(packages) + + order := []string{"Core", "Engine", "Platform", "Rendering", "Registry", "Other"} + + for _, cat := range order { + pkgs := categories[cat] + if len(pkgs) == 0 { + continue + } + + builder.WriteString(fmt.Sprintf("## %s\n\n", cat)) + for _, pkg := range pkgs { + displayName := pkg + if pkg == "root" { + displayName = "Root Package" + } + builder.WriteString(fmt.Sprintf("- [%s](%s.md)\n", displayName, pkg)) + } + builder.WriteString("\n") + } + + indexFile := filepath.Join(docsPath, "index.md") + return os.WriteFile(indexFile, []byte(builder.String()), 0644) +} + +func categorizePackages(packages map[string]string) map[string][]string { + categories := map[string][]string{ + "Core": {}, + "Engine": {}, + "Platform": {}, + "Rendering": {}, + "Registry": {}, + "Other": {}, + } + + for name := range packages { + category := categorize(name) + categories[category] = append(categories[category], name) + } + + return categories +} + +func categorize(packageName string) string { + switch { + case packageName == "bootstrap": + return "Core" + case strings.HasPrefix(packageName, "engine"): + return "Engine" + case strings.HasPrefix(packageName, "platform"): + return "Platform" + case packageName == "rendering": + return "Rendering" + case strings.Contains(packageName, "registry"): + return "Registry" + default: + return "Other" + } +}