Showing preview only (3,582K chars total). Download the full file or copy to clipboard to get everything.
Repository: TheCherno/Hazel
Branch: master
Commit: 1feb70572fa8
Files: 432
Total size: 74.3 MB
Directory structure:
gitextract_80u9dz8d/
├── .editorconfig
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ ├── issue--bug-report.md
│ │ ├── issue--feature-request.md
│ │ └── other-issues--blank-template.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .gitmodules
├── Dependencies.lua
├── Hazel/
│ ├── premake5.lua
│ ├── src/
│ │ ├── Hazel/
│ │ │ ├── Core/
│ │ │ │ ├── Application.cpp
│ │ │ │ ├── Application.h
│ │ │ │ ├── Assert.h
│ │ │ │ ├── Base.h
│ │ │ │ ├── Buffer.h
│ │ │ │ ├── EntryPoint.h
│ │ │ │ ├── FileSystem.cpp
│ │ │ │ ├── FileSystem.h
│ │ │ │ ├── Input.h
│ │ │ │ ├── KeyCodes.h
│ │ │ │ ├── Layer.cpp
│ │ │ │ ├── Layer.h
│ │ │ │ ├── LayerStack.cpp
│ │ │ │ ├── LayerStack.h
│ │ │ │ ├── Log.cpp
│ │ │ │ ├── Log.h
│ │ │ │ ├── MouseCodes.h
│ │ │ │ ├── PlatformDetection.h
│ │ │ │ ├── Timer.h
│ │ │ │ ├── Timestep.h
│ │ │ │ ├── UUID.cpp
│ │ │ │ ├── UUID.h
│ │ │ │ ├── Window.cpp
│ │ │ │ └── Window.h
│ │ │ ├── Debug/
│ │ │ │ └── Instrumentor.h
│ │ │ ├── Events/
│ │ │ │ ├── ApplicationEvent.h
│ │ │ │ ├── Event.h
│ │ │ │ ├── KeyEvent.h
│ │ │ │ └── MouseEvent.h
│ │ │ ├── ImGui/
│ │ │ │ ├── ImGuiBuild.cpp
│ │ │ │ ├── ImGuiLayer.cpp
│ │ │ │ └── ImGuiLayer.h
│ │ │ ├── Math/
│ │ │ │ ├── Math.cpp
│ │ │ │ └── Math.h
│ │ │ ├── Physics/
│ │ │ │ └── Physics2D.h
│ │ │ ├── Project/
│ │ │ │ ├── Project.cpp
│ │ │ │ ├── Project.h
│ │ │ │ ├── ProjectSerializer.cpp
│ │ │ │ └── ProjectSerializer.h
│ │ │ ├── Renderer/
│ │ │ │ ├── Buffer.cpp
│ │ │ │ ├── Buffer.h
│ │ │ │ ├── Camera.h
│ │ │ │ ├── EditorCamera.cpp
│ │ │ │ ├── EditorCamera.h
│ │ │ │ ├── Font.cpp
│ │ │ │ ├── Font.h
│ │ │ │ ├── Framebuffer.cpp
│ │ │ │ ├── Framebuffer.h
│ │ │ │ ├── GraphicsContext.cpp
│ │ │ │ ├── GraphicsContext.h
│ │ │ │ ├── MSDFData.h
│ │ │ │ ├── OrthographicCamera.cpp
│ │ │ │ ├── OrthographicCamera.h
│ │ │ │ ├── OrthographicCameraController.cpp
│ │ │ │ ├── OrthographicCameraController.h
│ │ │ │ ├── RenderCommand.cpp
│ │ │ │ ├── RenderCommand.h
│ │ │ │ ├── Renderer.cpp
│ │ │ │ ├── Renderer.h
│ │ │ │ ├── Renderer2D.cpp
│ │ │ │ ├── Renderer2D.h
│ │ │ │ ├── RendererAPI.cpp
│ │ │ │ ├── RendererAPI.h
│ │ │ │ ├── Shader.cpp
│ │ │ │ ├── Shader.h
│ │ │ │ ├── Texture.cpp
│ │ │ │ ├── Texture.h
│ │ │ │ ├── UniformBuffer.cpp
│ │ │ │ ├── UniformBuffer.h
│ │ │ │ ├── VertexArray.cpp
│ │ │ │ └── VertexArray.h
│ │ │ ├── Scene/
│ │ │ │ ├── Components.h
│ │ │ │ ├── Entity.cpp
│ │ │ │ ├── Entity.h
│ │ │ │ ├── Scene.cpp
│ │ │ │ ├── Scene.h
│ │ │ │ ├── SceneCamera.cpp
│ │ │ │ ├── SceneCamera.h
│ │ │ │ ├── SceneSerializer.cpp
│ │ │ │ ├── SceneSerializer.h
│ │ │ │ └── ScriptableEntity.h
│ │ │ ├── Scripting/
│ │ │ │ ├── ScriptEngine.cpp
│ │ │ │ ├── ScriptEngine.h
│ │ │ │ ├── ScriptGlue.cpp
│ │ │ │ └── ScriptGlue.h
│ │ │ ├── UI/
│ │ │ │ └── UI.h
│ │ │ └── Utils/
│ │ │ └── PlatformUtils.h
│ │ ├── Hazel.h
│ │ ├── Platform/
│ │ │ ├── OpenGL/
│ │ │ │ ├── OpenGLBuffer.cpp
│ │ │ │ ├── OpenGLBuffer.h
│ │ │ │ ├── OpenGLContext.cpp
│ │ │ │ ├── OpenGLContext.h
│ │ │ │ ├── OpenGLFramebuffer.cpp
│ │ │ │ ├── OpenGLFramebuffer.h
│ │ │ │ ├── OpenGLRendererAPI.cpp
│ │ │ │ ├── OpenGLRendererAPI.h
│ │ │ │ ├── OpenGLShader.cpp
│ │ │ │ ├── OpenGLShader.h
│ │ │ │ ├── OpenGLTexture.cpp
│ │ │ │ ├── OpenGLTexture.h
│ │ │ │ ├── OpenGLUniformBuffer.cpp
│ │ │ │ ├── OpenGLUniformBuffer.h
│ │ │ │ ├── OpenGLVertexArray.cpp
│ │ │ │ └── OpenGLVertexArray.h
│ │ │ └── Windows/
│ │ │ ├── WindowsInput.cpp
│ │ │ ├── WindowsPlatformUtils.cpp
│ │ │ ├── WindowsWindow.cpp
│ │ │ └── WindowsWindow.h
│ │ ├── hzpch.cpp
│ │ └── hzpch.h
│ └── vendor/
│ ├── Glad/
│ │ ├── include/
│ │ │ ├── KHR/
│ │ │ │ └── khrplatform.h
│ │ │ └── glad/
│ │ │ └── glad.h
│ │ ├── premake5.lua
│ │ └── src/
│ │ └── glad.c
│ ├── entt/
│ │ ├── LICENSE.txt
│ │ └── include/
│ │ └── entt.hpp
│ ├── filewatch/
│ │ └── FileWatch.h
│ ├── mono/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── include/
│ │ │ └── mono/
│ │ │ ├── jit/
│ │ │ │ └── jit.h
│ │ │ ├── metadata/
│ │ │ │ ├── abi-details.h
│ │ │ │ ├── appdomain-icalls.h
│ │ │ │ ├── appdomain.h
│ │ │ │ ├── assembly-internals.h
│ │ │ │ ├── assembly.h
│ │ │ │ ├── attach.h
│ │ │ │ ├── attrdefs.h
│ │ │ │ ├── blob.h
│ │ │ │ ├── callspec.h
│ │ │ │ ├── cil-coff.h
│ │ │ │ ├── class-abi-details.h
│ │ │ │ ├── class-getters.h
│ │ │ │ ├── class-init.h
│ │ │ │ ├── class-inlines.h
│ │ │ │ ├── class-internals.h
│ │ │ │ ├── class-private-definition.h
│ │ │ │ ├── class.h
│ │ │ │ ├── cominterop-win32-internals.h
│ │ │ │ ├── cominterop.h
│ │ │ │ ├── console-io.h
│ │ │ │ ├── console-win32-internals.h
│ │ │ │ ├── coree-internals.h
│ │ │ │ ├── coree.h
│ │ │ │ ├── culture-info-tables.h
│ │ │ │ ├── culture-info.h
│ │ │ │ ├── custom-attrs-internals.h
│ │ │ │ ├── debug-helpers.h
│ │ │ │ ├── debug-internals.h
│ │ │ │ ├── debug-mono-ppdb.h
│ │ │ │ ├── debug-mono-symfile.h
│ │ │ │ ├── domain-internals.h
│ │ │ │ ├── dynamic-image-internals.h
│ │ │ │ ├── dynamic-stream-internals.h
│ │ │ │ ├── environment.h
│ │ │ │ ├── exception-internals.h
│ │ │ │ ├── exception.h
│ │ │ │ ├── external-only.h
│ │ │ │ ├── fdhandle.h
│ │ │ │ ├── file-mmap.h
│ │ │ │ ├── filewatcher.h
│ │ │ │ ├── gc-internals.h
│ │ │ │ ├── handle-decl.h
│ │ │ │ ├── handle.h
│ │ │ │ ├── icall-decl.h
│ │ │ │ ├── icall-def-netcore.h
│ │ │ │ ├── icall-def.h
│ │ │ │ ├── icall-internals.h
│ │ │ │ ├── icall-signatures.h
│ │ │ │ ├── icall-table.h
│ │ │ │ ├── icall-windows-internals.h
│ │ │ │ ├── icalls.h
│ │ │ │ ├── image-internals.h
│ │ │ │ ├── image.h
│ │ │ │ ├── jit-icall-reg.h
│ │ │ │ ├── loaded-images-internals.h
│ │ │ │ ├── loader-internals.h
│ │ │ │ ├── loader.h
│ │ │ │ ├── locales.h
│ │ │ │ ├── lock-tracer.h
│ │ │ │ ├── marshal-ilgen.h
│ │ │ │ ├── marshal-internals.h
│ │ │ │ ├── marshal-windows-internals.h
│ │ │ │ ├── marshal.h
│ │ │ │ ├── mempool-internals.h
│ │ │ │ ├── mempool.h
│ │ │ │ ├── metadata-internals.h
│ │ │ │ ├── metadata.h
│ │ │ │ ├── method-builder-ilgen-internals.h
│ │ │ │ ├── method-builder-ilgen.h
│ │ │ │ ├── method-builder-internals.h
│ │ │ │ ├── method-builder.h
│ │ │ │ ├── monitor.h
│ │ │ │ ├── mono-basic-block.h
│ │ │ │ ├── mono-conc-hash.h
│ │ │ │ ├── mono-config-dirs.h
│ │ │ │ ├── mono-config-internals.h
│ │ │ │ ├── mono-config.h
│ │ │ │ ├── mono-debug.h
│ │ │ │ ├── mono-endian.h
│ │ │ │ ├── mono-gc.h
│ │ │ │ ├── mono-hash-internals.h
│ │ │ │ ├── mono-hash.h
│ │ │ │ ├── mono-mlist.h
│ │ │ │ ├── mono-perfcounters-def.h
│ │ │ │ ├── mono-perfcounters.h
│ │ │ │ ├── mono-ptr-array.h
│ │ │ │ ├── mono-security-windows-internals.h
│ │ │ │ ├── normalization-tables.h
│ │ │ │ ├── null-gc-handles.h
│ │ │ │ ├── number-formatter.h
│ │ │ │ ├── number-ms.h
│ │ │ │ ├── object-forward.h
│ │ │ │ ├── object-internals.h
│ │ │ │ ├── object-offsets.h
│ │ │ │ ├── object.h
│ │ │ │ ├── opcodes.h
│ │ │ │ ├── pal-ios.h
│ │ │ │ ├── profiler-events.h
│ │ │ │ ├── profiler-legacy.h
│ │ │ │ ├── profiler-private.h
│ │ │ │ ├── profiler.h
│ │ │ │ ├── property-bag.h
│ │ │ │ ├── rand.h
│ │ │ │ ├── reflection-cache.h
│ │ │ │ ├── reflection-internals.h
│ │ │ │ ├── reflection.h
│ │ │ │ ├── remoting.h
│ │ │ │ ├── row-indexes.h
│ │ │ │ ├── runtime.h
│ │ │ │ ├── security-core-clr.h
│ │ │ │ ├── security-manager.h
│ │ │ │ ├── security.h
│ │ │ │ ├── seq-points-data.h
│ │ │ │ ├── sgen-bridge-internals.h
│ │ │ │ ├── sgen-bridge.h
│ │ │ │ ├── sgen-client-mono.h
│ │ │ │ ├── sgen-dynarray.h
│ │ │ │ ├── sgen-mono-ilgen.h
│ │ │ │ ├── sgen-mono.h
│ │ │ │ ├── sgen-toggleref.h
│ │ │ │ ├── sre-internals.h
│ │ │ │ ├── string-icalls.h
│ │ │ │ ├── tabledefs.h
│ │ │ │ ├── threadpool-io.h
│ │ │ │ ├── threadpool-worker.h
│ │ │ │ ├── threadpool.h
│ │ │ │ ├── threads-types.h
│ │ │ │ ├── threads.h
│ │ │ │ ├── tokentype.h
│ │ │ │ ├── verify-internals.h
│ │ │ │ ├── verify.h
│ │ │ │ ├── w32error.h
│ │ │ │ ├── w32event.h
│ │ │ │ ├── w32file-internals.h
│ │ │ │ ├── w32file-unix-glob.h
│ │ │ │ ├── w32file-win32-internals.h
│ │ │ │ ├── w32file.h
│ │ │ │ ├── w32handle-namespace.h
│ │ │ │ ├── w32handle.h
│ │ │ │ ├── w32mutex.h
│ │ │ │ ├── w32process-internals.h
│ │ │ │ ├── w32process-unix-internals.h
│ │ │ │ ├── w32process.h
│ │ │ │ ├── w32semaphore.h
│ │ │ │ ├── w32socket-internals.h
│ │ │ │ ├── w32socket.h
│ │ │ │ ├── w32subset.h
│ │ │ │ └── wrapper-types.h
│ │ │ └── utils/
│ │ │ ├── mono-counters.h
│ │ │ ├── mono-dl-fallback.h
│ │ │ ├── mono-error.h
│ │ │ ├── mono-forward.h
│ │ │ ├── mono-logger.h
│ │ │ └── mono-publib.h
│ │ └── lib/
│ │ ├── Debug/
│ │ │ └── libmono-static-sgen.lib
│ │ └── Release/
│ │ └── libmono-static-sgen.lib
│ └── stb_image/
│ ├── stb_image.cpp
│ └── stb_image.h
├── Hazel-ScriptCore/
│ ├── Source/
│ │ └── Hazel/
│ │ ├── Input.cs
│ │ ├── InternalCalls.cs
│ │ ├── KeyCode.cs
│ │ ├── Scene/
│ │ │ ├── Components.cs
│ │ │ └── Entity.cs
│ │ ├── Vector2.cs
│ │ ├── Vector3.cs
│ │ └── Vector4.cs
│ └── premake5.lua
├── Hazelnut/
│ ├── SandboxProject/
│ │ ├── Assets/
│ │ │ ├── Scenes/
│ │ │ │ ├── 3DExample.hazel
│ │ │ │ ├── Example.hazel
│ │ │ │ ├── Physics2D.hazel
│ │ │ │ └── PinkCube.hazel
│ │ │ └── Scripts/
│ │ │ ├── Source/
│ │ │ │ ├── Camera.cs
│ │ │ │ └── Player.cs
│ │ │ ├── Win-GenProjects.bat
│ │ │ └── premake5.lua
│ │ └── Sandbox.hproj
│ ├── assets/
│ │ ├── fonts/
│ │ │ └── opensans/
│ │ │ └── LICENSE.txt
│ │ └── shaders/
│ │ ├── FlatColor.glsl
│ │ ├── Renderer2D_Circle.glsl
│ │ ├── Renderer2D_Line.glsl
│ │ ├── Renderer2D_Quad.glsl
│ │ └── Renderer2D_Text.glsl
│ ├── imgui.ini
│ ├── mono/
│ │ └── lib/
│ │ └── mono/
│ │ └── 4.5/
│ │ ├── Facades/
│ │ │ ├── Microsoft.Win32.Registry.AccessControl.pdb
│ │ │ ├── System.IO.FileSystem.AccessControl.pdb
│ │ │ ├── System.Reflection.TypeExtensions.pdb
│ │ │ ├── System.ServiceProcess.ServiceController.pdb
│ │ │ ├── System.Text.Encoding.CodePages.pdb
│ │ │ └── System.Threading.AccessControl.pdb
│ │ ├── MSBuild/
│ │ │ ├── Microsoft.Build.CommonTypes.xsd
│ │ │ └── Microsoft.Build.Core.xsd
│ │ ├── Microsoft.Build.xsd
│ │ ├── Microsoft.CSharp.targets
│ │ ├── Microsoft.Common.targets
│ │ ├── Microsoft.Common.tasks
│ │ ├── Microsoft.VisualBasic.targets
│ │ ├── RabbitMQ.Client.Apigen.pdb
│ │ ├── VBCSCompiler.exe.config
│ │ ├── al.pdb
│ │ ├── aprofutil.pdb
│ │ ├── browsercaps-updater.pdb
│ │ ├── caspol.pdb
│ │ ├── cccheck.pdb
│ │ ├── ccrewrite.pdb
│ │ ├── cert-sync.pdb
│ │ ├── cert2spc.pdb
│ │ ├── certmgr.pdb
│ │ ├── chktrust.pdb
│ │ ├── crlupdate.pdb
│ │ ├── csc.exe.config
│ │ ├── csc.rsp
│ │ ├── csharp.pdb
│ │ ├── csi.exe.config
│ │ ├── csi.rsp
│ │ ├── culevel.pdb
│ │ ├── disco.pdb
│ │ ├── dtd2rng.pdb
│ │ ├── dtd2xsd.pdb
│ │ ├── gacutil.pdb
│ │ ├── genxs.pdb
│ │ ├── httpcfg.pdb
│ │ ├── ictool.pdb
│ │ ├── ikdasm.pdb
│ │ ├── ilasm.pdb
│ │ ├── illinkanalyzer.pdb
│ │ ├── installutil.pdb
│ │ ├── installvst.pdb
│ │ ├── lc.pdb
│ │ ├── macpack.pdb
│ │ ├── makecert.pdb
│ │ ├── mconfig.pdb
│ │ ├── mcs.pdb
│ │ ├── mdbrebase.pdb
│ │ ├── mdoc.pdb
│ │ ├── mkbundle.pdb
│ │ ├── mod.pdb
│ │ ├── mono-api-diff.pdb
│ │ ├── mono-api-html.pdb
│ │ ├── mono-api-info.pdb
│ │ ├── mono-cil-strip.pdb
│ │ ├── mono-service.pdb
│ │ ├── mono-shlib-cop.exe.config
│ │ ├── mono-shlib-cop.pdb
│ │ ├── mono-symbolicate.pdb
│ │ ├── mono-xmltool.pdb
│ │ ├── monolinker.pdb
│ │ ├── monop.pdb
│ │ ├── mozroots.pdb
│ │ ├── mscorlib.pdb
│ │ ├── pdb2mdb.pdb
│ │ ├── permview.pdb
│ │ ├── resgen.pdb
│ │ ├── secutil.pdb
│ │ ├── setreg.pdb
│ │ ├── sgen.pdb
│ │ ├── signcode.pdb
│ │ ├── sn.pdb
│ │ ├── soapsuds.pdb
│ │ ├── sqlmetal.exe.config
│ │ ├── sqlmetal.pdb
│ │ ├── sqlsharp.pdb
│ │ ├── svcutil.pdb
│ │ ├── vbc.exe.config
│ │ ├── vbc.rsp
│ │ ├── vbnc.exe.mdb
│ │ ├── vbnc.rsp
│ │ ├── wsdl.pdb
│ │ ├── xbuild.exe.config
│ │ ├── xbuild.pdb
│ │ ├── xbuild.rsp
│ │ └── xsd.pdb
│ ├── premake5.lua
│ └── src/
│ ├── EditorLayer.cpp
│ ├── EditorLayer.h
│ ├── HazelnutApp.cpp
│ └── Panels/
│ ├── ContentBrowserPanel.cpp
│ ├── ContentBrowserPanel.h
│ ├── SceneHierarchyPanel.cpp
│ └── SceneHierarchyPanel.h
├── LICENSE
├── README.md
├── Sandbox/
│ ├── assets/
│ │ ├── fonts/
│ │ │ └── opensans/
│ │ │ └── LICENSE.txt
│ │ └── shaders/
│ │ ├── FlatColor.glsl
│ │ └── Texture.glsl
│ ├── imgui.ini
│ ├── premake5.lua
│ └── src/
│ ├── ExampleLayer.cpp
│ ├── ExampleLayer.h
│ ├── Sandbox2D.cpp
│ ├── Sandbox2D.h
│ └── SandboxApp.cpp
├── premake5.lua
├── scripts/
│ ├── Setup.bat
│ ├── Setup.py
│ ├── SetupPremake.py
│ ├── SetupPython.py
│ ├── SetupVulkan.py
│ ├── Utils.py
│ └── Win-GenProjects.bat
└── vendor/
└── premake/
├── premake5.lua
└── premake_customization/
└── solution_items.lua
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
================================================
FILE: .github/CONTRIBUTING.md
================================================
Contributing to Hazel!
======================
Thanks for your interest in contributing to Hazel! :tada: We love getting [pull requests](https://www.quora.com/GitHub-What-is-a-pull-request) for bugfixes and contributions of our community to keep Hazel growing.
We want to keep it as easy as possible to contribute changes. These guidelines are intended to help smooth that process, and allow us to review and approve your changes quickly and easily. Improvements are always welcome! Feel free to [open an issue][issue-tracker] or [submit a new pull request][submit-pr]. And finally, these are just guidelines, not rules, so use your best judgement when necessary.
If you're new to [GitHub][github], you may want to begin with [Getting Started with GitHub](https://help.github.com/en/categories/getting-started-with-github) and Thinkful's [GitHub Pull Request Tutorial](https://www.thinkful.com/learn/github-pull-request-tutorial/).
## Language
As TheCherno creates his videos about Hazel in English, the devs ask to keep the code base, issues and pull requests in English only.
Thanks for your understanding.
## Reporting Bugs
Bugs should be reported on our [GitHub Issue Tracker][issue-tracker] using the bug report template.
Follow the advice in [How do I ask a good question?][how-to-ask]. While the article is intended for people asking questions on Stack Overflow, it all applies to writing a good bug report too.
## Requesting New Features
Feature requests should also be sent to our [GitHub Issue Tracker][issue-tracker] using the feature request template.
- Explain the problem that you're having, and anything you've tried to solve it using the currently available features.
- Explain how this new feature will help.
- If possible, provide an example, like a code snippet, showing what your new feature might look like in use.
Also, much of the advice in [How do I ask a good question?][how-to-ask] applies here too.
## Contributing a Fix or Feature
You've created a new fix or feature for Hazel. Awesome!
1. If you haven't already, create a fork of the Hazel repository.
2. Create a topic branch, and make all of your changes on that branch.
3. Submit a pull request, use the implemented issue template if it is based on an issue or the new issue template if it is not linked to any issue.
4. Give us a moment. Hazel is maintained by only a few people, all of whom are doing this on their limited free time, so it may take us a bit to review your request. Bug fixes should be merged in directly, while features usually require Cherno's approval with or without it mentioned in one (or more) videos.
If you're not sure what any of that means, check out Thinkful's [GitHub Pull Request Tutorial][thinkful-pr-tutorial] for a complete walkthrough of the process.
### Writing a Good Pull Request
- Stay focused on a single fix or feature. If you submit multiple changes in a single request, we may like some but spot issues with others. When that happens, we have to reject the whole thing. If you submit each change in its own request it is easier for us to review and approve.
- Limit your changes to only what is required to implement the fix or feature. In particular, avoid style or formatting tools that may modify the formatting of other areas of the code.
- Use descriptive commit titles/messages. "Implemented \<feature\>" or "Fixed \<problem\> is better than "Updated \<file\>".
- Make sure the code you submit compiles and runs without issues. When we set up unit tests and continuous integration we also expect that the pull request should pass all tests.
- Use [closing keywords][github-help-closing-keywords] in the appropriate section of our Pull Request template where applicable.
- Follow our coding conventions, which we've intentionally kept quite minimal.
### Coding Conventions
- Naming convention:
- For functions we use pascal case: **`FunctionName`**.
- For (scoped) variables and function parameters we use camel case: **`variableName`** and **`parameterName`**.
- For class names we use pascal case: **`ClassName`**.
- For class variables we use the Hungarian notation:
- Class member variables get the 'm_' prefix: **`m_ClassMemberVariableName`**.
- Class static variables get the 's_' prefix: **`s_ClassStaticVariableName`**.
- For macros we use snake case: **`MACRO_NAME`**.
- If it is specifically related to Hazel, we add the 'HZ_' prefix: **`HZ_MACRO_NAME`**.
- If there is a macro for the application and for the engine, we add an additional 'CORE_' prefix to the engine macro: **`HZ_CORE_MACRO_NAME`**.
- Use tabs for indentation, not spaces.
- When in doubt, match the code that's already there.
[github]: https://github.com
[how-to-ask]: https://stackoverflow.com/help/how-to-ask
[issue-tracker]: https://github.com/TheCherno/Hazel/issues
[submit-pr]: https://github.com/TheCherno/Hazel/pulls
[thinkful-pr-tutorial]: https://www.thinkful.com/learn/github-pull-request-tutorial/
[github-help-closing-keywords]: https://help.github.com/en/articles/closing-issues-using-keywords
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Hazel Community Support (Discord)
url: https://thecherno.com/discord
about: Please ask Hazel related questions in the game-engine-series thread.
================================================
FILE: .github/ISSUE_TEMPLATE/issue--bug-report.md
================================================
---
name: 'Issue: Bug report'
about: Create a report to help us improve Hazel
---
#### Describe the bug
A clear and concise description of what the bug is.
A screenshot or copy of the error could be helpful as well.
Make sure your bug can be reproduced with the Hazel Engine and not by your own engine that you're creating alongside with Hazel. For issues with your own engine, we're happy to help you in [TheCherno Discord server](https://thecherno.com/discord). Thanks for your understanding.
#### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error above
#### Expected behavior
A clear and concise description of what you expected to happen.
#### Screenshots
If applicable, add extra screenshots to help explain your problem.
#### Operating system: (please complete the following information)
- OS: [e.g. win-64]
- Version: [e.g. Windows 10 home]
#### Additional context
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/issue--feature-request.md
================================================
---
name: 'Issue: Feature request'
about: Suggest an idea/extension for Hazel
---
#### Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is, e.g. "I'm always frustrated when [...]"
#### Describe the solution you'd like
A clear and concise description of what you want to happen.
#### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
#### Additional context
Add any other context or screenshots about the feature request here. Any relevant information for platform specific features could be useful.
================================================
FILE: .github/ISSUE_TEMPLATE/other-issues--blank-template.md
================================================
---
name: 'Other issues: Blank template'
about: For issues that are not a bug report or feature request
---
Please consider using the Bug report or Feature request template. If it doesn't belong there, feel free to use this (empty) template. Make sure to provide enough details so it is clear for contributors to help you out. Premature or incomplete issues cannot be resolved due to lack of information or unclear descriptions.
Make sure your issue can be reproduced with the Hazel Engine and not by your own engine that you're creating alongside with Hazel. For issues with your own engine, we're happy to help you in [TheCherno Discord server](https://thecherno.com/discord). Thanks for your understanding.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
#### Describe the issue (if no issue has been made)
A clear and concise description of what the issue is. Explain the difference between the expected and the current behavior.
A screenshot or copy of the error could be helpful as well.
#### PR impact _(Make sure to add [closing keywords](https://help.github.com/en/articles/closing-issues-using-keywords))_
List of related issues/PRs this will solve:
Impact | Issue/PR
------------------------ | ------
Issues this solves | None or #number(s)
Other PRs this solves | None or #number(s)
#### Proposed fix _(Make sure you've read [on how to contribute](https://github.com/TheCherno/Hazel/blob/master/.github/CONTRIBUTING.md) to Hazel)_
A short description of what this fix is and how it fixed the issue you described.
#### Additional context
Add any other context about the solution here. Did you test the solution on all (relevant) platforms?
If not, create a [task list](https://help.github.com/en/articles/about-task-lists) here.
================================================
FILE: .gitignore
================================================
# Binaries
**/bin/
bin-int/
Intermediates/
# Hazel files
*.log
# Visual Studio files and folder
.vs/
**.sln
**.vcxproj
**.vcxproj.filters
**.vcxproj.user
**.csproj
# Directories
Hazel/vendor/VulkanSDK
Hazelnut/assets/cache
scripts/__pycache__
================================================
FILE: .gitmodules
================================================
[submodule "Hazel/vendor/spdlog"]
path = Hazel/vendor/spdlog
url = ../../gabime/spdlog.git
branch = v1.x
[submodule "Hazel/vendor/GLFW"]
path = Hazel/vendor/GLFW
url = ../../TheCherno/glfw.git
branch = master
[submodule "Hazel/vendor/imgui"]
path = Hazel/vendor/imgui
url = ../../TheCherno/imgui.git
branch = docking
[submodule "Hazel/vendor/glm"]
path = Hazel/vendor/glm
url = ../../g-truc/glm.git
branch = master
[submodule "Hazel/vendor/yaml-cpp"]
path = Hazel/vendor/yaml-cpp
url = https://github.com/thecherno/yaml-cpp
[submodule "Hazel/vendor/ImGuizmo"]
path = Hazel/vendor/ImGuizmo
url = https://github.com/thecherno/imguizmo
[submodule "Hazel/vendor/Box2D"]
path = Hazel/vendor/Box2D
url = https://github.com/thecherno/box2d
[submodule "Hazel/vendor/msdf-atlas-gen"]
path = Hazel/vendor/msdf-atlas-gen
url = https://github.com/TheCherno/msdf-atlas-gen
================================================
FILE: Dependencies.lua
================================================
-- Hazel Dependencies
VULKAN_SDK = os.getenv("VULKAN_SDK")
IncludeDir = {}
IncludeDir["stb_image"] = "%{wks.location}/Hazel/vendor/stb_image"
IncludeDir["yaml_cpp"] = "%{wks.location}/Hazel/vendor/yaml-cpp/include"
IncludeDir["Box2D"] = "%{wks.location}/Hazel/vendor/Box2D/include"
IncludeDir["filewatch"] = "%{wks.location}/Hazel/vendor/filewatch"
IncludeDir["GLFW"] = "%{wks.location}/Hazel/vendor/GLFW/include"
IncludeDir["Glad"] = "%{wks.location}/Hazel/vendor/Glad/include"
IncludeDir["ImGui"] = "%{wks.location}/Hazel/vendor/ImGui"
IncludeDir["ImGuizmo"] = "%{wks.location}/Hazel/vendor/ImGuizmo"
IncludeDir["glm"] = "%{wks.location}/Hazel/vendor/glm"
IncludeDir["entt"] = "%{wks.location}/Hazel/vendor/entt/include"
IncludeDir["mono"] = "%{wks.location}/Hazel/vendor/mono/include"
IncludeDir["shaderc"] = "%{wks.location}/Hazel/vendor/shaderc/include"
IncludeDir["SPIRV_Cross"] = "%{wks.location}/Hazel/vendor/SPIRV-Cross"
IncludeDir["VulkanSDK"] = "%{VULKAN_SDK}/Include"
IncludeDir["msdfgen"] = "%{wks.location}/Hazel/vendor/msdf-atlas-gen/msdfgen"
IncludeDir["msdf_atlas_gen"] = "%{wks.location}/Hazel/vendor/msdf-atlas-gen/msdf-atlas-gen"
LibraryDir = {}
LibraryDir["VulkanSDK"] = "%{VULKAN_SDK}/Lib"
LibraryDir["mono"] = "%{wks.location}/Hazel/vendor/mono/lib/%{cfg.buildcfg}"
Library = {}
Library["mono"] = "%{LibraryDir.mono}/libmono-static-sgen.lib"
Library["Vulkan"] = "%{LibraryDir.VulkanSDK}/vulkan-1.lib"
Library["VulkanUtils"] = "%{LibraryDir.VulkanSDK}/VkLayer_utils.lib"
Library["ShaderC_Debug"] = "%{LibraryDir.VulkanSDK}/shaderc_sharedd.lib"
Library["SPIRV_Cross_Debug"] = "%{LibraryDir.VulkanSDK}/spirv-cross-cored.lib"
Library["SPIRV_Cross_GLSL_Debug"] = "%{LibraryDir.VulkanSDK}/spirv-cross-glsld.lib"
Library["SPIRV_Tools_Debug"] = "%{LibraryDir.VulkanSDK}/SPIRV-Toolsd.lib"
Library["ShaderC_Release"] = "%{LibraryDir.VulkanSDK}/shaderc_shared.lib"
Library["SPIRV_Cross_Release"] = "%{LibraryDir.VulkanSDK}/spirv-cross-core.lib"
Library["SPIRV_Cross_GLSL_Release"] = "%{LibraryDir.VulkanSDK}/spirv-cross-glsl.lib"
-- Windows
Library["WinSock"] = "Ws2_32.lib"
Library["WinMM"] = "Winmm.lib"
Library["WinVersion"] = "Version.lib"
Library["BCrypt"] = "Bcrypt.lib"
================================================
FILE: Hazel/premake5.lua
================================================
project "Hazel"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "off"
targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
pchheader "hzpch.h"
pchsource "src/hzpch.cpp"
files
{
"src/**.h",
"src/**.cpp",
"vendor/stb_image/**.h",
"vendor/stb_image/**.cpp",
"vendor/glm/glm/**.hpp",
"vendor/glm/glm/**.inl",
"vendor/ImGuizmo/ImGuizmo.h",
"vendor/ImGuizmo/ImGuizmo.cpp"
}
defines
{
"_CRT_SECURE_NO_WARNINGS",
"GLFW_INCLUDE_NONE"
}
includedirs
{
"src",
"vendor/spdlog/include",
"%{IncludeDir.Box2D}",
"%{IncludeDir.filewatch}",
"%{IncludeDir.GLFW}",
"%{IncludeDir.Glad}",
"%{IncludeDir.ImGui}",
"%{IncludeDir.glm}",
"%{IncludeDir.msdfgen}",
"%{IncludeDir.msdf_atlas_gen}",
"%{IncludeDir.stb_image}",
"%{IncludeDir.entt}",
"%{IncludeDir.mono}",
"%{IncludeDir.yaml_cpp}",
"%{IncludeDir.ImGuizmo}",
"%{IncludeDir.VulkanSDK}"
}
links
{
"Box2D",
"GLFW",
"Glad",
"ImGui",
"msdf-atlas-gen",
"yaml-cpp",
"opengl32.lib",
"%{Library.mono}",
}
filter "files:vendor/ImGuizmo/**.cpp"
flags { "NoPCH" }
filter "system:windows"
systemversion "latest"
defines
{
}
links
{
"%{Library.WinSock}",
"%{Library.WinMM}",
"%{Library.WinVersion}",
"%{Library.BCrypt}",
}
filter "configurations:Debug"
defines "HZ_DEBUG"
runtime "Debug"
symbols "on"
links
{
"%{Library.ShaderC_Debug}",
"%{Library.SPIRV_Cross_Debug}",
"%{Library.SPIRV_Cross_GLSL_Debug}"
}
filter "configurations:Release"
defines "HZ_RELEASE"
runtime "Release"
optimize "on"
links
{
"%{Library.ShaderC_Release}",
"%{Library.SPIRV_Cross_Release}",
"%{Library.SPIRV_Cross_GLSL_Release}"
}
filter "configurations:Dist"
defines "HZ_DIST"
runtime "Release"
optimize "on"
links
{
"%{Library.ShaderC_Release}",
"%{Library.SPIRV_Cross_Release}",
"%{Library.SPIRV_Cross_GLSL_Release}"
}
================================================
FILE: Hazel/src/Hazel/Core/Application.cpp
================================================
#include "hzpch.h"
#include "Hazel/Core/Application.h"
#include "Hazel/Core/Log.h"
#include "Hazel/Renderer/Renderer.h"
#include "Hazel/Scripting/ScriptEngine.h"
#include "Hazel/Core/Input.h"
#include "Hazel/Utils/PlatformUtils.h"
namespace Hazel {
Application* Application::s_Instance = nullptr;
Application::Application(const ApplicationSpecification& specification)
: m_Specification(specification)
{
HZ_PROFILE_FUNCTION();
HZ_CORE_ASSERT(!s_Instance, "Application already exists!");
s_Instance = this;
// Set working directory here
if (!m_Specification.WorkingDirectory.empty())
std::filesystem::current_path(m_Specification.WorkingDirectory);
m_Window = Window::Create(WindowProps(m_Specification.Name));
m_Window->SetEventCallback(HZ_BIND_EVENT_FN(Application::OnEvent));
Renderer::Init();
m_ImGuiLayer = new ImGuiLayer();
PushOverlay(m_ImGuiLayer);
}
Application::~Application()
{
HZ_PROFILE_FUNCTION();
ScriptEngine::Shutdown();
Renderer::Shutdown();
}
void Application::PushLayer(Layer* layer)
{
HZ_PROFILE_FUNCTION();
m_LayerStack.PushLayer(layer);
layer->OnAttach();
}
void Application::PushOverlay(Layer* layer)
{
HZ_PROFILE_FUNCTION();
m_LayerStack.PushOverlay(layer);
layer->OnAttach();
}
void Application::Close()
{
m_Running = false;
}
void Application::SubmitToMainThread(const std::function<void()>& function)
{
std::scoped_lock<std::mutex> lock(m_MainThreadQueueMutex);
m_MainThreadQueue.emplace_back(function);
}
void Application::OnEvent(Event& e)
{
HZ_PROFILE_FUNCTION();
EventDispatcher dispatcher(e);
dispatcher.Dispatch<WindowCloseEvent>(HZ_BIND_EVENT_FN(Application::OnWindowClose));
dispatcher.Dispatch<WindowResizeEvent>(HZ_BIND_EVENT_FN(Application::OnWindowResize));
for (auto it = m_LayerStack.rbegin(); it != m_LayerStack.rend(); ++it)
{
if (e.Handled)
break;
(*it)->OnEvent(e);
}
}
void Application::Run()
{
HZ_PROFILE_FUNCTION();
while (m_Running)
{
HZ_PROFILE_SCOPE("RunLoop");
float time = Time::GetTime();
Timestep timestep = time - m_LastFrameTime;
m_LastFrameTime = time;
ExecuteMainThreadQueue();
if (!m_Minimized)
{
{
HZ_PROFILE_SCOPE("LayerStack OnUpdate");
for (Layer* layer : m_LayerStack)
layer->OnUpdate(timestep);
}
m_ImGuiLayer->Begin();
{
HZ_PROFILE_SCOPE("LayerStack OnImGuiRender");
for (Layer* layer : m_LayerStack)
layer->OnImGuiRender();
}
m_ImGuiLayer->End();
}
m_Window->OnUpdate();
}
}
bool Application::OnWindowClose(WindowCloseEvent& e)
{
m_Running = false;
return true;
}
bool Application::OnWindowResize(WindowResizeEvent& e)
{
HZ_PROFILE_FUNCTION();
if (e.GetWidth() == 0 || e.GetHeight() == 0)
{
m_Minimized = true;
return false;
}
m_Minimized = false;
Renderer::OnWindowResize(e.GetWidth(), e.GetHeight());
return false;
}
void Application::ExecuteMainThreadQueue()
{
std::scoped_lock<std::mutex> lock(m_MainThreadQueueMutex);
for (auto& func : m_MainThreadQueue)
func();
m_MainThreadQueue.clear();
}
}
================================================
FILE: Hazel/src/Hazel/Core/Application.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Core/Window.h"
#include "Hazel/Core/LayerStack.h"
#include "Hazel/Events/Event.h"
#include "Hazel/Events/ApplicationEvent.h"
#include "Hazel/Core/Timestep.h"
#include "Hazel/ImGui/ImGuiLayer.h"
int main(int argc, char** argv);
namespace Hazel {
struct ApplicationCommandLineArgs
{
int Count = 0;
char** Args = nullptr;
const char* operator[](int index) const
{
HZ_CORE_ASSERT(index < Count);
return Args[index];
}
};
struct ApplicationSpecification
{
std::string Name = "Hazel Application";
std::string WorkingDirectory;
ApplicationCommandLineArgs CommandLineArgs;
};
class Application
{
public:
Application(const ApplicationSpecification& specification);
virtual ~Application();
void OnEvent(Event& e);
void PushLayer(Layer* layer);
void PushOverlay(Layer* layer);
Window& GetWindow() { return *m_Window; }
void Close();
ImGuiLayer* GetImGuiLayer() { return m_ImGuiLayer; }
static Application& Get() { return *s_Instance; }
const ApplicationSpecification& GetSpecification() const { return m_Specification; }
void SubmitToMainThread(const std::function<void()>& function);
private:
void Run();
bool OnWindowClose(WindowCloseEvent& e);
bool OnWindowResize(WindowResizeEvent& e);
void ExecuteMainThreadQueue();
private:
ApplicationSpecification m_Specification;
Scope<Window> m_Window;
ImGuiLayer* m_ImGuiLayer;
bool m_Running = true;
bool m_Minimized = false;
LayerStack m_LayerStack;
float m_LastFrameTime = 0.0f;
std::vector<std::function<void()>> m_MainThreadQueue;
std::mutex m_MainThreadQueueMutex;
private:
static Application* s_Instance;
friend int ::main(int argc, char** argv);
};
// To be defined in CLIENT
Application* CreateApplication(ApplicationCommandLineArgs args);
}
================================================
FILE: Hazel/src/Hazel/Core/Assert.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Core/Log.h"
#include <filesystem>
#ifdef HZ_ENABLE_ASSERTS
// Alteratively we could use the same "default" message for both "WITH_MSG" and "NO_MSG" and
// provide support for custom formatting by concatenating the formatting string instead of having the format inside the default message
#define HZ_INTERNAL_ASSERT_IMPL(type, check, msg, ...) { if(!(check)) { HZ##type##ERROR(msg, __VA_ARGS__); HZ_DEBUGBREAK(); } }
#define HZ_INTERNAL_ASSERT_WITH_MSG(type, check, ...) HZ_INTERNAL_ASSERT_IMPL(type, check, "Assertion failed: {0}", __VA_ARGS__)
#define HZ_INTERNAL_ASSERT_NO_MSG(type, check) HZ_INTERNAL_ASSERT_IMPL(type, check, "Assertion '{0}' failed at {1}:{2}", HZ_STRINGIFY_MACRO(check), std::filesystem::path(__FILE__).filename().string(), __LINE__)
#define HZ_INTERNAL_ASSERT_GET_MACRO_NAME(arg1, arg2, macro, ...) macro
#define HZ_INTERNAL_ASSERT_GET_MACRO(...) HZ_EXPAND_MACRO( HZ_INTERNAL_ASSERT_GET_MACRO_NAME(__VA_ARGS__, HZ_INTERNAL_ASSERT_WITH_MSG, HZ_INTERNAL_ASSERT_NO_MSG) )
// Currently accepts at least the condition and one additional parameter (the message) being optional
#define HZ_ASSERT(...) HZ_EXPAND_MACRO( HZ_INTERNAL_ASSERT_GET_MACRO(__VA_ARGS__)(_, __VA_ARGS__) )
#define HZ_CORE_ASSERT(...) HZ_EXPAND_MACRO( HZ_INTERNAL_ASSERT_GET_MACRO(__VA_ARGS__)(_CORE_, __VA_ARGS__) )
#else
#define HZ_ASSERT(...)
#define HZ_CORE_ASSERT(...)
#endif
================================================
FILE: Hazel/src/Hazel/Core/Base.h
================================================
#pragma once
#include "Hazel/Core/PlatformDetection.h"
#include <memory>
#ifdef HZ_DEBUG
#if defined(HZ_PLATFORM_WINDOWS)
#define HZ_DEBUGBREAK() __debugbreak()
#elif defined(HZ_PLATFORM_LINUX)
#include <signal.h>
#define HZ_DEBUGBREAK() raise(SIGTRAP)
#else
#error "Platform doesn't support debugbreak yet!"
#endif
#define HZ_ENABLE_ASSERTS
#else
#define HZ_DEBUGBREAK()
#endif
#define HZ_EXPAND_MACRO(x) x
#define HZ_STRINGIFY_MACRO(x) #x
#define BIT(x) (1 << x)
#define HZ_BIND_EVENT_FN(fn) [this](auto&&... args) -> decltype(auto) { return this->fn(std::forward<decltype(args)>(args)...); }
namespace Hazel {
template<typename T>
using Scope = std::unique_ptr<T>;
template<typename T, typename ... Args>
constexpr Scope<T> CreateScope(Args&& ... args)
{
return std::make_unique<T>(std::forward<Args>(args)...);
}
template<typename T>
using Ref = std::shared_ptr<T>;
template<typename T, typename ... Args>
constexpr Ref<T> CreateRef(Args&& ... args)
{
return std::make_shared<T>(std::forward<Args>(args)...);
}
}
#include "Hazel/Core/Log.h"
#include "Hazel/Core/Assert.h"
================================================
FILE: Hazel/src/Hazel/Core/Buffer.h
================================================
#pragma once
#include <stdint.h>
#include <cstring>
namespace Hazel {
// Non-owning raw buffer class
struct Buffer
{
uint8_t* Data = nullptr;
uint64_t Size = 0;
Buffer() = default;
Buffer(uint64_t size)
{
Allocate(size);
}
Buffer(const Buffer&) = default;
static Buffer Copy(Buffer other)
{
Buffer result(other.Size);
memcpy(result.Data, other.Data, other.Size);
return result;
}
void Allocate(uint64_t size)
{
Release();
Data = new uint8_t[size];
Size = size;
}
void Release()
{
delete[] Data;
Data = nullptr;
Size = 0;
}
template<typename T>
T* As()
{
return (T*)Data;
}
operator bool() const
{
return (bool)Data;
}
};
struct ScopedBuffer
{
ScopedBuffer(Buffer buffer)
: m_Buffer(buffer)
{
}
ScopedBuffer(uint64_t size)
: m_Buffer(size)
{
}
~ScopedBuffer()
{
m_Buffer.Release();
}
uint8_t* Data() { return m_Buffer.Data; }
uint64_t Size() { return m_Buffer.Size; }
template<typename T>
T* As()
{
return m_Buffer.As<T>();
}
operator bool() const { return m_Buffer; }
private:
Buffer m_Buffer;
};
}
================================================
FILE: Hazel/src/Hazel/Core/EntryPoint.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Core/Application.h"
#ifdef HZ_PLATFORM_WINDOWS
extern Hazel::Application* Hazel::CreateApplication(ApplicationCommandLineArgs args);
int main(int argc, char** argv)
{
Hazel::Log::Init();
HZ_PROFILE_BEGIN_SESSION("Startup", "HazelProfile-Startup.json");
auto app = Hazel::CreateApplication({ argc, argv });
HZ_PROFILE_END_SESSION();
HZ_PROFILE_BEGIN_SESSION("Runtime", "HazelProfile-Runtime.json");
app->Run();
HZ_PROFILE_END_SESSION();
HZ_PROFILE_BEGIN_SESSION("Shutdown", "HazelProfile-Shutdown.json");
delete app;
HZ_PROFILE_END_SESSION();
}
#endif
================================================
FILE: Hazel/src/Hazel/Core/FileSystem.cpp
================================================
#include "hzpch.h"
#include "FileSystem.h"
namespace Hazel {
Buffer FileSystem::ReadFileBinary(const std::filesystem::path& filepath)
{
std::ifstream stream(filepath, std::ios::binary | std::ios::ate);
if (!stream)
{
// Failed to open the file
return {};
}
std::streampos end = stream.tellg();
stream.seekg(0, std::ios::beg);
uint64_t size = end - stream.tellg();
if (size == 0)
{
// File is empty
return {};
}
Buffer buffer(size);
stream.read(buffer.As<char>(), size);
stream.close();
return buffer;
}
}
================================================
FILE: Hazel/src/Hazel/Core/FileSystem.h
================================================
#pragma once
#include "Hazel/Core/Buffer.h"
namespace Hazel {
class FileSystem
{
public:
// TODO: move to FileSystem class
static Buffer ReadFileBinary(const std::filesystem::path& filepath);
};
}
================================================
FILE: Hazel/src/Hazel/Core/Input.h
================================================
#pragma once
#include "Hazel/Core/KeyCodes.h"
#include "Hazel/Core/MouseCodes.h"
#include <glm/glm.hpp>
namespace Hazel {
class Input
{
public:
static bool IsKeyPressed(KeyCode key);
static bool IsMouseButtonPressed(MouseCode button);
static glm::vec2 GetMousePosition();
static float GetMouseX();
static float GetMouseY();
};
}
================================================
FILE: Hazel/src/Hazel/Core/KeyCodes.h
================================================
#pragma once
namespace Hazel
{
using KeyCode = uint16_t;
namespace Key
{
enum : KeyCode
{
// From glfw3.h
Space = 32,
Apostrophe = 39, /* ' */
Comma = 44, /* , */
Minus = 45, /* - */
Period = 46, /* . */
Slash = 47, /* / */
D0 = 48, /* 0 */
D1 = 49, /* 1 */
D2 = 50, /* 2 */
D3 = 51, /* 3 */
D4 = 52, /* 4 */
D5 = 53, /* 5 */
D6 = 54, /* 6 */
D7 = 55, /* 7 */
D8 = 56, /* 8 */
D9 = 57, /* 9 */
Semicolon = 59, /* ; */
Equal = 61, /* = */
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
LeftBracket = 91, /* [ */
Backslash = 92, /* \ */
RightBracket = 93, /* ] */
GraveAccent = 96, /* ` */
World1 = 161, /* non-US #1 */
World2 = 162, /* non-US #2 */
/* Function keys */
Escape = 256,
Enter = 257,
Tab = 258,
Backspace = 259,
Insert = 260,
Delete = 261,
Right = 262,
Left = 263,
Down = 264,
Up = 265,
PageUp = 266,
PageDown = 267,
Home = 268,
End = 269,
CapsLock = 280,
ScrollLock = 281,
NumLock = 282,
PrintScreen = 283,
Pause = 284,
F1 = 290,
F2 = 291,
F3 = 292,
F4 = 293,
F5 = 294,
F6 = 295,
F7 = 296,
F8 = 297,
F9 = 298,
F10 = 299,
F11 = 300,
F12 = 301,
F13 = 302,
F14 = 303,
F15 = 304,
F16 = 305,
F17 = 306,
F18 = 307,
F19 = 308,
F20 = 309,
F21 = 310,
F22 = 311,
F23 = 312,
F24 = 313,
F25 = 314,
/* Keypad */
KP0 = 320,
KP1 = 321,
KP2 = 322,
KP3 = 323,
KP4 = 324,
KP5 = 325,
KP6 = 326,
KP7 = 327,
KP8 = 328,
KP9 = 329,
KPDecimal = 330,
KPDivide = 331,
KPMultiply = 332,
KPSubtract = 333,
KPAdd = 334,
KPEnter = 335,
KPEqual = 336,
LeftShift = 340,
LeftControl = 341,
LeftAlt = 342,
LeftSuper = 343,
RightShift = 344,
RightControl = 345,
RightAlt = 346,
RightSuper = 347,
Menu = 348
};
}
}
================================================
FILE: Hazel/src/Hazel/Core/Layer.cpp
================================================
#include "hzpch.h"
#include "Hazel/Core/Layer.h"
namespace Hazel {
Layer::Layer(const std::string& debugName)
: m_DebugName(debugName)
{
}
}
================================================
FILE: Hazel/src/Hazel/Core/Layer.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Core/Timestep.h"
#include "Hazel/Events/Event.h"
namespace Hazel {
class Layer
{
public:
Layer(const std::string& name = "Layer");
virtual ~Layer() = default;
virtual void OnAttach() {}
virtual void OnDetach() {}
virtual void OnUpdate(Timestep ts) {}
virtual void OnImGuiRender() {}
virtual void OnEvent(Event& event) {}
const std::string& GetName() const { return m_DebugName; }
protected:
std::string m_DebugName;
};
}
================================================
FILE: Hazel/src/Hazel/Core/LayerStack.cpp
================================================
#include "hzpch.h"
#include "Hazel/Core/LayerStack.h"
namespace Hazel {
LayerStack::~LayerStack()
{
for (Layer* layer : m_Layers)
{
layer->OnDetach();
delete layer;
}
}
void LayerStack::PushLayer(Layer* layer)
{
m_Layers.emplace(m_Layers.begin() + m_LayerInsertIndex, layer);
m_LayerInsertIndex++;
}
void LayerStack::PushOverlay(Layer* overlay)
{
m_Layers.emplace_back(overlay);
}
void LayerStack::PopLayer(Layer* layer)
{
auto it = std::find(m_Layers.begin(), m_Layers.begin() + m_LayerInsertIndex, layer);
if (it != m_Layers.begin() + m_LayerInsertIndex)
{
layer->OnDetach();
m_Layers.erase(it);
m_LayerInsertIndex--;
}
}
void LayerStack::PopOverlay(Layer* overlay)
{
auto it = std::find(m_Layers.begin() + m_LayerInsertIndex, m_Layers.end(), overlay);
if (it != m_Layers.end())
{
overlay->OnDetach();
m_Layers.erase(it);
}
}
}
================================================
FILE: Hazel/src/Hazel/Core/LayerStack.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Core/Layer.h"
#include <vector>
namespace Hazel {
class LayerStack
{
public:
LayerStack() = default;
~LayerStack();
void PushLayer(Layer* layer);
void PushOverlay(Layer* overlay);
void PopLayer(Layer* layer);
void PopOverlay(Layer* overlay);
std::vector<Layer*>::iterator begin() { return m_Layers.begin(); }
std::vector<Layer*>::iterator end() { return m_Layers.end(); }
std::vector<Layer*>::reverse_iterator rbegin() { return m_Layers.rbegin(); }
std::vector<Layer*>::reverse_iterator rend() { return m_Layers.rend(); }
std::vector<Layer*>::const_iterator begin() const { return m_Layers.begin(); }
std::vector<Layer*>::const_iterator end() const { return m_Layers.end(); }
std::vector<Layer*>::const_reverse_iterator rbegin() const { return m_Layers.rbegin(); }
std::vector<Layer*>::const_reverse_iterator rend() const { return m_Layers.rend(); }
private:
std::vector<Layer*> m_Layers;
unsigned int m_LayerInsertIndex = 0;
};
}
================================================
FILE: Hazel/src/Hazel/Core/Log.cpp
================================================
#include "hzpch.h"
#include "Hazel/Core/Log.h"
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/basic_file_sink.h>
namespace Hazel {
Ref<spdlog::logger> Log::s_CoreLogger;
Ref<spdlog::logger> Log::s_ClientLogger;
void Log::Init()
{
std::vector<spdlog::sink_ptr> logSinks;
logSinks.emplace_back(std::make_shared<spdlog::sinks::stdout_color_sink_mt>());
logSinks.emplace_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>("Hazel.log", true));
logSinks[0]->set_pattern("%^[%T] %n: %v%$");
logSinks[1]->set_pattern("[%T] [%l] %n: %v");
s_CoreLogger = std::make_shared<spdlog::logger>("HAZEL", begin(logSinks), end(logSinks));
spdlog::register_logger(s_CoreLogger);
s_CoreLogger->set_level(spdlog::level::trace);
s_CoreLogger->flush_on(spdlog::level::trace);
s_ClientLogger = std::make_shared<spdlog::logger>("APP", begin(logSinks), end(logSinks));
spdlog::register_logger(s_ClientLogger);
s_ClientLogger->set_level(spdlog::level::trace);
s_ClientLogger->flush_on(spdlog::level::trace);
}
}
================================================
FILE: Hazel/src/Hazel/Core/Log.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#define GLM_ENABLE_EXPERIMENTAL
#include "glm/gtx/string_cast.hpp"
// This ignores all warnings raised inside External headers
#pragma warning(push, 0)
#include <spdlog/spdlog.h>
#include <spdlog/fmt/ostr.h>
#pragma warning(pop)
namespace Hazel {
class Log
{
public:
static void Init();
static Ref<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; }
static Ref<spdlog::logger>& GetClientLogger() { return s_ClientLogger; }
private:
static Ref<spdlog::logger> s_CoreLogger;
static Ref<spdlog::logger> s_ClientLogger;
};
}
template<typename OStream, glm::length_t L, typename T, glm::qualifier Q>
inline OStream& operator<<(OStream& os, const glm::vec<L, T, Q>& vector)
{
return os << glm::to_string(vector);
}
template<typename OStream, glm::length_t C, glm::length_t R, typename T, glm::qualifier Q>
inline OStream& operator<<(OStream& os, const glm::mat<C, R, T, Q>& matrix)
{
return os << glm::to_string(matrix);
}
template<typename OStream, typename T, glm::qualifier Q>
inline OStream& operator<<(OStream& os, glm::qua<T, Q> quaternion)
{
return os << glm::to_string(quaternion);
}
// Core log macros
#define HZ_CORE_TRACE(...) ::Hazel::Log::GetCoreLogger()->trace(__VA_ARGS__)
#define HZ_CORE_INFO(...) ::Hazel::Log::GetCoreLogger()->info(__VA_ARGS__)
#define HZ_CORE_WARN(...) ::Hazel::Log::GetCoreLogger()->warn(__VA_ARGS__)
#define HZ_CORE_ERROR(...) ::Hazel::Log::GetCoreLogger()->error(__VA_ARGS__)
#define HZ_CORE_CRITICAL(...) ::Hazel::Log::GetCoreLogger()->critical(__VA_ARGS__)
// Client log macros
#define HZ_TRACE(...) ::Hazel::Log::GetClientLogger()->trace(__VA_ARGS__)
#define HZ_INFO(...) ::Hazel::Log::GetClientLogger()->info(__VA_ARGS__)
#define HZ_WARN(...) ::Hazel::Log::GetClientLogger()->warn(__VA_ARGS__)
#define HZ_ERROR(...) ::Hazel::Log::GetClientLogger()->error(__VA_ARGS__)
#define HZ_CRITICAL(...) ::Hazel::Log::GetClientLogger()->critical(__VA_ARGS__)
================================================
FILE: Hazel/src/Hazel/Core/MouseCodes.h
================================================
#pragma once
namespace Hazel
{
using MouseCode = uint16_t;
namespace Mouse
{
enum : MouseCode
{
// From glfw3.h
Button0 = 0,
Button1 = 1,
Button2 = 2,
Button3 = 3,
Button4 = 4,
Button5 = 5,
Button6 = 6,
Button7 = 7,
ButtonLast = Button7,
ButtonLeft = Button0,
ButtonRight = Button1,
ButtonMiddle = Button2
};
}
}
================================================
FILE: Hazel/src/Hazel/Core/PlatformDetection.h
================================================
// Platform detection using predefined macros
#ifdef _WIN32
/* Windows x64/x86 */
#ifdef _WIN64
/* Windows x64 */
#define HZ_PLATFORM_WINDOWS
#else
/* Windows x86 */
#error "x86 Builds are not supported!"
#endif
#elif defined(__APPLE__) || defined(__MACH__)
#include <TargetConditionals.h>
/* TARGET_OS_MAC exists on all the platforms
* so we must check all of them (in this order)
* to ensure that we're running on MAC
* and not some other Apple platform */
#if TARGET_IPHONE_SIMULATOR == 1
#error "IOS simulator is not supported!"
#elif TARGET_OS_IPHONE == 1
#define HZ_PLATFORM_IOS
#error "IOS is not supported!"
#elif TARGET_OS_MAC == 1
#define HZ_PLATFORM_MACOS
#error "MacOS is not supported!"
#else
#error "Unknown Apple platform!"
#endif
/* We also have to check __ANDROID__ before __linux__
* since android is based on the linux kernel
* it has __linux__ defined */
#elif defined(__ANDROID__)
#define HZ_PLATFORM_ANDROID
#error "Android is not supported!"
#elif defined(__linux__)
#define HZ_PLATFORM_LINUX
#error "Linux is not supported!"
#else
/* Unknown compiler/platform */
#error "Unknown platform!"
#endif // End of platform detection
================================================
FILE: Hazel/src/Hazel/Core/Timer.h
================================================
#pragma once
#include <chrono>
namespace Hazel {
class Timer
{
public:
Timer()
{
Reset();
}
void Timer::Reset()
{
m_Start = std::chrono::high_resolution_clock::now();
}
float Timer::Elapsed()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - m_Start).count() * 0.001f * 0.001f * 0.001f;
}
float Timer::ElapsedMillis()
{
return Elapsed() * 1000.0f;
}
private:
std::chrono::time_point<std::chrono::high_resolution_clock> m_Start;
};
}
================================================
FILE: Hazel/src/Hazel/Core/Timestep.h
================================================
#pragma once
namespace Hazel {
class Timestep
{
public:
Timestep(float time = 0.0f)
: m_Time(time)
{
}
operator float() const { return m_Time; }
float GetSeconds() const { return m_Time; }
float GetMilliseconds() const { return m_Time * 1000.0f; }
private:
float m_Time;
};
}
================================================
FILE: Hazel/src/Hazel/Core/UUID.cpp
================================================
#include "hzpch.h"
#include "UUID.h"
#include <random>
#include <unordered_map>
namespace Hazel {
static std::random_device s_RandomDevice;
static std::mt19937_64 s_Engine(s_RandomDevice());
static std::uniform_int_distribution<uint64_t> s_UniformDistribution;
UUID::UUID()
: m_UUID(s_UniformDistribution(s_Engine))
{
}
UUID::UUID(uint64_t uuid)
: m_UUID(uuid)
{
}
}
================================================
FILE: Hazel/src/Hazel/Core/UUID.h
================================================
#pragma once
namespace Hazel {
class UUID
{
public:
UUID();
UUID(uint64_t uuid);
UUID(const UUID&) = default;
operator uint64_t() const { return m_UUID; }
private:
uint64_t m_UUID;
};
}
namespace std {
template <typename T> struct hash;
template<>
struct hash<Hazel::UUID>
{
std::size_t operator()(const Hazel::UUID& uuid) const
{
return (uint64_t)uuid;
}
};
}
================================================
FILE: Hazel/src/Hazel/Core/Window.cpp
================================================
#include "hzpch.h"
#include "Hazel/Core/Window.h"
#ifdef HZ_PLATFORM_WINDOWS
#include "Platform/Windows/WindowsWindow.h"
#endif
namespace Hazel
{
Scope<Window> Window::Create(const WindowProps& props)
{
#ifdef HZ_PLATFORM_WINDOWS
return CreateScope<WindowsWindow>(props);
#else
HZ_CORE_ASSERT(false, "Unknown platform!");
return nullptr;
#endif
}
}
================================================
FILE: Hazel/src/Hazel/Core/Window.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include "Hazel/Events/Event.h"
#include <sstream>
namespace Hazel {
struct WindowProps
{
std::string Title;
uint32_t Width;
uint32_t Height;
WindowProps(const std::string& title = "Hazel Engine",
uint32_t width = 1600,
uint32_t height = 900)
: Title(title), Width(width), Height(height)
{
}
};
// Interface representing a desktop system based Window
class Window
{
public:
using EventCallbackFn = std::function<void(Event&)>;
virtual ~Window() = default;
virtual void OnUpdate() = 0;
virtual uint32_t GetWidth() const = 0;
virtual uint32_t GetHeight() const = 0;
// Window attributes
virtual void SetEventCallback(const EventCallbackFn& callback) = 0;
virtual void SetVSync(bool enabled) = 0;
virtual bool IsVSync() const = 0;
virtual void* GetNativeWindow() const = 0;
static Scope<Window> Create(const WindowProps& props = WindowProps());
};
}
================================================
FILE: Hazel/src/Hazel/Debug/Instrumentor.h
================================================
#pragma once
#include "Hazel/Core/Log.h"
#include <algorithm>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <string>
#include <thread>
#include <mutex>
#include <sstream>
namespace Hazel {
using FloatingPointMicroseconds = std::chrono::duration<double, std::micro>;
struct ProfileResult
{
std::string Name;
FloatingPointMicroseconds Start;
std::chrono::microseconds ElapsedTime;
std::thread::id ThreadID;
};
struct InstrumentationSession
{
std::string Name;
};
class Instrumentor
{
public:
Instrumentor(const Instrumentor&) = delete;
Instrumentor(Instrumentor&&) = delete;
void BeginSession(const std::string& name, const std::string& filepath = "results.json")
{
std::lock_guard lock(m_Mutex);
if (m_CurrentSession)
{
// If there is already a current session, then close it before beginning new one.
// Subsequent profiling output meant for the original session will end up in the
// newly opened session instead. That's better than having badly formatted
// profiling output.
if (Log::GetCoreLogger()) // Edge case: BeginSession() might be before Log::Init()
{
HZ_CORE_ERROR("Instrumentor::BeginSession('{0}') when session '{1}' already open.", name, m_CurrentSession->Name);
}
InternalEndSession();
}
m_OutputStream.open(filepath);
if (m_OutputStream.is_open())
{
m_CurrentSession = new InstrumentationSession({name});
WriteHeader();
}
else
{
if (Log::GetCoreLogger()) // Edge case: BeginSession() might be before Log::Init()
{
HZ_CORE_ERROR("Instrumentor could not open results file '{0}'.", filepath);
}
}
}
void EndSession()
{
std::lock_guard lock(m_Mutex);
InternalEndSession();
}
void WriteProfile(const ProfileResult& result)
{
std::stringstream json;
json << std::setprecision(3) << std::fixed;
json << ",{";
json << "\"cat\":\"function\",";
json << "\"dur\":" << (result.ElapsedTime.count()) << ',';
json << "\"name\":\"" << result.Name << "\",";
json << "\"ph\":\"X\",";
json << "\"pid\":0,";
json << "\"tid\":" << result.ThreadID << ",";
json << "\"ts\":" << result.Start.count();
json << "}";
std::lock_guard lock(m_Mutex);
if (m_CurrentSession)
{
m_OutputStream << json.str();
m_OutputStream.flush();
}
}
static Instrumentor& Get()
{
static Instrumentor instance;
return instance;
}
private:
Instrumentor()
: m_CurrentSession(nullptr)
{
}
~Instrumentor()
{
EndSession();
}
void WriteHeader()
{
m_OutputStream << "{\"otherData\": {},\"traceEvents\":[{}";
m_OutputStream.flush();
}
void WriteFooter()
{
m_OutputStream << "]}";
m_OutputStream.flush();
}
// Note: you must already own lock on m_Mutex before
// calling InternalEndSession()
void InternalEndSession()
{
if (m_CurrentSession)
{
WriteFooter();
m_OutputStream.close();
delete m_CurrentSession;
m_CurrentSession = nullptr;
}
}
private:
std::mutex m_Mutex;
InstrumentationSession* m_CurrentSession;
std::ofstream m_OutputStream;
};
class InstrumentationTimer
{
public:
InstrumentationTimer(const char* name)
: m_Name(name), m_Stopped(false)
{
m_StartTimepoint = std::chrono::steady_clock::now();
}
~InstrumentationTimer()
{
if (!m_Stopped)
Stop();
}
void Stop()
{
auto endTimepoint = std::chrono::steady_clock::now();
auto highResStart = FloatingPointMicroseconds{ m_StartTimepoint.time_since_epoch() };
auto elapsedTime = std::chrono::time_point_cast<std::chrono::microseconds>(endTimepoint).time_since_epoch() - std::chrono::time_point_cast<std::chrono::microseconds>(m_StartTimepoint).time_since_epoch();
Instrumentor::Get().WriteProfile({ m_Name, highResStart, elapsedTime, std::this_thread::get_id() });
m_Stopped = true;
}
private:
const char* m_Name;
std::chrono::time_point<std::chrono::steady_clock> m_StartTimepoint;
bool m_Stopped;
};
namespace InstrumentorUtils {
template <size_t N>
struct ChangeResult
{
char Data[N];
};
template <size_t N, size_t K>
constexpr auto CleanupOutputString(const char(&expr)[N], const char(&remove)[K])
{
ChangeResult<N> result = {};
size_t srcIndex = 0;
size_t dstIndex = 0;
while (srcIndex < N)
{
size_t matchIndex = 0;
while (matchIndex < K - 1 && srcIndex + matchIndex < N - 1 && expr[srcIndex + matchIndex] == remove[matchIndex])
matchIndex++;
if (matchIndex == K - 1)
srcIndex += matchIndex;
result.Data[dstIndex++] = expr[srcIndex] == '"' ? '\'' : expr[srcIndex];
srcIndex++;
}
return result;
}
}
}
#define HZ_PROFILE 0
#if HZ_PROFILE
// Resolve which function signature macro will be used. Note that this only
// is resolved when the (pre)compiler starts, so the syntax highlighting
// could mark the wrong one in your editor!
#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
#define HZ_FUNC_SIG __PRETTY_FUNCTION__
#elif defined(__DMC__) && (__DMC__ >= 0x810)
#define HZ_FUNC_SIG __PRETTY_FUNCTION__
#elif (defined(__FUNCSIG__) || (_MSC_VER))
#define HZ_FUNC_SIG __FUNCSIG__
#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
#define HZ_FUNC_SIG __FUNCTION__
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
#define HZ_FUNC_SIG __FUNC__
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
#define HZ_FUNC_SIG __func__
#elif defined(__cplusplus) && (__cplusplus >= 201103)
#define HZ_FUNC_SIG __func__
#else
#define HZ_FUNC_SIG "HZ_FUNC_SIG unknown!"
#endif
#define HZ_PROFILE_BEGIN_SESSION(name, filepath) ::Hazel::Instrumentor::Get().BeginSession(name, filepath)
#define HZ_PROFILE_END_SESSION() ::Hazel::Instrumentor::Get().EndSession()
#define HZ_PROFILE_SCOPE_LINE2(name, line) constexpr auto fixedName##line = ::Hazel::InstrumentorUtils::CleanupOutputString(name, "__cdecl ");\
::Hazel::InstrumentationTimer timer##line(fixedName##line.Data)
#define HZ_PROFILE_SCOPE_LINE(name, line) HZ_PROFILE_SCOPE_LINE2(name, line)
#define HZ_PROFILE_SCOPE(name) HZ_PROFILE_SCOPE_LINE(name, __LINE__)
#define HZ_PROFILE_FUNCTION() HZ_PROFILE_SCOPE(HZ_FUNC_SIG)
#else
#define HZ_PROFILE_BEGIN_SESSION(name, filepath)
#define HZ_PROFILE_END_SESSION()
#define HZ_PROFILE_SCOPE(name)
#define HZ_PROFILE_FUNCTION()
#endif
================================================
FILE: Hazel/src/Hazel/Events/ApplicationEvent.h
================================================
#pragma once
#include "Hazel/Events/Event.h"
namespace Hazel {
class WindowResizeEvent : public Event
{
public:
WindowResizeEvent(unsigned int width, unsigned int height)
: m_Width(width), m_Height(height) {}
unsigned int GetWidth() const { return m_Width; }
unsigned int GetHeight() const { return m_Height; }
std::string ToString() const override
{
std::stringstream ss;
ss << "WindowResizeEvent: " << m_Width << ", " << m_Height;
return ss.str();
}
EVENT_CLASS_TYPE(WindowResize)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
private:
unsigned int m_Width, m_Height;
};
class WindowCloseEvent : public Event
{
public:
WindowCloseEvent() = default;
EVENT_CLASS_TYPE(WindowClose)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppTickEvent : public Event
{
public:
AppTickEvent() = default;
EVENT_CLASS_TYPE(AppTick)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppUpdateEvent : public Event
{
public:
AppUpdateEvent() = default;
EVENT_CLASS_TYPE(AppUpdate)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppRenderEvent : public Event
{
public:
AppRenderEvent() = default;
EVENT_CLASS_TYPE(AppRender)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
}
================================================
FILE: Hazel/src/Hazel/Events/Event.h
================================================
#pragma once
#include "Hazel/Debug/Instrumentor.h"
#include "Hazel/Core/Base.h"
#include <functional>
namespace Hazel {
// Events in Hazel are currently blocking, meaning when an event occurs it
// immediately gets dispatched and must be dealt with right then an there.
// For the future, a better strategy might be to buffer events in an event
// bus and process them during the "event" part of the update stage.
enum class EventType
{
None = 0,
WindowClose, WindowResize, WindowFocus, WindowLostFocus, WindowMoved,
AppTick, AppUpdate, AppRender,
KeyPressed, KeyReleased, KeyTyped,
MouseButtonPressed, MouseButtonReleased, MouseMoved, MouseScrolled
};
enum EventCategory
{
None = 0,
EventCategoryApplication = BIT(0),
EventCategoryInput = BIT(1),
EventCategoryKeyboard = BIT(2),
EventCategoryMouse = BIT(3),
EventCategoryMouseButton = BIT(4)
};
#define EVENT_CLASS_TYPE(type) static EventType GetStaticType() { return EventType::type; }\
virtual EventType GetEventType() const override { return GetStaticType(); }\
virtual const char* GetName() const override { return #type; }
#define EVENT_CLASS_CATEGORY(category) virtual int GetCategoryFlags() const override { return category; }
class Event
{
public:
virtual ~Event() = default;
bool Handled = false;
virtual EventType GetEventType() const = 0;
virtual const char* GetName() const = 0;
virtual int GetCategoryFlags() const = 0;
virtual std::string ToString() const { return GetName(); }
bool IsInCategory(EventCategory category)
{
return GetCategoryFlags() & category;
}
};
class EventDispatcher
{
public:
EventDispatcher(Event& event)
: m_Event(event)
{
}
// F will be deduced by the compiler
template<typename T, typename F>
bool Dispatch(const F& func)
{
if (m_Event.GetEventType() == T::GetStaticType())
{
m_Event.Handled |= func(static_cast<T&>(m_Event));
return true;
}
return false;
}
private:
Event& m_Event;
};
inline std::ostream& operator<<(std::ostream& os, const Event& e)
{
return os << e.ToString();
}
}
================================================
FILE: Hazel/src/Hazel/Events/KeyEvent.h
================================================
#pragma once
#include "Hazel/Events/Event.h"
#include "Hazel/Core/KeyCodes.h"
namespace Hazel {
class KeyEvent : public Event
{
public:
KeyCode GetKeyCode() const { return m_KeyCode; }
EVENT_CLASS_CATEGORY(EventCategoryKeyboard | EventCategoryInput)
protected:
KeyEvent(const KeyCode keycode)
: m_KeyCode(keycode) {}
KeyCode m_KeyCode;
};
class KeyPressedEvent : public KeyEvent
{
public:
KeyPressedEvent(const KeyCode keycode, bool isRepeat = false)
: KeyEvent(keycode), m_IsRepeat(isRepeat) {}
bool IsRepeat() const { return m_IsRepeat; }
std::string ToString() const override
{
std::stringstream ss;
ss << "KeyPressedEvent: " << m_KeyCode << " (repeat = " << m_IsRepeat << ")";
return ss.str();
}
EVENT_CLASS_TYPE(KeyPressed)
private:
bool m_IsRepeat;
};
class KeyReleasedEvent : public KeyEvent
{
public:
KeyReleasedEvent(const KeyCode keycode)
: KeyEvent(keycode) {}
std::string ToString() const override
{
std::stringstream ss;
ss << "KeyReleasedEvent: " << m_KeyCode;
return ss.str();
}
EVENT_CLASS_TYPE(KeyReleased)
};
class KeyTypedEvent : public KeyEvent
{
public:
KeyTypedEvent(const KeyCode keycode)
: KeyEvent(keycode) {}
std::string ToString() const override
{
std::stringstream ss;
ss << "KeyTypedEvent: " << m_KeyCode;
return ss.str();
}
EVENT_CLASS_TYPE(KeyTyped)
};
}
================================================
FILE: Hazel/src/Hazel/Events/MouseEvent.h
================================================
#pragma once
#include "Hazel/Events/Event.h"
#include "Hazel/Core/MouseCodes.h"
namespace Hazel {
class MouseMovedEvent : public Event
{
public:
MouseMovedEvent(const float x, const float y)
: m_MouseX(x), m_MouseY(y) {}
float GetX() const { return m_MouseX; }
float GetY() const { return m_MouseY; }
std::string ToString() const override
{
std::stringstream ss;
ss << "MouseMovedEvent: " << m_MouseX << ", " << m_MouseY;
return ss.str();
}
EVENT_CLASS_TYPE(MouseMoved)
EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput)
private:
float m_MouseX, m_MouseY;
};
class MouseScrolledEvent : public Event
{
public:
MouseScrolledEvent(const float xOffset, const float yOffset)
: m_XOffset(xOffset), m_YOffset(yOffset) {}
float GetXOffset() const { return m_XOffset; }
float GetYOffset() const { return m_YOffset; }
std::string ToString() const override
{
std::stringstream ss;
ss << "MouseScrolledEvent: " << GetXOffset() << ", " << GetYOffset();
return ss.str();
}
EVENT_CLASS_TYPE(MouseScrolled)
EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput)
private:
float m_XOffset, m_YOffset;
};
class MouseButtonEvent : public Event
{
public:
MouseCode GetMouseButton() const { return m_Button; }
EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput | EventCategoryMouseButton)
protected:
MouseButtonEvent(const MouseCode button)
: m_Button(button) {}
MouseCode m_Button;
};
class MouseButtonPressedEvent : public MouseButtonEvent
{
public:
MouseButtonPressedEvent(const MouseCode button)
: MouseButtonEvent(button) {}
std::string ToString() const override
{
std::stringstream ss;
ss << "MouseButtonPressedEvent: " << m_Button;
return ss.str();
}
EVENT_CLASS_TYPE(MouseButtonPressed)
};
class MouseButtonReleasedEvent : public MouseButtonEvent
{
public:
MouseButtonReleasedEvent(const MouseCode button)
: MouseButtonEvent(button) {}
std::string ToString() const override
{
std::stringstream ss;
ss << "MouseButtonReleasedEvent: " << m_Button;
return ss.str();
}
EVENT_CLASS_TYPE(MouseButtonReleased)
};
}
================================================
FILE: Hazel/src/Hazel/ImGui/ImGuiBuild.cpp
================================================
#include "hzpch.h"
#include <misc/cpp/imgui_stdlib.cpp>
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
#include <examples/imgui_impl_opengl3.cpp>
#include <examples/imgui_impl_glfw.cpp>
================================================
FILE: Hazel/src/Hazel/ImGui/ImGuiLayer.cpp
================================================
#include "hzpch.h"
#include "Hazel/ImGui/ImGuiLayer.h"
#include <imgui.h>
#include <imgui_internal.h>
#include <examples/imgui_impl_glfw.h>
#include <examples/imgui_impl_opengl3.h>
#include "Hazel/Core/Application.h"
// TEMPORARY
#include <GLFW/glfw3.h>
#include <glad/glad.h>
#include "ImGuizmo.h"
namespace Hazel {
ImGuiLayer::ImGuiLayer()
: Layer("ImGuiLayer")
{
}
void ImGuiLayer::OnAttach()
{
HZ_PROFILE_FUNCTION();
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge;
float fontSize = 18.0f;// *2.0f;
io.Fonts->AddFontFromFileTTF("assets/fonts/opensans/OpenSans-Bold.ttf", fontSize);
io.FontDefault = io.Fonts->AddFontFromFileTTF("assets/fonts/opensans/OpenSans-Regular.ttf", fontSize);
// Setup Dear ImGui style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
ImGuiStyle& style = ImGui::GetStyle();
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
style.WindowRounding = 0.0f;
style.Colors[ImGuiCol_WindowBg].w = 1.0f;
}
SetDarkThemeColors();
Application& app = Application::Get();
GLFWwindow* window = static_cast<GLFWwindow*>(app.GetWindow().GetNativeWindow());
// Setup Platform/Renderer bindings
ImGui_ImplGlfw_InitForOpenGL(window, true);
ImGui_ImplOpenGL3_Init("#version 410");
}
void ImGuiLayer::OnDetach()
{
HZ_PROFILE_FUNCTION();
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
}
void ImGuiLayer::OnEvent(Event& e)
{
if (m_BlockEvents)
{
ImGuiIO& io = ImGui::GetIO();
e.Handled |= e.IsInCategory(EventCategoryMouse) & io.WantCaptureMouse;
e.Handled |= e.IsInCategory(EventCategoryKeyboard) & io.WantCaptureKeyboard;
}
}
void ImGuiLayer::Begin()
{
HZ_PROFILE_FUNCTION();
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
ImGuizmo::BeginFrame();
}
void ImGuiLayer::End()
{
HZ_PROFILE_FUNCTION();
ImGuiIO& io = ImGui::GetIO();
Application& app = Application::Get();
io.DisplaySize = ImVec2((float)app.GetWindow().GetWidth(), (float)app.GetWindow().GetHeight());
// Rendering
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
}
}
void ImGuiLayer::SetDarkThemeColors()
{
auto& colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_WindowBg] = ImVec4{ 0.1f, 0.105f, 0.11f, 1.0f };
// Headers
colors[ImGuiCol_Header] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f };
colors[ImGuiCol_HeaderHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f };
colors[ImGuiCol_HeaderActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
// Buttons
colors[ImGuiCol_Button] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f };
colors[ImGuiCol_ButtonHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f };
colors[ImGuiCol_ButtonActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
// Frame BG
colors[ImGuiCol_FrameBg] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f };
colors[ImGuiCol_FrameBgHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f };
colors[ImGuiCol_FrameBgActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
// Tabs
colors[ImGuiCol_Tab] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
colors[ImGuiCol_TabHovered] = ImVec4{ 0.38f, 0.3805f, 0.381f, 1.0f };
colors[ImGuiCol_TabActive] = ImVec4{ 0.28f, 0.2805f, 0.281f, 1.0f };
colors[ImGuiCol_TabUnfocused] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
colors[ImGuiCol_TabUnfocusedActive] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f };
// Title
colors[ImGuiCol_TitleBg] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
colors[ImGuiCol_TitleBgActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
colors[ImGuiCol_TitleBgCollapsed] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f };
}
uint32_t ImGuiLayer::GetActiveWidgetID() const
{
return GImGui->ActiveId;
}
}
================================================
FILE: Hazel/src/Hazel/ImGui/ImGuiLayer.h
================================================
#pragma once
#include "Hazel/Core/Layer.h"
#include "Hazel/Events/ApplicationEvent.h"
#include "Hazel/Events/KeyEvent.h"
#include "Hazel/Events/MouseEvent.h"
namespace Hazel {
class ImGuiLayer : public Layer
{
public:
ImGuiLayer();
~ImGuiLayer() = default;
virtual void OnAttach() override;
virtual void OnDetach() override;
virtual void OnEvent(Event& e) override;
void Begin();
void End();
void BlockEvents(bool block) { m_BlockEvents = block; }
void SetDarkThemeColors();
uint32_t GetActiveWidgetID() const;
private:
bool m_BlockEvents = true;
};
}
================================================
FILE: Hazel/src/Hazel/Math/Math.cpp
================================================
#include "hzpch.h"
#include "Math.h"
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/matrix_decompose.hpp>
namespace Hazel::Math {
bool DecomposeTransform(const glm::mat4& transform, glm::vec3& translation, glm::vec3& rotation, glm::vec3& scale)
{
// From glm::decompose in matrix_decompose.inl
using namespace glm;
using T = float;
mat4 LocalMatrix(transform);
// Normalize the matrix.
if (epsilonEqual(LocalMatrix[3][3], static_cast<float>(0), epsilon<T>()))
return false;
// First, isolate perspective. This is the messiest.
if (
epsilonNotEqual(LocalMatrix[0][3], static_cast<T>(0), epsilon<T>()) ||
epsilonNotEqual(LocalMatrix[1][3], static_cast<T>(0), epsilon<T>()) ||
epsilonNotEqual(LocalMatrix[2][3], static_cast<T>(0), epsilon<T>()))
{
// Clear the perspective partition
LocalMatrix[0][3] = LocalMatrix[1][3] = LocalMatrix[2][3] = static_cast<T>(0);
LocalMatrix[3][3] = static_cast<T>(1);
}
// Next take care of translation (easy).
translation = vec3(LocalMatrix[3]);
LocalMatrix[3] = vec4(0, 0, 0, LocalMatrix[3].w);
vec3 Row[3], Pdum3;
// Now get scale and shear.
for (length_t i = 0; i < 3; ++i)
for (length_t j = 0; j < 3; ++j)
Row[i][j] = LocalMatrix[i][j];
// Compute X scale factor and normalize first row.
scale.x = length(Row[0]);
Row[0] = detail::scale(Row[0], static_cast<T>(1));
scale.y = length(Row[1]);
Row[1] = detail::scale(Row[1], static_cast<T>(1));
scale.z = length(Row[2]);
Row[2] = detail::scale(Row[2], static_cast<T>(1));
// At this point, the matrix (in rows[]) is orthonormal.
// Check for a coordinate system flip. If the determinant
// is -1, then negate the matrix and the scaling factors.
#if 0
Pdum3 = cross(Row[1], Row[2]); // v3Cross(row[1], row[2], Pdum3);
if (dot(Row[0], Pdum3) < 0)
{
for (length_t i = 0; i < 3; i++)
{
scale[i] *= static_cast<T>(-1);
Row[i] *= static_cast<T>(-1);
}
}
#endif
rotation.y = asin(-Row[0][2]);
if (cos(rotation.y) != 0) {
rotation.x = atan2(Row[1][2], Row[2][2]);
rotation.z = atan2(Row[0][1], Row[0][0]);
}
else {
rotation.x = atan2(-Row[2][0], Row[1][1]);
rotation.z = 0;
}
return true;
}
}
================================================
FILE: Hazel/src/Hazel/Math/Math.h
================================================
#pragma once
#include <glm/glm.hpp>
namespace Hazel::Math {
bool DecomposeTransform(const glm::mat4& transform, glm::vec3& translation, glm::vec3& rotation, glm::vec3& scale);
}
================================================
FILE: Hazel/src/Hazel/Physics/Physics2D.h
================================================
#pragma once
#include "Hazel/Scene/Components.h"
#include "box2d/b2_body.h"
namespace Hazel {
namespace Utils {
inline b2BodyType Rigidbody2DTypeToBox2DBody(Rigidbody2DComponent::BodyType bodyType)
{
switch (bodyType)
{
case Rigidbody2DComponent::BodyType::Static: return b2_staticBody;
case Rigidbody2DComponent::BodyType::Dynamic: return b2_dynamicBody;
case Rigidbody2DComponent::BodyType::Kinematic: return b2_kinematicBody;
}
HZ_CORE_ASSERT(false, "Unknown body type");
return b2_staticBody;
}
inline Rigidbody2DComponent::BodyType Rigidbody2DTypeFromBox2DBody(b2BodyType bodyType)
{
switch (bodyType)
{
case b2_staticBody: return Rigidbody2DComponent::BodyType::Static;
case b2_dynamicBody: return Rigidbody2DComponent::BodyType::Dynamic;
case b2_kinematicBody: return Rigidbody2DComponent::BodyType::Kinematic;
}
HZ_CORE_ASSERT(false, "Unknown body type");
return Rigidbody2DComponent::BodyType::Static;
}
}
}
================================================
FILE: Hazel/src/Hazel/Project/Project.cpp
================================================
#include "hzpch.h"
#include "Project.h"
#include "ProjectSerializer.h"
namespace Hazel {
Ref<Project> Project::New()
{
s_ActiveProject = CreateRef<Project>();
return s_ActiveProject;
}
Ref<Project> Project::Load(const std::filesystem::path& path)
{
Ref<Project> project = CreateRef<Project>();
ProjectSerializer serializer(project);
if (serializer.Deserialize(path))
{
project->m_ProjectDirectory = path.parent_path();
s_ActiveProject = project;
return s_ActiveProject;
}
return nullptr;
}
bool Project::SaveActive(const std::filesystem::path& path)
{
ProjectSerializer serializer(s_ActiveProject);
if (serializer.Serialize(path))
{
s_ActiveProject->m_ProjectDirectory = path.parent_path();
return true;
}
return false;
}
}
================================================
FILE: Hazel/src/Hazel/Project/Project.h
================================================
#pragma once
#include <string>
#include <filesystem>
#include "Hazel/Core/Base.h"
namespace Hazel {
struct ProjectConfig
{
std::string Name = "Untitled";
std::filesystem::path StartScene;
std::filesystem::path AssetDirectory;
std::filesystem::path ScriptModulePath;
};
class Project
{
public:
static const std::filesystem::path& GetProjectDirectory()
{
HZ_CORE_ASSERT(s_ActiveProject);
return s_ActiveProject->m_ProjectDirectory;
}
static std::filesystem::path GetAssetDirectory()
{
HZ_CORE_ASSERT(s_ActiveProject);
return GetProjectDirectory() / s_ActiveProject->m_Config.AssetDirectory;
}
// TODO(Yan): move to asset manager when we have one
static std::filesystem::path GetAssetFileSystemPath(const std::filesystem::path& path)
{
HZ_CORE_ASSERT(s_ActiveProject);
return GetAssetDirectory() / path;
}
ProjectConfig& GetConfig() { return m_Config; }
static Ref<Project> GetActive() { return s_ActiveProject; }
static Ref<Project> New();
static Ref<Project> Load(const std::filesystem::path& path);
static bool SaveActive(const std::filesystem::path& path);
private:
ProjectConfig m_Config;
std::filesystem::path m_ProjectDirectory;
inline static Ref<Project> s_ActiveProject;
};
}
================================================
FILE: Hazel/src/Hazel/Project/ProjectSerializer.cpp
================================================
#include "hzpch.h"
#include "ProjectSerializer.h"
#include <fstream>
#include <yaml-cpp/yaml.h>
namespace Hazel {
ProjectSerializer::ProjectSerializer(Ref<Project> project)
: m_Project(project)
{
}
bool ProjectSerializer::Serialize(const std::filesystem::path& filepath)
{
const auto& config = m_Project->GetConfig();
YAML::Emitter out;
{
out << YAML::BeginMap; // Root
out << YAML::Key << "Project" << YAML::Value;
{
out << YAML::BeginMap;// Project
out << YAML::Key << "Name" << YAML::Value << config.Name;
out << YAML::Key << "StartScene" << YAML::Value << config.StartScene.string();
out << YAML::Key << "AssetDirectory" << YAML::Value << config.AssetDirectory.string();
out << YAML::Key << "ScriptModulePath" << YAML::Value << config.ScriptModulePath.string();
out << YAML::EndMap; // Project
}
out << YAML::EndMap; // Root
}
std::ofstream fout(filepath);
fout << out.c_str();
return true;
}
bool ProjectSerializer::Deserialize(const std::filesystem::path& filepath)
{
auto& config = m_Project->GetConfig();
YAML::Node data;
try
{
data = YAML::LoadFile(filepath.string());
}
catch (YAML::ParserException e)
{
HZ_CORE_ERROR("Failed to load project file '{0}'\n {1}", filepath, e.what());
return false;
}
auto projectNode = data["Project"];
if (!projectNode)
return false;
config.Name = projectNode["Name"].as<std::string>();
config.StartScene = projectNode["StartScene"].as<std::string>();
config.AssetDirectory = projectNode["AssetDirectory"].as<std::string>();
config.ScriptModulePath = projectNode["ScriptModulePath"].as<std::string>();
return true;
}
}
================================================
FILE: Hazel/src/Hazel/Project/ProjectSerializer.h
================================================
#pragma once
#include "Project.h"
namespace Hazel {
class ProjectSerializer
{
public:
ProjectSerializer(Ref<Project> project);
bool Serialize(const std::filesystem::path& filepath);
bool Deserialize(const std::filesystem::path& filepath);
private:
Ref<Project> m_Project;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Buffer.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Buffer.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLBuffer.h"
namespace Hazel {
Ref<VertexBuffer> VertexBuffer::Create(uint32_t size)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLVertexBuffer>(size);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
Ref<VertexBuffer> VertexBuffer::Create(float* vertices, uint32_t size)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLVertexBuffer>(vertices, size);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
Ref<IndexBuffer> IndexBuffer::Create(uint32_t* indices, uint32_t size)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLIndexBuffer>(indices, size);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Buffer.h
================================================
#pragma once
namespace Hazel {
enum class ShaderDataType
{
None = 0, Float, Float2, Float3, Float4, Mat3, Mat4, Int, Int2, Int3, Int4, Bool
};
static uint32_t ShaderDataTypeSize(ShaderDataType type)
{
switch (type)
{
case ShaderDataType::Float: return 4;
case ShaderDataType::Float2: return 4 * 2;
case ShaderDataType::Float3: return 4 * 3;
case ShaderDataType::Float4: return 4 * 4;
case ShaderDataType::Mat3: return 4 * 3 * 3;
case ShaderDataType::Mat4: return 4 * 4 * 4;
case ShaderDataType::Int: return 4;
case ShaderDataType::Int2: return 4 * 2;
case ShaderDataType::Int3: return 4 * 3;
case ShaderDataType::Int4: return 4 * 4;
case ShaderDataType::Bool: return 1;
}
HZ_CORE_ASSERT(false, "Unknown ShaderDataType!");
return 0;
}
struct BufferElement
{
std::string Name;
ShaderDataType Type;
uint32_t Size;
size_t Offset;
bool Normalized;
BufferElement() = default;
BufferElement(ShaderDataType type, const std::string& name, bool normalized = false)
: Name(name), Type(type), Size(ShaderDataTypeSize(type)), Offset(0), Normalized(normalized)
{
}
uint32_t GetComponentCount() const
{
switch (Type)
{
case ShaderDataType::Float: return 1;
case ShaderDataType::Float2: return 2;
case ShaderDataType::Float3: return 3;
case ShaderDataType::Float4: return 4;
case ShaderDataType::Mat3: return 3; // 3* float3
case ShaderDataType::Mat4: return 4; // 4* float4
case ShaderDataType::Int: return 1;
case ShaderDataType::Int2: return 2;
case ShaderDataType::Int3: return 3;
case ShaderDataType::Int4: return 4;
case ShaderDataType::Bool: return 1;
}
HZ_CORE_ASSERT(false, "Unknown ShaderDataType!");
return 0;
}
};
class BufferLayout
{
public:
BufferLayout() {}
BufferLayout(std::initializer_list<BufferElement> elements)
: m_Elements(elements)
{
CalculateOffsetsAndStride();
}
uint32_t GetStride() const { return m_Stride; }
const std::vector<BufferElement>& GetElements() const { return m_Elements; }
std::vector<BufferElement>::iterator begin() { return m_Elements.begin(); }
std::vector<BufferElement>::iterator end() { return m_Elements.end(); }
std::vector<BufferElement>::const_iterator begin() const { return m_Elements.begin(); }
std::vector<BufferElement>::const_iterator end() const { return m_Elements.end(); }
private:
void CalculateOffsetsAndStride()
{
size_t offset = 0;
m_Stride = 0;
for (auto& element : m_Elements)
{
element.Offset = offset;
offset += element.Size;
m_Stride += element.Size;
}
}
private:
std::vector<BufferElement> m_Elements;
uint32_t m_Stride = 0;
};
class VertexBuffer
{
public:
virtual ~VertexBuffer() = default;
virtual void Bind() const = 0;
virtual void Unbind() const = 0;
virtual void SetData(const void* data, uint32_t size) = 0;
virtual const BufferLayout& GetLayout() const = 0;
virtual void SetLayout(const BufferLayout& layout) = 0;
static Ref<VertexBuffer> Create(uint32_t size);
static Ref<VertexBuffer> Create(float* vertices, uint32_t size);
};
// Currently Hazel only supports 32-bit index buffers
class IndexBuffer
{
public:
virtual ~IndexBuffer() = default;
virtual void Bind() const = 0;
virtual void Unbind() const = 0;
virtual uint32_t GetCount() const = 0;
static Ref<IndexBuffer> Create(uint32_t* indices, uint32_t count);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Camera.h
================================================
#pragma once
#include <glm/glm.hpp>
namespace Hazel {
class Camera
{
public:
Camera() = default;
Camera(const glm::mat4& projection)
: m_Projection(projection) {}
virtual ~Camera() = default;
const glm::mat4& GetProjection() const { return m_Projection; }
protected:
glm::mat4 m_Projection = glm::mat4(1.0f);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/EditorCamera.cpp
================================================
#include "hzpch.h"
#include "EditorCamera.h"
#include "Hazel/Core/Input.h"
#include "Hazel/Core/KeyCodes.h"
#include "Hazel/Core/MouseCodes.h"
#include <glfw/glfw3.h>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/quaternion.hpp>
namespace Hazel {
EditorCamera::EditorCamera(float fov, float aspectRatio, float nearClip, float farClip)
: m_FOV(fov), m_AspectRatio(aspectRatio), m_NearClip(nearClip), m_FarClip(farClip), Camera(glm::perspective(glm::radians(fov), aspectRatio, nearClip, farClip))
{
UpdateView();
}
void EditorCamera::UpdateProjection()
{
m_AspectRatio = m_ViewportWidth / m_ViewportHeight;
m_Projection = glm::perspective(glm::radians(m_FOV), m_AspectRatio, m_NearClip, m_FarClip);
}
void EditorCamera::UpdateView()
{
// m_Yaw = m_Pitch = 0.0f; // Lock the camera's rotation
m_Position = CalculatePosition();
glm::quat orientation = GetOrientation();
m_ViewMatrix = glm::translate(glm::mat4(1.0f), m_Position) * glm::toMat4(orientation);
m_ViewMatrix = glm::inverse(m_ViewMatrix);
}
std::pair<float, float> EditorCamera::PanSpeed() const
{
float x = std::min(m_ViewportWidth / 1000.0f, 2.4f); // max = 2.4f
float xFactor = 0.0366f * (x * x) - 0.1778f * x + 0.3021f;
float y = std::min(m_ViewportHeight / 1000.0f, 2.4f); // max = 2.4f
float yFactor = 0.0366f * (y * y) - 0.1778f * y + 0.3021f;
return { xFactor, yFactor };
}
float EditorCamera::RotationSpeed() const
{
return 0.8f;
}
float EditorCamera::ZoomSpeed() const
{
float distance = m_Distance * 0.2f;
distance = std::max(distance, 0.0f);
float speed = distance * distance;
speed = std::min(speed, 100.0f); // max speed = 100
return speed;
}
void EditorCamera::OnUpdate(Timestep ts)
{
if (Input::IsKeyPressed(Key::LeftAlt))
{
const glm::vec2& mouse{ Input::GetMouseX(), Input::GetMouseY() };
glm::vec2 delta = (mouse - m_InitialMousePosition) * 0.003f;
m_InitialMousePosition = mouse;
if (Input::IsMouseButtonPressed(Mouse::ButtonMiddle))
MousePan(delta);
else if (Input::IsMouseButtonPressed(Mouse::ButtonLeft))
MouseRotate(delta);
else if (Input::IsMouseButtonPressed(Mouse::ButtonRight))
MouseZoom(delta.y);
}
UpdateView();
}
void EditorCamera::OnEvent(Event& e)
{
EventDispatcher dispatcher(e);
dispatcher.Dispatch<MouseScrolledEvent>(HZ_BIND_EVENT_FN(EditorCamera::OnMouseScroll));
}
bool EditorCamera::OnMouseScroll(MouseScrolledEvent& e)
{
float delta = e.GetYOffset() * 0.1f;
MouseZoom(delta);
UpdateView();
return false;
}
void EditorCamera::MousePan(const glm::vec2& delta)
{
auto [xSpeed, ySpeed] = PanSpeed();
m_FocalPoint += -GetRightDirection() * delta.x * xSpeed * m_Distance;
m_FocalPoint += GetUpDirection() * delta.y * ySpeed * m_Distance;
}
void EditorCamera::MouseRotate(const glm::vec2& delta)
{
float yawSign = GetUpDirection().y < 0 ? -1.0f : 1.0f;
m_Yaw += yawSign * delta.x * RotationSpeed();
m_Pitch += delta.y * RotationSpeed();
}
void EditorCamera::MouseZoom(float delta)
{
m_Distance -= delta * ZoomSpeed();
if (m_Distance < 1.0f)
{
m_FocalPoint += GetForwardDirection();
m_Distance = 1.0f;
}
}
glm::vec3 EditorCamera::GetUpDirection() const
{
return glm::rotate(GetOrientation(), glm::vec3(0.0f, 1.0f, 0.0f));
}
glm::vec3 EditorCamera::GetRightDirection() const
{
return glm::rotate(GetOrientation(), glm::vec3(1.0f, 0.0f, 0.0f));
}
glm::vec3 EditorCamera::GetForwardDirection() const
{
return glm::rotate(GetOrientation(), glm::vec3(0.0f, 0.0f, -1.0f));
}
glm::vec3 EditorCamera::CalculatePosition() const
{
return m_FocalPoint - GetForwardDirection() * m_Distance;
}
glm::quat EditorCamera::GetOrientation() const
{
return glm::quat(glm::vec3(-m_Pitch, -m_Yaw, 0.0f));
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/EditorCamera.h
================================================
#pragma once
#include "Camera.h"
#include "Hazel/Core/Timestep.h"
#include "Hazel/Events/Event.h"
#include "Hazel/Events/MouseEvent.h"
#include <glm/glm.hpp>
namespace Hazel {
class EditorCamera : public Camera
{
public:
EditorCamera() = default;
EditorCamera(float fov, float aspectRatio, float nearClip, float farClip);
void OnUpdate(Timestep ts);
void OnEvent(Event& e);
inline float GetDistance() const { return m_Distance; }
inline void SetDistance(float distance) { m_Distance = distance; }
inline void SetViewportSize(float width, float height) { m_ViewportWidth = width; m_ViewportHeight = height; UpdateProjection(); }
const glm::mat4& GetViewMatrix() const { return m_ViewMatrix; }
glm::mat4 GetViewProjection() const { return m_Projection * m_ViewMatrix; }
glm::vec3 GetUpDirection() const;
glm::vec3 GetRightDirection() const;
glm::vec3 GetForwardDirection() const;
const glm::vec3& GetPosition() const { return m_Position; }
glm::quat GetOrientation() const;
float GetPitch() const { return m_Pitch; }
float GetYaw() const { return m_Yaw; }
private:
void UpdateProjection();
void UpdateView();
bool OnMouseScroll(MouseScrolledEvent& e);
void MousePan(const glm::vec2& delta);
void MouseRotate(const glm::vec2& delta);
void MouseZoom(float delta);
glm::vec3 CalculatePosition() const;
std::pair<float, float> PanSpeed() const;
float RotationSpeed() const;
float ZoomSpeed() const;
private:
float m_FOV = 45.0f, m_AspectRatio = 1.778f, m_NearClip = 0.1f, m_FarClip = 1000.0f;
glm::mat4 m_ViewMatrix;
glm::vec3 m_Position = { 0.0f, 0.0f, 0.0f };
glm::vec3 m_FocalPoint = { 0.0f, 0.0f, 0.0f };
glm::vec2 m_InitialMousePosition = { 0.0f, 0.0f };
float m_Distance = 10.0f;
float m_Pitch = 0.0f, m_Yaw = 0.0f;
float m_ViewportWidth = 1280, m_ViewportHeight = 720;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Font.cpp
================================================
#include "hzpch.h"
#include "Font.h"
#undef INFINITE
#include "msdf-atlas-gen.h"
#include "FontGeometry.h"
#include "GlyphGeometry.h"
#include "MSDFData.h"
namespace Hazel {
template<typename T, typename S, int N, msdf_atlas::GeneratorFunction<S, N> GenFunc>
static Ref<Texture2D> CreateAndCacheAtlas(const std::string& fontName, float fontSize, const std::vector<msdf_atlas::GlyphGeometry>& glyphs,
const msdf_atlas::FontGeometry& fontGeometry, uint32_t width, uint32_t height)
{
msdf_atlas::GeneratorAttributes attributes;
attributes.config.overlapSupport = true;
attributes.scanlinePass = true;
msdf_atlas::ImmediateAtlasGenerator<S, N, GenFunc, msdf_atlas::BitmapAtlasStorage<T, N>> generator(width, height);
generator.setAttributes(attributes);
generator.setThreadCount(8);
generator.generate(glyphs.data(), (int)glyphs.size());
msdfgen::BitmapConstRef<T, N> bitmap = (msdfgen::BitmapConstRef<T, N>)generator.atlasStorage();
TextureSpecification spec;
spec.Width = bitmap.width;
spec.Height = bitmap.height;
spec.Format = ImageFormat::RGB8;
spec.GenerateMips = false;
Ref<Texture2D> texture = Texture2D::Create(spec);
texture->SetData((void*)bitmap.pixels, bitmap.width * bitmap.height * 3);
return texture;
}
Font::Font(const std::filesystem::path& filepath)
: m_Data(new MSDFData())
{
msdfgen::FreetypeHandle* ft = msdfgen::initializeFreetype();
HZ_CORE_ASSERT(ft);
std::string fileString = filepath.string();
// TODO(Yan): msdfgen::loadFontData loads from memory buffer which we'll need
msdfgen::FontHandle* font = msdfgen::loadFont(ft, fileString.c_str());
if (!font)
{
HZ_CORE_ERROR("Failed to load font: {}", fileString);
return;
}
struct CharsetRange
{
uint32_t Begin, End;
};
// From imgui_draw.cpp
static const CharsetRange charsetRanges[] =
{
{ 0x0020, 0x00FF }
};
msdf_atlas::Charset charset;
for (CharsetRange range : charsetRanges)
{
for (uint32_t c = range.Begin; c <= range.End; c++)
charset.add(c);
}
double fontScale = 1.0;
m_Data->FontGeometry = msdf_atlas::FontGeometry(&m_Data->Glyphs);
int glyphsLoaded = m_Data->FontGeometry.loadCharset(font, fontScale, charset);
HZ_CORE_INFO("Loaded {} glyphs from font (out of {})", glyphsLoaded, charset.size());
double emSize = 40.0;
msdf_atlas::TightAtlasPacker atlasPacker;
// atlasPacker.setDimensionsConstraint()
atlasPacker.setPixelRange(2.0);
atlasPacker.setMiterLimit(1.0);
atlasPacker.setPadding(0);
atlasPacker.setScale(emSize);
int remaining = atlasPacker.pack(m_Data->Glyphs.data(), (int)m_Data->Glyphs.size());
HZ_CORE_ASSERT(remaining == 0);
int width, height;
atlasPacker.getDimensions(width, height);
emSize = atlasPacker.getScale();
#define DEFAULT_ANGLE_THRESHOLD 3.0
#define LCG_MULTIPLIER 6364136223846793005ull
#define LCG_INCREMENT 1442695040888963407ull
#define THREAD_COUNT 8
// if MSDF || MTSDF
uint64_t coloringSeed = 0;
bool expensiveColoring = false;
if (expensiveColoring)
{
msdf_atlas::Workload([&glyphs = m_Data->Glyphs, &coloringSeed](int i, int threadNo) -> bool {
unsigned long long glyphSeed = (LCG_MULTIPLIER * (coloringSeed ^ i) + LCG_INCREMENT) * !!coloringSeed;
glyphs[i].edgeColoring(msdfgen::edgeColoringInkTrap, DEFAULT_ANGLE_THRESHOLD, glyphSeed);
return true;
}, m_Data->Glyphs.size()).finish(THREAD_COUNT);
}
else {
unsigned long long glyphSeed = coloringSeed;
for (msdf_atlas::GlyphGeometry& glyph : m_Data->Glyphs)
{
glyphSeed *= LCG_MULTIPLIER;
glyph.edgeColoring(msdfgen::edgeColoringInkTrap, DEFAULT_ANGLE_THRESHOLD, glyphSeed);
}
}
m_AtlasTexture = CreateAndCacheAtlas<uint8_t, float, 3, msdf_atlas::msdfGenerator>("Test", (float)emSize, m_Data->Glyphs, m_Data->FontGeometry, width, height);
#if 0
msdfgen::Shape shape;
if (msdfgen::loadGlyph(shape, font, 'C'))
{
shape.normalize();
// max. angle
msdfgen::edgeColoringSimple(shape, 3.0);
// image width, height
msdfgen::Bitmap<float, 3> msdf(32, 32);
// range, scale, translation
msdfgen::generateMSDF(msdf, shape, 4.0, 1.0, msdfgen::Vector2(4.0, 4.0));
msdfgen::savePng(msdf, "output.png");
}
#endif
msdfgen::destroyFont(font);
msdfgen::deinitializeFreetype(ft);
}
Font::~Font()
{
delete m_Data;
}
Ref<Font> Font::GetDefault()
{
static Ref<Font> DefaultFont;
if (!DefaultFont)
DefaultFont = CreateRef<Font>("assets/fonts/opensans/OpenSans-Regular.ttf");
return DefaultFont;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Font.h
================================================
#pragma once
#include <filesystem>
#include "Hazel/Core/Base.h"
#include "Hazel/Renderer/Texture.h"
namespace Hazel {
struct MSDFData;
class Font
{
public:
Font(const std::filesystem::path& font);
~Font();
const MSDFData* GetMSDFData() const { return m_Data; }
Ref<Texture2D> GetAtlasTexture() const { return m_AtlasTexture; }
static Ref<Font> GetDefault();
private:
MSDFData* m_Data;
Ref<Texture2D> m_AtlasTexture;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Framebuffer.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Framebuffer.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLFramebuffer.h"
namespace Hazel {
Ref<Framebuffer> Framebuffer::Create(const FramebufferSpecification& spec)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLFramebuffer>(spec);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Framebuffer.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
namespace Hazel {
enum class FramebufferTextureFormat
{
None = 0,
// Color
RGBA8,
RED_INTEGER,
// Depth/stencil
DEPTH24STENCIL8,
// Defaults
Depth = DEPTH24STENCIL8
};
struct FramebufferTextureSpecification
{
FramebufferTextureSpecification() = default;
FramebufferTextureSpecification(FramebufferTextureFormat format)
: TextureFormat(format) {}
FramebufferTextureFormat TextureFormat = FramebufferTextureFormat::None;
// TODO: filtering/wrap
};
struct FramebufferAttachmentSpecification
{
FramebufferAttachmentSpecification() = default;
FramebufferAttachmentSpecification(std::initializer_list<FramebufferTextureSpecification> attachments)
: Attachments(attachments) {}
std::vector<FramebufferTextureSpecification> Attachments;
};
struct FramebufferSpecification
{
uint32_t Width = 0, Height = 0;
FramebufferAttachmentSpecification Attachments;
uint32_t Samples = 1;
bool SwapChainTarget = false;
};
class Framebuffer
{
public:
virtual ~Framebuffer() = default;
virtual void Bind() = 0;
virtual void Unbind() = 0;
virtual void Resize(uint32_t width, uint32_t height) = 0;
virtual int ReadPixel(uint32_t attachmentIndex, int x, int y) = 0;
virtual void ClearAttachment(uint32_t attachmentIndex, int value) = 0;
virtual uint32_t GetColorAttachmentRendererID(uint32_t index = 0) const = 0;
virtual const FramebufferSpecification& GetSpecification() const = 0;
static Ref<Framebuffer> Create(const FramebufferSpecification& spec);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/GraphicsContext.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/GraphicsContext.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLContext.h"
namespace Hazel {
Scope<GraphicsContext> GraphicsContext::Create(void* window)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateScope<OpenGLContext>(static_cast<GLFWwindow*>(window));
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/GraphicsContext.h
================================================
#pragma once
namespace Hazel {
class GraphicsContext
{
public:
virtual ~GraphicsContext() = default;
virtual void Init() = 0;
virtual void SwapBuffers() = 0;
static Scope<GraphicsContext> Create(void* window);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/MSDFData.h
================================================
#pragma once
#include <vector>
#undef INFINITE
#include "msdf-atlas-gen.h"
namespace Hazel {
struct MSDFData
{
std::vector<msdf_atlas::GlyphGeometry> Glyphs;
msdf_atlas::FontGeometry FontGeometry;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/OrthographicCamera.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/OrthographicCamera.h"
#include <glm/gtc/matrix_transform.hpp>
namespace Hazel {
OrthographicCamera::OrthographicCamera(float left, float right, float bottom, float top)
: m_ProjectionMatrix(glm::ortho(left, right, bottom, top, -1.0f, 1.0f)), m_ViewMatrix(1.0f)
{
HZ_PROFILE_FUNCTION();
m_ViewProjectionMatrix = m_ProjectionMatrix * m_ViewMatrix;
}
void OrthographicCamera::SetProjection(float left, float right, float bottom, float top)
{
HZ_PROFILE_FUNCTION();
m_ProjectionMatrix = glm::ortho(left, right, bottom, top, -1.0f, 1.0f);
m_ViewProjectionMatrix = m_ProjectionMatrix * m_ViewMatrix;
}
void OrthographicCamera::RecalculateViewMatrix()
{
HZ_PROFILE_FUNCTION();
glm::mat4 transform = glm::translate(glm::mat4(1.0f), m_Position) *
glm::rotate(glm::mat4(1.0f), glm::radians(m_Rotation), glm::vec3(0, 0, 1));
m_ViewMatrix = glm::inverse(transform);
m_ViewProjectionMatrix = m_ProjectionMatrix * m_ViewMatrix;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/OrthographicCamera.h
================================================
#pragma once
#include <glm/glm.hpp>
namespace Hazel {
class OrthographicCamera
{
public:
OrthographicCamera(float left, float right, float bottom, float top);
void SetProjection(float left, float right, float bottom, float top);
const glm::vec3& GetPosition() const { return m_Position; }
void SetPosition(const glm::vec3& position) { m_Position = position; RecalculateViewMatrix(); }
float GetRotation() const { return m_Rotation; }
void SetRotation(float rotation) { m_Rotation = rotation; RecalculateViewMatrix(); }
const glm::mat4& GetProjectionMatrix() const { return m_ProjectionMatrix; }
const glm::mat4& GetViewMatrix() const { return m_ViewMatrix; }
const glm::mat4& GetViewProjectionMatrix() const { return m_ViewProjectionMatrix; }
private:
void RecalculateViewMatrix();
private:
glm::mat4 m_ProjectionMatrix;
glm::mat4 m_ViewMatrix;
glm::mat4 m_ViewProjectionMatrix;
glm::vec3 m_Position = { 0.0f, 0.0f, 0.0f };
float m_Rotation = 0.0f;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/OrthographicCameraController.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/OrthographicCameraController.h"
#include "Hazel/Core/Input.h"
#include "Hazel/Core/KeyCodes.h"
namespace Hazel {
OrthographicCameraController::OrthographicCameraController(float aspectRatio, bool rotation)
: m_AspectRatio(aspectRatio), m_Camera(-m_AspectRatio * m_ZoomLevel, m_AspectRatio * m_ZoomLevel, -m_ZoomLevel, m_ZoomLevel), m_Rotation(rotation)
{
}
void OrthographicCameraController::OnUpdate(Timestep ts)
{
HZ_PROFILE_FUNCTION();
if (Input::IsKeyPressed(Key::A))
{
m_CameraPosition.x -= cos(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
m_CameraPosition.y -= sin(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
}
else if (Input::IsKeyPressed(Key::D))
{
m_CameraPosition.x += cos(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
m_CameraPosition.y += sin(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
}
if (Input::IsKeyPressed(Key::W))
{
m_CameraPosition.x += -sin(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
m_CameraPosition.y += cos(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
}
else if (Input::IsKeyPressed(Key::S))
{
m_CameraPosition.x -= -sin(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
m_CameraPosition.y -= cos(glm::radians(m_CameraRotation)) * m_CameraTranslationSpeed * ts;
}
if (m_Rotation)
{
if (Input::IsKeyPressed(Key::Q))
m_CameraRotation += m_CameraRotationSpeed * ts;
if (Input::IsKeyPressed(Key::E))
m_CameraRotation -= m_CameraRotationSpeed * ts;
if (m_CameraRotation > 180.0f)
m_CameraRotation -= 360.0f;
else if (m_CameraRotation <= -180.0f)
m_CameraRotation += 360.0f;
m_Camera.SetRotation(m_CameraRotation);
}
m_Camera.SetPosition(m_CameraPosition);
m_CameraTranslationSpeed = m_ZoomLevel;
}
void OrthographicCameraController::OnEvent(Event& e)
{
HZ_PROFILE_FUNCTION();
EventDispatcher dispatcher(e);
dispatcher.Dispatch<MouseScrolledEvent>(HZ_BIND_EVENT_FN(OrthographicCameraController::OnMouseScrolled));
dispatcher.Dispatch<WindowResizeEvent>(HZ_BIND_EVENT_FN(OrthographicCameraController::OnWindowResized));
}
void OrthographicCameraController::OnResize(float width, float height)
{
m_AspectRatio = width / height;
m_Camera.SetProjection(-m_AspectRatio * m_ZoomLevel, m_AspectRatio * m_ZoomLevel, -m_ZoomLevel, m_ZoomLevel);
}
bool OrthographicCameraController::OnMouseScrolled(MouseScrolledEvent& e)
{
HZ_PROFILE_FUNCTION();
m_ZoomLevel -= e.GetYOffset() * 0.25f;
m_ZoomLevel = std::max(m_ZoomLevel, 0.25f);
m_Camera.SetProjection(-m_AspectRatio * m_ZoomLevel, m_AspectRatio * m_ZoomLevel, -m_ZoomLevel, m_ZoomLevel);
return false;
}
bool OrthographicCameraController::OnWindowResized(WindowResizeEvent& e)
{
HZ_PROFILE_FUNCTION();
OnResize((float)e.GetWidth(), (float)e.GetHeight());
return false;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/OrthographicCameraController.h
================================================
#pragma once
#include "Hazel/Renderer/OrthographicCamera.h"
#include "Hazel/Core/Timestep.h"
#include "Hazel/Events/ApplicationEvent.h"
#include "Hazel/Events/MouseEvent.h"
namespace Hazel {
class OrthographicCameraController
{
public:
OrthographicCameraController(float aspectRatio, bool rotation = false);
void OnUpdate(Timestep ts);
void OnEvent(Event& e);
void OnResize(float width, float height);
OrthographicCamera& GetCamera() { return m_Camera; }
const OrthographicCamera& GetCamera() const { return m_Camera; }
float GetZoomLevel() const { return m_ZoomLevel; }
void SetZoomLevel(float level) { m_ZoomLevel = level; }
private:
bool OnMouseScrolled(MouseScrolledEvent& e);
bool OnWindowResized(WindowResizeEvent& e);
private:
float m_AspectRatio;
float m_ZoomLevel = 1.0f;
OrthographicCamera m_Camera;
bool m_Rotation;
glm::vec3 m_CameraPosition = { 0.0f, 0.0f, 0.0f };
float m_CameraRotation = 0.0f; //In degrees, in the anti-clockwise direction
float m_CameraTranslationSpeed = 5.0f, m_CameraRotationSpeed = 180.0f;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/RenderCommand.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/RenderCommand.h"
namespace Hazel {
Scope<RendererAPI> RenderCommand::s_RendererAPI = RendererAPI::Create();
}
================================================
FILE: Hazel/src/Hazel/Renderer/RenderCommand.h
================================================
#pragma once
#include "Hazel/Renderer/RendererAPI.h"
namespace Hazel {
class RenderCommand
{
public:
static void Init()
{
s_RendererAPI->Init();
}
static void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
{
s_RendererAPI->SetViewport(x, y, width, height);
}
static void SetClearColor(const glm::vec4& color)
{
s_RendererAPI->SetClearColor(color);
}
static void Clear()
{
s_RendererAPI->Clear();
}
static void DrawIndexed(const Ref<VertexArray>& vertexArray, uint32_t indexCount = 0)
{
s_RendererAPI->DrawIndexed(vertexArray, indexCount);
}
static void DrawLines(const Ref<VertexArray>& vertexArray, uint32_t vertexCount)
{
s_RendererAPI->DrawLines(vertexArray, vertexCount);
}
static void SetLineWidth(float width)
{
s_RendererAPI->SetLineWidth(width);
}
private:
static Scope<RendererAPI> s_RendererAPI;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Renderer.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Renderer.h"
#include "Hazel/Renderer/Renderer2D.h"
namespace Hazel {
Scope<Renderer::SceneData> Renderer::s_SceneData = CreateScope<Renderer::SceneData>();
void Renderer::Init()
{
HZ_PROFILE_FUNCTION();
RenderCommand::Init();
Renderer2D::Init();
}
void Renderer::Shutdown()
{
Renderer2D::Shutdown();
}
void Renderer::OnWindowResize(uint32_t width, uint32_t height)
{
RenderCommand::SetViewport(0, 0, width, height);
}
void Renderer::BeginScene(OrthographicCamera& camera)
{
s_SceneData->ViewProjectionMatrix = camera.GetViewProjectionMatrix();
}
void Renderer::EndScene()
{
}
void Renderer::Submit(const Ref<Shader>& shader, const Ref<VertexArray>& vertexArray, const glm::mat4& transform)
{
shader->Bind();
shader->SetMat4("u_ViewProjection", s_SceneData->ViewProjectionMatrix);
shader->SetMat4("u_Transform", transform);
vertexArray->Bind();
RenderCommand::DrawIndexed(vertexArray);
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Renderer.h
================================================
#pragma once
#include "Hazel/Renderer/RenderCommand.h"
#include "Hazel/Renderer/OrthographicCamera.h"
#include "Hazel/Renderer/Shader.h"
namespace Hazel {
class Renderer
{
public:
static void Init();
static void Shutdown();
static void OnWindowResize(uint32_t width, uint32_t height);
static void BeginScene(OrthographicCamera& camera);
static void EndScene();
static void Submit(const Ref<Shader>& shader, const Ref<VertexArray>& vertexArray, const glm::mat4& transform = glm::mat4(1.0f));
static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); }
private:
struct SceneData
{
glm::mat4 ViewProjectionMatrix;
};
static Scope<SceneData> s_SceneData;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Renderer2D.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Renderer2D.h"
#include "Hazel/Renderer/VertexArray.h"
#include "Hazel/Renderer/Shader.h"
#include "Hazel/Renderer/UniformBuffer.h"
#include "Hazel/Renderer/RenderCommand.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "MSDFData.h"
namespace Hazel {
struct QuadVertex
{
glm::vec3 Position;
glm::vec4 Color;
glm::vec2 TexCoord;
float TexIndex;
float TilingFactor;
// Editor-only
int EntityID;
};
struct CircleVertex
{
glm::vec3 WorldPosition;
glm::vec3 LocalPosition;
glm::vec4 Color;
float Thickness;
float Fade;
// Editor-only
int EntityID;
};
struct LineVertex
{
glm::vec3 Position;
glm::vec4 Color;
// Editor-only
int EntityID;
};
struct TextVertex
{
glm::vec3 Position;
glm::vec4 Color;
glm::vec2 TexCoord;
// TODO: bg color for outline/bg
// Editor-only
int EntityID;
};
struct Renderer2DData
{
static const uint32_t MaxQuads = 20000;
static const uint32_t MaxVertices = MaxQuads * 4;
static const uint32_t MaxIndices = MaxQuads * 6;
static const uint32_t MaxTextureSlots = 32; // TODO: RenderCaps
Ref<VertexArray> QuadVertexArray;
Ref<VertexBuffer> QuadVertexBuffer;
Ref<Shader> QuadShader;
Ref<Texture2D> WhiteTexture;
Ref<VertexArray> CircleVertexArray;
Ref<VertexBuffer> CircleVertexBuffer;
Ref<Shader> CircleShader;
Ref<VertexArray> LineVertexArray;
Ref<VertexBuffer> LineVertexBuffer;
Ref<Shader> LineShader;
Ref<VertexArray> TextVertexArray;
Ref<VertexBuffer> TextVertexBuffer;
Ref<Shader> TextShader;
uint32_t QuadIndexCount = 0;
QuadVertex* QuadVertexBufferBase = nullptr;
QuadVertex* QuadVertexBufferPtr = nullptr;
uint32_t CircleIndexCount = 0;
CircleVertex* CircleVertexBufferBase = nullptr;
CircleVertex* CircleVertexBufferPtr = nullptr;
uint32_t LineVertexCount = 0;
LineVertex* LineVertexBufferBase = nullptr;
LineVertex* LineVertexBufferPtr = nullptr;
uint32_t TextIndexCount = 0;
TextVertex* TextVertexBufferBase = nullptr;
TextVertex* TextVertexBufferPtr = nullptr;
float LineWidth = 2.0f;
std::array<Ref<Texture2D>, MaxTextureSlots> TextureSlots;
uint32_t TextureSlotIndex = 1; // 0 = white texture
Ref<Texture2D> FontAtlasTexture;
glm::vec4 QuadVertexPositions[4];
Renderer2D::Statistics Stats;
struct CameraData
{
glm::mat4 ViewProjection;
};
CameraData CameraBuffer;
Ref<UniformBuffer> CameraUniformBuffer;
};
static Renderer2DData s_Data;
void Renderer2D::Init()
{
HZ_PROFILE_FUNCTION();
s_Data.QuadVertexArray = VertexArray::Create();
s_Data.QuadVertexBuffer = VertexBuffer::Create(s_Data.MaxVertices * sizeof(QuadVertex));
s_Data.QuadVertexBuffer->SetLayout({
{ ShaderDataType::Float3, "a_Position" },
{ ShaderDataType::Float4, "a_Color" },
{ ShaderDataType::Float2, "a_TexCoord" },
{ ShaderDataType::Float, "a_TexIndex" },
{ ShaderDataType::Float, "a_TilingFactor" },
{ ShaderDataType::Int, "a_EntityID" }
});
s_Data.QuadVertexArray->AddVertexBuffer(s_Data.QuadVertexBuffer);
s_Data.QuadVertexBufferBase = new QuadVertex[s_Data.MaxVertices];
uint32_t* quadIndices = new uint32_t[s_Data.MaxIndices];
uint32_t offset = 0;
for (uint32_t i = 0; i < s_Data.MaxIndices; i += 6)
{
quadIndices[i + 0] = offset + 0;
quadIndices[i + 1] = offset + 1;
quadIndices[i + 2] = offset + 2;
quadIndices[i + 3] = offset + 2;
quadIndices[i + 4] = offset + 3;
quadIndices[i + 5] = offset + 0;
offset += 4;
}
Ref<IndexBuffer> quadIB = IndexBuffer::Create(quadIndices, s_Data.MaxIndices);
s_Data.QuadVertexArray->SetIndexBuffer(quadIB);
delete[] quadIndices;
// Circles
s_Data.CircleVertexArray = VertexArray::Create();
s_Data.CircleVertexBuffer = VertexBuffer::Create(s_Data.MaxVertices * sizeof(CircleVertex));
s_Data.CircleVertexBuffer->SetLayout({
{ ShaderDataType::Float3, "a_WorldPosition" },
{ ShaderDataType::Float3, "a_LocalPosition" },
{ ShaderDataType::Float4, "a_Color" },
{ ShaderDataType::Float, "a_Thickness" },
{ ShaderDataType::Float, "a_Fade" },
{ ShaderDataType::Int, "a_EntityID" }
});
s_Data.CircleVertexArray->AddVertexBuffer(s_Data.CircleVertexBuffer);
s_Data.CircleVertexArray->SetIndexBuffer(quadIB); // Use quad IB
s_Data.CircleVertexBufferBase = new CircleVertex[s_Data.MaxVertices];
// Lines
s_Data.LineVertexArray = VertexArray::Create();
s_Data.LineVertexBuffer = VertexBuffer::Create(s_Data.MaxVertices * sizeof(LineVertex));
s_Data.LineVertexBuffer->SetLayout({
{ ShaderDataType::Float3, "a_Position" },
{ ShaderDataType::Float4, "a_Color" },
{ ShaderDataType::Int, "a_EntityID" }
});
s_Data.LineVertexArray->AddVertexBuffer(s_Data.LineVertexBuffer);
s_Data.LineVertexBufferBase = new LineVertex[s_Data.MaxVertices];
// Text
s_Data.TextVertexArray = VertexArray::Create();
s_Data.TextVertexBuffer = VertexBuffer::Create(s_Data.MaxVertices * sizeof(TextVertex));
s_Data.TextVertexBuffer->SetLayout({
{ ShaderDataType::Float3, "a_Position" },
{ ShaderDataType::Float4, "a_Color" },
{ ShaderDataType::Float2, "a_TexCoord" },
{ ShaderDataType::Int, "a_EntityID" }
});
s_Data.TextVertexArray->AddVertexBuffer(s_Data.TextVertexBuffer);
s_Data.TextVertexArray->SetIndexBuffer(quadIB);
s_Data.TextVertexBufferBase = new TextVertex[s_Data.MaxVertices];
s_Data.WhiteTexture = Texture2D::Create(TextureSpecification());
uint32_t whiteTextureData = 0xffffffff;
s_Data.WhiteTexture->SetData(&whiteTextureData, sizeof(uint32_t));
int32_t samplers[s_Data.MaxTextureSlots];
for (uint32_t i = 0; i < s_Data.MaxTextureSlots; i++)
samplers[i] = i;
s_Data.QuadShader = Shader::Create("assets/shaders/Renderer2D_Quad.glsl");
s_Data.CircleShader = Shader::Create("assets/shaders/Renderer2D_Circle.glsl");
s_Data.LineShader = Shader::Create("assets/shaders/Renderer2D_Line.glsl");
s_Data.TextShader = Shader::Create("assets/shaders/Renderer2D_Text.glsl");
// Set first texture slot to 0
s_Data.TextureSlots[0] = s_Data.WhiteTexture;
s_Data.QuadVertexPositions[0] = { -0.5f, -0.5f, 0.0f, 1.0f };
s_Data.QuadVertexPositions[1] = { 0.5f, -0.5f, 0.0f, 1.0f };
s_Data.QuadVertexPositions[2] = { 0.5f, 0.5f, 0.0f, 1.0f };
s_Data.QuadVertexPositions[3] = { -0.5f, 0.5f, 0.0f, 1.0f };
s_Data.CameraUniformBuffer = UniformBuffer::Create(sizeof(Renderer2DData::CameraData), 0);
}
void Renderer2D::Shutdown()
{
HZ_PROFILE_FUNCTION();
delete[] s_Data.QuadVertexBufferBase;
}
void Renderer2D::BeginScene(const OrthographicCamera& camera)
{
HZ_PROFILE_FUNCTION();
s_Data.CameraBuffer.ViewProjection = camera.GetViewProjectionMatrix();
s_Data.CameraUniformBuffer->SetData(&s_Data.CameraBuffer, sizeof(Renderer2DData::CameraData));
StartBatch();
}
void Renderer2D::BeginScene(const Camera& camera, const glm::mat4& transform)
{
HZ_PROFILE_FUNCTION();
s_Data.CameraBuffer.ViewProjection = camera.GetProjection() * glm::inverse(transform);
s_Data.CameraUniformBuffer->SetData(&s_Data.CameraBuffer, sizeof(Renderer2DData::CameraData));
StartBatch();
}
void Renderer2D::BeginScene(const EditorCamera& camera)
{
HZ_PROFILE_FUNCTION();
s_Data.CameraBuffer.ViewProjection = camera.GetViewProjection();
s_Data.CameraUniformBuffer->SetData(&s_Data.CameraBuffer, sizeof(Renderer2DData::CameraData));
StartBatch();
}
void Renderer2D::EndScene()
{
HZ_PROFILE_FUNCTION();
Flush();
}
void Renderer2D::StartBatch()
{
s_Data.QuadIndexCount = 0;
s_Data.QuadVertexBufferPtr = s_Data.QuadVertexBufferBase;
s_Data.CircleIndexCount = 0;
s_Data.CircleVertexBufferPtr = s_Data.CircleVertexBufferBase;
s_Data.LineVertexCount = 0;
s_Data.LineVertexBufferPtr = s_Data.LineVertexBufferBase;
s_Data.TextIndexCount = 0;
s_Data.TextVertexBufferPtr = s_Data.TextVertexBufferBase;
s_Data.TextureSlotIndex = 1;
}
void Renderer2D::Flush()
{
if (s_Data.QuadIndexCount)
{
uint32_t dataSize = (uint32_t)((uint8_t*)s_Data.QuadVertexBufferPtr - (uint8_t*)s_Data.QuadVertexBufferBase);
s_Data.QuadVertexBuffer->SetData(s_Data.QuadVertexBufferBase, dataSize);
// Bind textures
for (uint32_t i = 0; i < s_Data.TextureSlotIndex; i++)
s_Data.TextureSlots[i]->Bind(i);
s_Data.QuadShader->Bind();
RenderCommand::DrawIndexed(s_Data.QuadVertexArray, s_Data.QuadIndexCount);
s_Data.Stats.DrawCalls++;
}
if (s_Data.CircleIndexCount)
{
uint32_t dataSize = (uint32_t)((uint8_t*)s_Data.CircleVertexBufferPtr - (uint8_t*)s_Data.CircleVertexBufferBase);
s_Data.CircleVertexBuffer->SetData(s_Data.CircleVertexBufferBase, dataSize);
s_Data.CircleShader->Bind();
RenderCommand::DrawIndexed(s_Data.CircleVertexArray, s_Data.CircleIndexCount);
s_Data.Stats.DrawCalls++;
}
if (s_Data.LineVertexCount)
{
uint32_t dataSize = (uint32_t)((uint8_t*)s_Data.LineVertexBufferPtr - (uint8_t*)s_Data.LineVertexBufferBase);
s_Data.LineVertexBuffer->SetData(s_Data.LineVertexBufferBase, dataSize);
s_Data.LineShader->Bind();
RenderCommand::SetLineWidth(s_Data.LineWidth);
RenderCommand::DrawLines(s_Data.LineVertexArray, s_Data.LineVertexCount);
s_Data.Stats.DrawCalls++;
}
if (s_Data.TextIndexCount)
{
uint32_t dataSize = (uint32_t)((uint8_t*)s_Data.TextVertexBufferPtr - (uint8_t*)s_Data.TextVertexBufferBase);
s_Data.TextVertexBuffer->SetData(s_Data.TextVertexBufferBase, dataSize);
auto buf = s_Data.TextVertexBufferBase;
s_Data.FontAtlasTexture->Bind(0);
s_Data.TextShader->Bind();
RenderCommand::DrawIndexed(s_Data.TextVertexArray, s_Data.TextIndexCount);
s_Data.Stats.DrawCalls++;
}
}
void Renderer2D::NextBatch()
{
Flush();
StartBatch();
}
void Renderer2D::DrawQuad(const glm::vec2& position, const glm::vec2& size, const glm::vec4& color)
{
DrawQuad({ position.x, position.y, 0.0f }, size, color);
}
void Renderer2D::DrawQuad(const glm::vec3& position, const glm::vec2& size, const glm::vec4& color)
{
HZ_PROFILE_FUNCTION();
glm::mat4 transform = glm::translate(glm::mat4(1.0f), position)
* glm::scale(glm::mat4(1.0f), { size.x, size.y, 1.0f });
DrawQuad(transform, color);
}
void Renderer2D::DrawQuad(const glm::vec2& position, const glm::vec2& size, const Ref<Texture2D>& texture, float tilingFactor, const glm::vec4& tintColor)
{
DrawQuad({ position.x, position.y, 0.0f }, size, texture, tilingFactor, tintColor);
}
void Renderer2D::DrawQuad(const glm::vec3& position, const glm::vec2& size, const Ref<Texture2D>& texture, float tilingFactor, const glm::vec4& tintColor)
{
HZ_PROFILE_FUNCTION();
glm::mat4 transform = glm::translate(glm::mat4(1.0f), position)
* glm::scale(glm::mat4(1.0f), { size.x, size.y, 1.0f });
DrawQuad(transform, texture, tilingFactor, tintColor);
}
void Renderer2D::DrawQuad(const glm::mat4& transform, const glm::vec4& color, int entityID)
{
HZ_PROFILE_FUNCTION();
constexpr size_t quadVertexCount = 4;
const float textureIndex = 0.0f; // White Texture
constexpr glm::vec2 textureCoords[] = { { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f } };
const float tilingFactor = 1.0f;
if (s_Data.QuadIndexCount >= Renderer2DData::MaxIndices)
NextBatch();
for (size_t i = 0; i < quadVertexCount; i++)
{
s_Data.QuadVertexBufferPtr->Position = transform * s_Data.QuadVertexPositions[i];
s_Data.QuadVertexBufferPtr->Color = color;
s_Data.QuadVertexBufferPtr->TexCoord = textureCoords[i];
s_Data.QuadVertexBufferPtr->TexIndex = textureIndex;
s_Data.QuadVertexBufferPtr->TilingFactor = tilingFactor;
s_Data.QuadVertexBufferPtr->EntityID = entityID;
s_Data.QuadVertexBufferPtr++;
}
s_Data.QuadIndexCount += 6;
s_Data.Stats.QuadCount++;
}
void Renderer2D::DrawQuad(const glm::mat4& transform, const Ref<Texture2D>& texture, float tilingFactor, const glm::vec4& tintColor, int entityID)
{
HZ_PROFILE_FUNCTION();
constexpr size_t quadVertexCount = 4;
constexpr glm::vec2 textureCoords[] = { { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f } };
if (s_Data.QuadIndexCount >= Renderer2DData::MaxIndices)
NextBatch();
float textureIndex = 0.0f;
for (uint32_t i = 1; i < s_Data.TextureSlotIndex; i++)
{
if (*s_Data.TextureSlots[i] == *texture)
{
textureIndex = (float)i;
break;
}
}
if (textureIndex == 0.0f)
{
if (s_Data.TextureSlotIndex >= Renderer2DData::MaxTextureSlots)
NextBatch();
textureIndex = (float)s_Data.TextureSlotIndex;
s_Data.TextureSlots[s_Data.TextureSlotIndex] = texture;
s_Data.TextureSlotIndex++;
}
for (size_t i = 0; i < quadVertexCount; i++)
{
s_Data.QuadVertexBufferPtr->Position = transform * s_Data.QuadVertexPositions[i];
s_Data.QuadVertexBufferPtr->Color = tintColor;
s_Data.QuadVertexBufferPtr->TexCoord = textureCoords[i];
s_Data.QuadVertexBufferPtr->TexIndex = textureIndex;
s_Data.QuadVertexBufferPtr->TilingFactor = tilingFactor;
s_Data.QuadVertexBufferPtr->EntityID = entityID;
s_Data.QuadVertexBufferPtr++;
}
s_Data.QuadIndexCount += 6;
s_Data.Stats.QuadCount++;
}
void Renderer2D::DrawRotatedQuad(const glm::vec2& position, const glm::vec2& size, float rotation, const glm::vec4& color)
{
DrawRotatedQuad({ position.x, position.y, 0.0f }, size, rotation, color);
}
void Renderer2D::DrawRotatedQuad(const glm::vec3& position, const glm::vec2& size, float rotation, const glm::vec4& color)
{
HZ_PROFILE_FUNCTION();
glm::mat4 transform = glm::translate(glm::mat4(1.0f), position)
* glm::rotate(glm::mat4(1.0f), glm::radians(rotation), { 0.0f, 0.0f, 1.0f })
* glm::scale(glm::mat4(1.0f), { size.x, size.y, 1.0f });
DrawQuad(transform, color);
}
void Renderer2D::DrawRotatedQuad(const glm::vec2& position, const glm::vec2& size, float rotation, const Ref<Texture2D>& texture, float tilingFactor, const glm::vec4& tintColor)
{
DrawRotatedQuad({ position.x, position.y, 0.0f }, size, rotation, texture, tilingFactor, tintColor);
}
void Renderer2D::DrawRotatedQuad(const glm::vec3& position, const glm::vec2& size, float rotation, const Ref<Texture2D>& texture, float tilingFactor, const glm::vec4& tintColor)
{
HZ_PROFILE_FUNCTION();
glm::mat4 transform = glm::translate(glm::mat4(1.0f), position)
* glm::rotate(glm::mat4(1.0f), glm::radians(rotation), { 0.0f, 0.0f, 1.0f })
* glm::scale(glm::mat4(1.0f), { size.x, size.y, 1.0f });
DrawQuad(transform, texture, tilingFactor, tintColor);
}
void Renderer2D::DrawCircle(const glm::mat4& transform, const glm::vec4& color, float thickness /*= 1.0f*/, float fade /*= 0.005f*/, int entityID /*= -1*/)
{
HZ_PROFILE_FUNCTION();
// TODO: implement for circles
// if (s_Data.QuadIndexCount >= Renderer2DData::MaxIndices)
// NextBatch();
for (size_t i = 0; i < 4; i++)
{
s_Data.CircleVertexBufferPtr->WorldPosition = transform * s_Data.QuadVertexPositions[i];
s_Data.CircleVertexBufferPtr->LocalPosition = s_Data.QuadVertexPositions[i] * 2.0f;
s_Data.CircleVertexBufferPtr->Color = color;
s_Data.CircleVertexBufferPtr->Thickness = thickness;
s_Data.CircleVertexBufferPtr->Fade = fade;
s_Data.CircleVertexBufferPtr->EntityID = entityID;
s_Data.CircleVertexBufferPtr++;
}
s_Data.CircleIndexCount += 6;
s_Data.Stats.QuadCount++;
}
void Renderer2D::DrawLine(const glm::vec3& p0, glm::vec3& p1, const glm::vec4& color, int entityID)
{
s_Data.LineVertexBufferPtr->Position = p0;
s_Data.LineVertexBufferPtr->Color = color;
s_Data.LineVertexBufferPtr->EntityID = entityID;
s_Data.LineVertexBufferPtr++;
s_Data.LineVertexBufferPtr->Position = p1;
s_Data.LineVertexBufferPtr->Color = color;
s_Data.LineVertexBufferPtr->EntityID = entityID;
s_Data.LineVertexBufferPtr++;
s_Data.LineVertexCount += 2;
}
void Renderer2D::DrawRect(const glm::vec3& position, const glm::vec2& size, const glm::vec4& color, int entityID)
{
glm::vec3 p0 = glm::vec3(position.x - size.x * 0.5f, position.y - size.y * 0.5f, position.z);
glm::vec3 p1 = glm::vec3(position.x + size.x * 0.5f, position.y - size.y * 0.5f, position.z);
glm::vec3 p2 = glm::vec3(position.x + size.x * 0.5f, position.y + size.y * 0.5f, position.z);
glm::vec3 p3 = glm::vec3(position.x - size.x * 0.5f, position.y + size.y * 0.5f, position.z);
DrawLine(p0, p1, color, entityID);
DrawLine(p1, p2, color, entityID);
DrawLine(p2, p3, color, entityID);
DrawLine(p3, p0, color, entityID);
}
void Renderer2D::DrawRect(const glm::mat4& transform, const glm::vec4& color, int entityID)
{
glm::vec3 lineVertices[4];
for (size_t i = 0; i < 4; i++)
lineVertices[i] = transform * s_Data.QuadVertexPositions[i];
DrawLine(lineVertices[0], lineVertices[1], color, entityID);
DrawLine(lineVertices[1], lineVertices[2], color, entityID);
DrawLine(lineVertices[2], lineVertices[3], color, entityID);
DrawLine(lineVertices[3], lineVertices[0], color, entityID);
}
void Renderer2D::DrawSprite(const glm::mat4& transform, SpriteRendererComponent& src, int entityID)
{
if (src.Texture)
DrawQuad(transform, src.Texture, src.TilingFactor, src.Color, entityID);
else
DrawQuad(transform, src.Color, entityID);
}
void Renderer2D::DrawString(const std::string& string, Ref<Font> font, const glm::mat4& transform, const TextParams& textParams, int entityID)
{
const auto& fontGeometry = font->GetMSDFData()->FontGeometry;
const auto& metrics = fontGeometry.getMetrics();
Ref<Texture2D> fontAtlas = font->GetAtlasTexture();
s_Data.FontAtlasTexture = fontAtlas;
double x = 0.0;
double fsScale = 1.0 / (metrics.ascenderY - metrics.descenderY);
double y = 0.0;
const float spaceGlyphAdvance = fontGeometry.getGlyph(' ')->getAdvance();
for (size_t i = 0; i < string.size(); i++)
{
char character = string[i];
if (character == '\r')
continue;
if (character == '\n')
{
x = 0;
y -= fsScale * metrics.lineHeight + textParams.LineSpacing;
continue;
}
if (character == ' ')
{
float advance = spaceGlyphAdvance;
if (i < string.size() - 1)
{
char nextCharacter = string[i + 1];
double dAdvance;
fontGeometry.getAdvance(dAdvance, character, nextCharacter);
advance = (float)dAdvance;
}
x += fsScale * advance + textParams.Kerning;
continue;
}
if (character == '\t')
{
// NOTE(Yan): is this right?
x += 4.0f * (fsScale * spaceGlyphAdvance + textParams.Kerning);
continue;
}
auto glyph = fontGeometry.getGlyph(character);
if (!glyph)
glyph = fontGeometry.getGlyph('?');
if (!glyph)
return;
double al, ab, ar, at;
glyph->getQuadAtlasBounds(al, ab, ar, at);
glm::vec2 texCoordMin((float)al, (float)ab);
glm::vec2 texCoordMax((float)ar, (float)at);
double pl, pb, pr, pt;
glyph->getQuadPlaneBounds(pl, pb, pr, pt);
glm::vec2 quadMin((float)pl, (float)pb);
glm::vec2 quadMax((float)pr, (float)pt);
quadMin *= fsScale, quadMax *= fsScale;
quadMin += glm::vec2(x, y);
quadMax += glm::vec2(x, y);
float texelWidth = 1.0f / fontAtlas->GetWidth();
float texelHeight = 1.0f / fontAtlas->GetHeight();
texCoordMin *= glm::vec2(texelWidth, texelHeight);
texCoordMax *= glm::vec2(texelWidth, texelHeight);
// render here
s_Data.TextVertexBufferPtr->Position = transform * glm::vec4(quadMin, 0.0f, 1.0f);
s_Data.TextVertexBufferPtr->Color = textParams.Color;
s_Data.TextVertexBufferPtr->TexCoord = texCoordMin;
s_Data.TextVertexBufferPtr->EntityID = entityID;
s_Data.TextVertexBufferPtr++;
s_Data.TextVertexBufferPtr->Position = transform * glm::vec4(quadMin.x, quadMax.y, 0.0f, 1.0f);
s_Data.TextVertexBufferPtr->Color = textParams.Color;
s_Data.TextVertexBufferPtr->TexCoord = { texCoordMin.x, texCoordMax.y };
s_Data.TextVertexBufferPtr->EntityID = entityID;
s_Data.TextVertexBufferPtr++;
s_Data.TextVertexBufferPtr->Position = transform * glm::vec4(quadMax, 0.0f, 1.0f);
s_Data.TextVertexBufferPtr->Color = textParams.Color;
s_Data.TextVertexBufferPtr->TexCoord = texCoordMax;
s_Data.TextVertexBufferPtr->EntityID = entityID;
s_Data.TextVertexBufferPtr++;
s_Data.TextVertexBufferPtr->Position = transform * glm::vec4(quadMax.x, quadMin.y, 0.0f, 1.0f);
s_Data.TextVertexBufferPtr->Color = textParams.Color;
s_Data.TextVertexBufferPtr->TexCoord = { texCoordMax.x, texCoordMin.y };
s_Data.TextVertexBufferPtr->EntityID = entityID;
s_Data.TextVertexBufferPtr++;
s_Data.TextIndexCount += 6;
s_Data.Stats.QuadCount++;
if (i < string.size() - 1)
{
double advance = glyph->getAdvance();
char nextCharacter = string[i + 1];
fontGeometry.getAdvance(advance, character, nextCharacter);
x += fsScale * advance + textParams.Kerning;
}
}
}
void Renderer2D::DrawString(const std::string& string, const glm::mat4& transform, const TextComponent& component, int entityID)
{
DrawString(string, component.FontAsset, transform, { component.Color, component.Kerning, component.LineSpacing }, entityID);
}
float Renderer2D::GetLineWidth()
{
return s_Data.LineWidth;
}
void Renderer2D::SetLineWidth(float width)
{
s_Data.LineWidth = width;
}
void Renderer2D::ResetStats()
{
memset(&s_Data.Stats, 0, sizeof(Statistics));
}
Renderer2D::Statistics Renderer2D::GetStats()
{
return s_Data.Stats;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Renderer2D.h
================================================
#pragma once
#include "Hazel/Renderer/OrthographicCamera.h"
#include "Hazel/Renderer/Texture.h"
#include "Hazel/Renderer/Camera.h"
#include "Hazel/Renderer/EditorCamera.h"
#include "Hazel/Renderer/Font.h"
#include "Hazel/Scene/Components.h"
namespace Hazel {
class Renderer2D
{
public:
static void Init();
static void Shutdown();
static void BeginScene(const Camera& camera, const glm::mat4& transform);
static void BeginScene(const EditorCamera& camera);
static void BeginScene(const OrthographicCamera& camera); // TODO: Remove
static void EndScene();
static void Flush();
// Primitives
static void DrawQuad(const glm::vec2& position, const glm::vec2& size, const glm::vec4& color);
static void DrawQuad(const glm::vec3& position, const glm::vec2& size, const glm::vec4& color);
static void DrawQuad(const glm::vec2& position, const glm::vec2& size, const Ref<Texture2D>& texture, float tilingFactor = 1.0f, const glm::vec4& tintColor = glm::vec4(1.0f));
static void DrawQuad(const glm::vec3& position, const glm::vec2& size, const Ref<Texture2D>& texture, float tilingFactor = 1.0f, const glm::vec4& tintColor = glm::vec4(1.0f));
static void DrawQuad(const glm::mat4& transform, const glm::vec4& color, int entityID = -1);
static void DrawQuad(const glm::mat4& transform, const Ref<Texture2D>& texture, float tilingFactor = 1.0f, const glm::vec4& tintColor = glm::vec4(1.0f), int entityID = -1);
static void DrawRotatedQuad(const glm::vec2& position, const glm::vec2& size, float rotation, const glm::vec4& color);
static void DrawRotatedQuad(const glm::vec3& position, const glm::vec2& size, float rotation, const glm::vec4& color);
static void DrawRotatedQuad(const glm::vec2& position, const glm::vec2& size, float rotation, const Ref<Texture2D>& texture, float tilingFactor = 1.0f, const glm::vec4& tintColor = glm::vec4(1.0f));
static void DrawRotatedQuad(const glm::vec3& position, const glm::vec2& size, float rotation, const Ref<Texture2D>& texture, float tilingFactor = 1.0f, const glm::vec4& tintColor = glm::vec4(1.0f));
static void DrawCircle(const glm::mat4& transform, const glm::vec4& color, float thickness = 1.0f, float fade = 0.005f, int entityID = -1);
static void DrawLine(const glm::vec3& p0, glm::vec3& p1, const glm::vec4& color, int entityID = -1);
static void DrawRect(const glm::vec3& position, const glm::vec2& size, const glm::vec4& color, int entityID = -1);
static void DrawRect(const glm::mat4& transform, const glm::vec4& color, int entityID = -1);
static void DrawSprite(const glm::mat4& transform, SpriteRendererComponent& src, int entityID);
struct TextParams
{
glm::vec4 Color{ 1.0f };
float Kerning = 0.0f;
float LineSpacing = 0.0f;
};
static void DrawString(const std::string& string, Ref<Font> font, const glm::mat4& transform, const TextParams& textParams, int entityID = -1);
static void DrawString(const std::string& string, const glm::mat4& transform, const TextComponent& component, int entityID = -1);
static float GetLineWidth();
static void SetLineWidth(float width);
// Stats
struct Statistics
{
uint32_t DrawCalls = 0;
uint32_t QuadCount = 0;
uint32_t GetTotalVertexCount() const { return QuadCount * 4; }
uint32_t GetTotalIndexCount() const { return QuadCount * 6; }
};
static void ResetStats();
static Statistics GetStats();
private:
static void StartBatch();
static void NextBatch();
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/RendererAPI.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/RendererAPI.h"
#include "Platform/OpenGL/OpenGLRendererAPI.h"
namespace Hazel {
RendererAPI::API RendererAPI::s_API = RendererAPI::API::OpenGL;
Scope<RendererAPI> RendererAPI::Create()
{
switch (s_API)
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateScope<OpenGLRendererAPI>();
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/RendererAPI.h
================================================
#pragma once
#include "Hazel/Renderer/VertexArray.h"
#include <glm/glm.hpp>
namespace Hazel {
class RendererAPI
{
public:
enum class API
{
None = 0, OpenGL = 1
};
public:
virtual ~RendererAPI() = default;
virtual void Init() = 0;
virtual void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height) = 0;
virtual void SetClearColor(const glm::vec4& color) = 0;
virtual void Clear() = 0;
virtual void DrawIndexed(const Ref<VertexArray>& vertexArray, uint32_t indexCount = 0) = 0;
virtual void DrawLines(const Ref<VertexArray>& vertexArray, uint32_t vertexCount) = 0;
virtual void SetLineWidth(float width) = 0;
static API GetAPI() { return s_API; }
static Scope<RendererAPI> Create();
private:
static API s_API;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Shader.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Shader.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLShader.h"
namespace Hazel {
Ref<Shader> Shader::Create(const std::string& filepath)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLShader>(filepath);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
Ref<Shader> Shader::Create(const std::string& name, const std::string& vertexSrc, const std::string& fragmentSrc)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLShader>(name, vertexSrc, fragmentSrc);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
void ShaderLibrary::Add(const std::string& name, const Ref<Shader>& shader)
{
HZ_CORE_ASSERT(!Exists(name), "Shader already exists!");
m_Shaders[name] = shader;
}
void ShaderLibrary::Add(const Ref<Shader>& shader)
{
auto& name = shader->GetName();
Add(name, shader);
}
Ref<Shader> ShaderLibrary::Load(const std::string& filepath)
{
auto shader = Shader::Create(filepath);
Add(shader);
return shader;
}
Ref<Shader> ShaderLibrary::Load(const std::string& name, const std::string& filepath)
{
auto shader = Shader::Create(filepath);
Add(name, shader);
return shader;
}
Ref<Shader> ShaderLibrary::Get(const std::string& name)
{
HZ_CORE_ASSERT(Exists(name), "Shader not found!");
return m_Shaders[name];
}
bool ShaderLibrary::Exists(const std::string& name) const
{
return m_Shaders.find(name) != m_Shaders.end();
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Shader.h
================================================
#pragma once
#include <string>
#include <unordered_map>
#include <glm/glm.hpp>
namespace Hazel {
class Shader
{
public:
virtual ~Shader() = default;
virtual void Bind() const = 0;
virtual void Unbind() const = 0;
virtual void SetInt(const std::string& name, int value) = 0;
virtual void SetIntArray(const std::string& name, int* values, uint32_t count) = 0;
virtual void SetFloat(const std::string& name, float value) = 0;
virtual void SetFloat2(const std::string& name, const glm::vec2& value) = 0;
virtual void SetFloat3(const std::string& name, const glm::vec3& value) = 0;
virtual void SetFloat4(const std::string& name, const glm::vec4& value) = 0;
virtual void SetMat4(const std::string& name, const glm::mat4& value) = 0;
virtual const std::string& GetName() const = 0;
static Ref<Shader> Create(const std::string& filepath);
static Ref<Shader> Create(const std::string& name, const std::string& vertexSrc, const std::string& fragmentSrc);
};
class ShaderLibrary
{
public:
void Add(const std::string& name, const Ref<Shader>& shader);
void Add(const Ref<Shader>& shader);
Ref<Shader> Load(const std::string& filepath);
Ref<Shader> Load(const std::string& name, const std::string& filepath);
Ref<Shader> Get(const std::string& name);
bool Exists(const std::string& name) const;
private:
std::unordered_map<std::string, Ref<Shader>> m_Shaders;
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/Texture.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/Texture.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLTexture.h"
namespace Hazel {
Ref<Texture2D> Texture2D::Create(const TextureSpecification& specification)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLTexture2D>(specification);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
Ref<Texture2D> Texture2D::Create(const std::string& path)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLTexture2D>(path);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/Texture.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
#include <string>
namespace Hazel {
enum class ImageFormat
{
None = 0,
R8,
RGB8,
RGBA8,
RGBA32F
};
struct TextureSpecification
{
uint32_t Width = 1;
uint32_t Height = 1;
ImageFormat Format = ImageFormat::RGBA8;
bool GenerateMips = true;
};
class Texture
{
public:
virtual ~Texture() = default;
virtual const TextureSpecification& GetSpecification() const = 0;
virtual uint32_t GetWidth() const = 0;
virtual uint32_t GetHeight() const = 0;
virtual uint32_t GetRendererID() const = 0;
virtual const std::string& GetPath() const = 0;
virtual void SetData(void* data, uint32_t size) = 0;
virtual void Bind(uint32_t slot = 0) const = 0;
virtual bool IsLoaded() const = 0;
virtual bool operator==(const Texture& other) const = 0;
};
class Texture2D : public Texture
{
public:
static Ref<Texture2D> Create(const TextureSpecification& specification);
static Ref<Texture2D> Create(const std::string& path);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/UniformBuffer.cpp
================================================
#include "hzpch.h"
#include "UniformBuffer.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLUniformBuffer.h"
namespace Hazel {
Ref<UniformBuffer> UniformBuffer::Create(uint32_t size, uint32_t binding)
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLUniformBuffer>(size, binding);
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/UniformBuffer.h
================================================
#pragma once
#include "Hazel/Core/Base.h"
namespace Hazel {
class UniformBuffer
{
public:
virtual ~UniformBuffer() {}
virtual void SetData(const void* data, uint32_t size, uint32_t offset = 0) = 0;
static Ref<UniformBuffer> Create(uint32_t size, uint32_t binding);
};
}
================================================
FILE: Hazel/src/Hazel/Renderer/VertexArray.cpp
================================================
#include "hzpch.h"
#include "Hazel/Renderer/VertexArray.h"
#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLVertexArray.h"
namespace Hazel {
Ref<VertexArray> VertexArray::Create()
{
switch (Renderer::GetAPI())
{
case RendererAPI::API::None: HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
case RendererAPI::API::OpenGL: return CreateRef<OpenGLVertexArray>();
}
HZ_CORE_ASSERT(false, "Unknown RendererAPI!");
return nullptr;
}
}
================================================
FILE: Hazel/src/Hazel/Renderer/VertexArray.h
================================================
#pragma once
#include "Hazel/Renderer/Buffer.h"
#include <memory>
namespace Hazel {
class VertexArray
{
public:
virtual ~VertexArray() = default;
virtual void Bind() const = 0;
virtual void Unbind() const = 0;
virtual void AddVertexBuffer(const Ref<VertexBuffer>& vertexBuffer) = 0;
virtual void SetIndexBuffer(const Ref<IndexBuffer>& indexBuffer) = 0;
virtual const std::vector<Ref<VertexBuffer>>& GetVertexBuffers() const = 0;
virtual const Ref<IndexBuffer>& GetIndexBuffer() const = 0;
static Ref<VertexArray> Create();
};
}
================================================
FILE: Hazel/src/Hazel/Scene/Components.h
================================================
#pragma once
#include "SceneCamera.h"
#include "Hazel/Core/UUID.h"
#include "Hazel/Renderer/Texture.h"
#include "Hazel/Renderer/Font.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/quaternion.hpp>
namespace Hazel {
struct IDComponent
{
UUID ID;
IDComponent() = default;
IDComponent(const IDComponent&) = default;
};
struct TagComponent
{
std::string Tag;
TagComponent() = default;
TagComponent(const TagComponent&) = default;
TagComponent(const std::string& tag)
: Tag(tag) {}
};
struct TransformComponent
{
glm::vec3 Translation = { 0.0f, 0.0f, 0.0f };
glm::vec3 Rotation = { 0.0f, 0.0f, 0.0f };
glm::vec3 Scale = { 1.0f, 1.0f, 1.0f };
TransformComponent() = default;
TransformComponent(const TransformComponent&) = default;
TransformComponent(const glm::vec3& translation)
: Translation(translation) {}
glm::mat4 GetTransform() const
{
glm::mat4 rotation = glm::toMat4(glm::quat(Rotation));
return glm::translate(glm::mat4(1.0f), Translation)
* rotation
* glm::scale(glm::mat4(1.0f), Scale);
}
};
struct SpriteRendererComponent
{
glm::vec4 Color{ 1.0f, 1.0f, 1.0f, 1.0f };
Ref<Texture2D> Texture;
float TilingFactor = 1.0f;
SpriteRendererComponent() = default;
SpriteRendererComponent(const SpriteRendererComponent&) = default;
SpriteRendererComponent(const glm::vec4& color)
: Color(color) {}
};
struct CircleRendererComponent
{
glm::vec4 Color{ 1.0f, 1.0f, 1.0f, 1.0f };
float Thickness = 1.0f;
float Fade = 0.005f;
CircleRendererComponent() = default;
CircleRendererComponent(const CircleRendererComponent&) = default;
};
struct CameraComponent
{
SceneCamera Camera;
bool Primary = true; // TODO: think about moving to Scene
bool FixedAspectRatio = false;
CameraComponent() = default;
CameraComponent(const CameraComponent&) = default;
};
struct ScriptComponent
{
std::string ClassName;
ScriptComponent() = default;
ScriptComponent(const ScriptComponent&) = default;
};
// Forward declaration
class ScriptableEntity;
struct NativeScriptComponent
{
ScriptableEntity* Instance = nullptr;
ScriptableEntity*(*InstantiateScript)();
void (*DestroyScript)(NativeScriptComponent*);
template<typename T>
void Bind()
{
InstantiateScript = []() { return static_cast<ScriptableEntity*>(new T()); };
DestroyScript = [](NativeScriptComponent* nsc) { delete nsc->Instance; nsc->Instance = nullptr; };
}
};
// Physics
struct Rigidbody2DComponent
{
enum class BodyType { Static = 0, Dynamic, Kinematic };
BodyType Type = BodyType::Static;
bool FixedRotation = false;
// Storage for runtime
void* RuntimeBody = nullptr;
Rigidbody2DComponent() = default;
Rigidbody2DComponent(const Rigidbody2DComponent&) = default;
};
struct BoxCollider2DComponent
{
glm::vec2 Offset = { 0.0f, 0.0f };
glm::vec2 Size = { 0.5f, 0.5f };
// TODO(Yan): move into physics material in the future maybe
float Density = 1.0f;
float Friction = 0.5f;
float Restitution = 0.0f;
float RestitutionThreshold = 0.5f;
// Storage for runtime
void* RuntimeFixture = nullptr;
BoxCollider2DComponent() = default;
BoxCollider2DComponent(const BoxCollider2DComponent&) = default;
};
struct CircleCollider2DComponent
{
glm::vec2 Offset = { 0.0f, 0.0f };
float Radius = 0.5f;
// TODO(Yan): move into physics material in the future maybe
float Density = 1.0f;
float Friction = 0.5f;
float Restitution = 0.0f;
float RestitutionThreshold = 0.5f;
// Storage for runtime
void* RuntimeFixture = nullptr;
CircleCollider2DComponent() = default;
CircleCollider2DComponent(const CircleCollider2DComponent&) = default;
};
struct TextComponent
{
std::string TextString;
Ref<Font> FontAsset = Font::GetDefault();
glm::vec4 Color{ 1.0f };
float Kerning = 0.0f;
float LineSpacing = 0.0f;
};
template<typename... Component>
struct ComponentGroup
{
};
using AllComponents =
ComponentGroup<TransformComponent, SpriteRendererComponent,
CircleRendererComponent, CameraComponent, ScriptComponent,
NativeScriptComponent, Rigidbody2DComponent, BoxCollider2DComponent,
CircleCollider2DComponent, TextComponent>;
}
================================================
FILE: Hazel/src/Hazel/Scene/Entity.cpp
================================================
#include "hzpch.h"
#include "Entity.h"
namespace Hazel {
Entity::Entity(entt::entity handle, Scene* scene)
: m_EntityHandle(handle), m_Scene(scene)
{
}
}
================================================
FILE: Hazel/src/Hazel/Scene/Entity.h
================================================
#pragma once
#include "Hazel/Core/UUID.h"
#include "Scene.h"
#include "Components.h"
#include "entt.hpp"
namespace Hazel {
class Entity
{
public:
Entity() = default;
Entity(entt::entity handle, Scene* scene);
Entity(const Entity& other) = default;
template<typename T, typename... Args>
T& AddComponent(Args&&... args)
{
HZ_CORE_ASSERT(!HasComponent<T>(), "Entity already has component!");
T& component = m_Scene->m_Registry.emplace<T>(m_EntityHandle, std::forward<Args>(args)...);
m_Scene->OnComponentAdded<T>(*this, component);
return component;
}
template<typename T, typename... Args>
T& AddOrReplaceComponent(Args&&... args)
{
T& component = m_Scene->m_Registry.emplace_or_replace<T>(m_EntityHandle, std::forward<Args>(args)...);
m_Scene->OnComponentAdded<T>(*this, component);
return component;
}
template<typename T>
T& GetComponent()
{
HZ_CORE_ASSERT(HasComponent<T>(), "Entity does not have component!");
return m_Scene->m_Registry.get<T>(m_EntityHandle);
}
template<typename T>
bool HasComponent()
{
return m_Scene->m_Registry.has<T>(m_EntityHandle);
}
template<typename T>
void RemoveComponent()
{
HZ_CORE_ASSERT(HasComponent<T>(), "Entity does not have component!");
m_Scene->m_Registry.remove<T>(m_EntityHandle);
}
operator bool() const { return m_EntityHandle != entt::null; }
operator entt::entity() const { return m_EntityHandle; }
operator uint32_t() const { return (uint32_t)m_EntityHandle; }
UUID GetUUID() { return GetComponent<IDComponent>().ID; }
const std::string& GetName() { return GetComponent<TagComponent>().Tag; }
bool operator==(const Entity& other) const
{
return m_EntityHandle == other.m_EntityHandle && m_Scene == other.m_Scene;
}
bool operator!=(const Entity& other) const
{
return !(*this == other);
}
private:
entt::entity m_EntityHandle{ entt::null };
Scene* m_Scene = nullptr;
};
}
================================================
FILE: Hazel/src/Hazel/Scene/Scene.cpp
================================================
#include "hzpch.h"
#include "Scene.h"
#include "Entity.h"
#include "Components.h"
#include "ScriptableEntity.h"
#include "Hazel/Scripting/ScriptEngine.h"
#include "Hazel/Renderer/Renderer2D.h"
#include "Hazel/Physics/Physics2D.h"
#include <glm/glm.hpp>
#include "Entity.h"
// Box2D
#include "box2d/b2_world.h"
#include "box2d/b2_body.h"
#include "box2d/b2_fixture.h"
#include "box2d/b2_polygon_shape.h"
#include "box2d/b2_circle_shape.h"
namespace Hazel {
Scene::Scene()
{
}
Scene::~Scene()
{
delete m_PhysicsWorld;
}
template<typename... Component>
static void CopyComponent(entt::registry& dst, entt::registry& src, const std::unordered_map<UUID, entt::entity>& enttMap)
{
([&]()
{
auto view = src.view<Component>();
for (auto srcEntity : view)
{
entt::entity dstEntity = enttMap.at(src.get<IDComponent>(srcEntity).ID);
auto& srcComponent = src.get<Component>(srcEntity);
dst.emplace_or_replace<Component>(dstEntity, srcComponent);
}
}(), ...);
}
template<typename... Component>
static void CopyComponent(ComponentGroup<Component...>, entt::registry& dst, entt::registry& src, const std::unordered_map<UUID, entt::entity>& enttMap)
{
CopyComponent<Component...>(dst, src, enttMap);
}
template<typename... Component>
static void CopyComponentIfExists(Entity dst, Entity src)
{
([&]()
{
if (src.HasComponent<Component>())
dst.AddOrReplaceComponent<Component>(src.GetComponent<Component>());
}(), ...);
}
template<typename... Component>
static void CopyComponentIfExists(ComponentGroup<Component...>, Entity dst, Entity src)
{
CopyComponentIfExists<Component...>(dst, src);
}
Ref<Scene> Scene::Copy(Ref<Scene> other)
{
Ref<Scene> newScene = CreateRef<Scene>();
newScene->m_ViewportWidth = other->m_ViewportWidth;
newScene->m_ViewportHeight = other->m_ViewportHeight;
auto& srcSceneRegistry = other->m_Registry;
auto& dstSceneRegistry = newScene->m_Registry;
std::unordered_map<UUID, entt::entity> enttMap;
// Create entities in new scene
auto idView = srcSceneRegistry.view<IDComponent>();
for (auto e : idView)
{
UUID uuid = srcSceneRegistry.get<IDComponent>(e).ID;
const auto& name = srcSceneRegistry.get<TagComponent>(e).Tag;
Entity newEntity = newScene->CreateEntityWithUUID(uuid, name);
enttMap[uuid] = (entt::entity)newEntity;
}
// Copy components (except IDComponent and TagComponent)
CopyComponent(AllComponents{}, dstSceneRegistry, srcSceneRegistry, enttMap);
return newScene;
}
Entity Scene::CreateEntity(const std::string& name)
{
return CreateEntityWithUUID(UUID(), name);
}
Entity Scene::CreateEntityWithUUID(UUID uuid, const std::string& name)
{
Entity entity = { m_Registry.create(), this };
entity.AddComponent<IDComponent>(uuid);
entity.AddComponent<TransformComponent>();
auto& tag = entity.AddComponent<TagComponent>();
tag.Tag = name.empty() ? "Entity" : name;
m_EntityMap[uuid] = entity;
return entity;
}
void Scene::DestroyEntity(Entity entity)
{
m_EntityMap.erase(entity.GetUUID());
m_Registry.destroy(entity);
}
void Scene::OnRuntimeStart()
{
m_IsRunning = true;
OnPhysics2DStart();
// Scripting
{
ScriptEngine::OnRuntimeStart(this);
// Instantiate all script entities
auto view = m_Registry.view<ScriptComponent>();
for (auto e : view)
{
Entity entity = { e, this };
ScriptEngine::OnCreateEntity(entity);
}
}
}
void Scene::OnRuntimeStop()
{
m_IsRunning = false;
OnPhysics2DStop();
ScriptEngine::OnRuntimeStop();
}
void Scene::OnSimulationStart()
{
OnPhysics2DStart();
}
void Scene::OnSimulationStop()
{
OnPhysics2DStop();
}
void Scene::OnUpdateRuntime(Timestep ts)
{
if (!m_IsPaused || m_StepFrames-- > 0)
{
// Update scripts
{
// C# Entity OnUpdate
auto view = m_Registry.view<ScriptComponent>();
for (auto e : view)
{
Entity entity = { e, this };
ScriptEngine::OnUpdateEntity(entity, ts);
}
m_Registry.view<NativeScriptComponent>().each([=](auto entity, auto& nsc)
{
// TODO: Move to Scene::OnScenePlay
if (!nsc.Instance)
{
nsc.Instance = nsc.InstantiateScript();
nsc.Instance->m_Entity = Entity{ entity, this };
nsc.Instance->OnCreate();
}
nsc.Instance->OnUpdate(ts);
});
}
// Physics
{
const int32_t velocityIterations = 6;
const int32_t positionIterations = 2;
m_PhysicsWorld->Step(ts, velocityIterations, positionIterations);
// Retrieve transform from Box2D
auto view = m_Registry.view<Rigidbody2DComponent>();
for (auto e : view)
{
Entity entity = { e, this };
auto& transform = entity.GetComponent<TransformComponent>();
auto& rb2d = entity.GetComponent<Rigidbody2DComponent>();
b2Body* body = (b2Body*)rb2d.RuntimeBody;
const auto& position = body->GetPosition();
transform.Translation.x = position.x;
transform.Translation.y = position.y;
transform.Rotation.z = body->GetAngle();
}
}
}
// Render 2D
Camera* mainCamera = nullptr;
glm::mat4 cameraTransform;
{
auto view = m_Registry.view<TransformComponent, CameraComponent>();
for (auto entity : view)
{
auto [transform, camera] = view.get<TransformComponent, CameraComponent>(entity);
if (camera.Primary)
{
mainCamera = &camera.Camera;
cameraTransform = transform.GetTransform();
break;
}
}
}
if (mainCamera)
{
Renderer2D::BeginScene(*mainCamera, cameraTransform);
// Draw sprites
{
auto group = m_Registry.group<TransformComponent>(entt::get<SpriteRendererComponent>);
for (auto entity : group)
{
auto [transform, sprite] = group.get<TransformComponent, SpriteRendererComponent>(entity);
Renderer2D::DrawSprite(transform.GetTransform(), sprite, (int)entity);
}
}
// Draw circles
{
auto view = m_Registry.view<TransformComponent, CircleRendererComponent>();
for (auto entity : view)
{
auto [transform, circle] = view.get<TransformComponent, CircleRendererComponent>(entity);
Renderer2D::DrawCircle(transform.GetTransform(), circle.Color, circle.Thickness, circle.Fade, (int)entity);
}
}
// Draw text
{
auto view = m_Registry.view<TransformComponent, TextComponent>();
for (auto entity : view)
{
auto [transform, text] = view.get<TransformComponent, TextComponent>(entity);
Renderer2D::DrawString(text.TextString, transform.GetTransform(), text, (int)entity);
}
}
Renderer2D::EndScene();
}
}
void Scene::OnUpdateSimulation(Timestep ts, EditorCamera& camera)
{
if (!m_IsPaused || m_StepFrames-- > 0)
{
// Physics
{
const int32_t velocityIterations = 6;
const int32_t positionIterations = 2;
m_PhysicsWorld->Step(ts, velocityIterations, positionIterations);
// Retrieve transform from Box2D
auto view = m_Registry.view<Rigidbody2DComponent>();
for (auto e : view)
{
Entity entity = { e, this };
auto& transform = entity.GetComponent<TransformComponent>();
auto& rb2d = entity.GetComponent<Rigidbody2DComponent>();
b2Body* body = (b2Body*)rb2d.RuntimeBody;
const auto& position = body->GetPosition();
transform.Translation.x = position.x;
transform.Translation.y = position.y;
transform.Rotation.z = body->GetAngle();
}
}
}
// Render
RenderScene(camera);
}
void Scene::OnUpdateEditor(Timestep ts, EditorCamera& camera)
{
// Render
RenderScene(camera);
}
void Scene::OnViewportResize(uint32_t width, uint32_t height)
{
if (m_ViewportWidth == width && m_ViewportHeight == height)
return;
m_ViewportWidth = width;
m_ViewportHeight = height;
// Resize our non-FixedAspectRatio cameras
auto view = m_Registry.view<CameraComponent>();
for (auto entity : view)
{
auto& cameraComponent = view.get<CameraComponent>(entity);
if (!cameraComponent.FixedAspectRatio)
cameraComponent.Camera.SetViewportSize(width, height);
}
}
Entity Scene::GetPrimaryCameraEntity()
{
auto view = m_Registry.view<CameraComponent>();
for (auto entity : view)
{
const auto& camera = view.get<CameraComponent>(entity);
if (camera.Primary)
return Entity{entity, this};
}
return {};
}
void Scene::Step(int frames)
{
m_StepFrames = frames;
}
Entity Scene::DuplicateEntity(Entity entity)
{
// Copy name because we're going to modify component data structure
std::string name = entity.GetName();
Entity newEntity = CreateEntity(name);
CopyComponentIfExists(AllComponents{}, newEntity, entity);
return newEntity;
}
Entity Scene::FindEntityByName(std::string_view name)
{
auto view = m_Registry.view<TagComponent>();
for (auto entity : view)
{
const TagComponent& tc = view.get<TagComponent>(entity);
if (tc.Tag == name)
return Entity{ entity, this };
}
return {};
}
Entity Scene::GetEntityByUUID(UUID uuid)
{
// TODO(Yan): Maybe should be assert
if (m_EntityMap.find(uuid) != m_EntityMap.end())
return { m_EntityMap.at(uuid), this };
return {};
}
void Scene::OnPhysics2DStart()
{
m_PhysicsWorld = new b2World({ 0.0f, -9.8f });
auto view = m_Registry.view<Rigidbody2DComponent>();
for (auto e : view)
{
Entity entity = { e, this };
auto& transform = entity.GetComponent<TransformComponent>();
auto& rb2d = entity.GetComponent<Rigidbody2DComponent>();
b2BodyDef bodyDef;
bodyDef.type = Utils::Rigidbody2DTypeToBox2DBody(rb2d.Type);
bodyDef.position.Set(transform.Translation.x, transform.Translation.y);
bodyDef.angle = transform.Rotation.z;
b2Body* body = m_PhysicsWorld->CreateBody(&bodyDef);
body->SetFixedRotation(rb2d.FixedRotation);
rb2d.RuntimeBody = body;
if (entity.HasComponent<BoxCollider2DComponent>())
{
auto& bc2d = entity.GetComponent<BoxCollider2DComponent>();
b2PolygonShape boxShape;
boxShape.SetAsBox(bc2d.Size.x * transform.Scale.x, bc2d.Size.y * transform.Scale.y, b2Vec2(bc2d.Offset.x, bc2d.Offset.y), 0.0f);
b2FixtureDef fixtureDef;
fixtureDef.shape = &boxShape;
fixtureDef.density = bc2d.Density;
fixtureDef.friction = bc2d.Friction;
fixtureDef.restitution = bc2d.Restitution;
fixtureDef.restitutionThreshold = bc2d.RestitutionThreshold;
body->CreateFixture(&fixtureDef);
}
if (entity.HasComponent<CircleCollider2DComponent>())
{
auto& cc2d = entity.GetComponent<CircleCollider2DComponent>();
b2CircleShape circleShape;
circleShape.m_p.Set(cc2d.Offset.x, cc2d.Offset.y);
circleShape.m_radius = transform.Scale.x * cc2d.Radius;
b2FixtureDef fixtureDef;
fixtureDef.shape = &circleShape;
fixtureDef.density = cc2d.Density;
fixtureDef.friction = cc2d.Friction;
fixtureDef.restitution = cc2d.Restitution;
fixtureDef.restitutionThreshold = cc2d.RestitutionThreshold;
body->CreateFixture(&fixtureDef);
}
}
}
void Scene::OnPhysics2DStop()
{
delete m_PhysicsWorld;
m_PhysicsWorld = nullptr;
}
void Scene::RenderScene(EditorCamera& camera)
{
Renderer2D::BeginScene(camera);
// Draw sprites
{
auto group = m_Registry.group<TransformComponent>(entt::get<SpriteRendererComponent>);
for (auto entity : group)
{
auto [transform, sprite] = group.get<TransformComponent, SpriteRendererComponent>(entity);
Renderer2D::DrawSprite(transform.GetTransform(), sprite, (int)entity);
}
}
// Draw circles
{
auto view = m_Registry.view<TransformComponent, CircleRendererComponent>();
for (auto entity : view)
{
auto [transform, circle] = view.get<TransformComponent, CircleRendererComponent>(entity);
Renderer2D::DrawCircle(transform.GetTransform(), circle.Color, circle.Thickness, circle.Fade, (int)entity);
}
}
// Draw text
{
auto view = m_Registry.view<TransformComponent, TextComponent>();
for (auto entity : view)
{
auto [transform, text] = view.get<TransformComponent, TextComponent>(entity);
Renderer2D::DrawString(text.TextString, transform.GetTransform(), text, (int)entity);
}
}
Renderer2D::EndScene();
}
template<typename T>
void Scene::OnComponentAdded(Entity entity, T& component)
{
static_assert(sizeof(T) == 0);
}
template<>
void Scene::OnComponentAdded<IDComponent>(Entity entity, IDComponent& component)
{
}
template<>
void Scene::OnComponentAdded<TransformComponent>(Entity entity, TransformComponent& component)
{
}
template<>
void Scene::OnComponentAdded<CameraComponent>(Entity entity, CameraComponent& component)
{
if (m_ViewportWidth > 0 && m_ViewportHeight > 0)
component.Camera.SetViewportSize(m_ViewportWidth, m_ViewportHeight);
}
template<>
void Scene::OnComponentAdded<ScriptComponent>(Entity entity, ScriptComponent& component)
{
}
template<>
void Scene::OnComponentAdded<SpriteRendererComponent>(Entity entity, SpriteRendererComponent& component)
{
}
template<>
void Scene::OnComponentAdded<CircleRendererComponent>(Entity entity, CircleRendererComponent& component)
{
}
template<>
void Scene::OnComponentAdded<TagComponent>(Entity entity, TagComponent& component)
{
}
template<>
void Scene::OnComponentAdded<NativeScriptComponent>(Entity entity, NativeScriptComponent& component)
{
}
template<>
void Scene::OnComponentAdded<Rigidbody2DComponent>(Entity entity, Rigidbody2DComponent& component)
{
}
template<>
void Scene::OnComponentAdded<BoxCollider2DComponent>(Entity entity, BoxCollider2DComponent& component)
{
}
template<>
void Scene::OnComponentAdded<CircleCollider2DComponent>(Entity entity, CircleCollider2DComponent& component)
{
}
template<>
void Scene::OnComponentAdded<TextComponent>(Entity entity, TextComponent& component)
{
}
}
================================================
FILE: Hazel/src/Hazel/Scene/Scene.h
================================================
#pragma once
#include "Hazel/Core/Timestep.h"
#include "Hazel/Core/UUID.h"
#include "Hazel/Renderer/EditorCamera.h"
#include "entt.hpp"
class b2World;
namespace Hazel {
class Entity;
class Scene
{
public:
Scene();
~Scene();
static Ref<Scene> Copy(Ref<Scene> other);
Entity CreateEntity(const std::string& name = std::string());
Entity CreateEntityWithUUID(UUID uuid, const std::string& name = std::string());
void DestroyEntity(Entity entity);
void OnRuntimeStart();
void OnRuntimeStop();
void OnSimulationStart();
void OnSimulationStop();
void OnUpdateRuntime(Timestep ts);
void OnUpdateSimulation(Timestep ts, EditorCamera& camera);
void OnUpdateEditor(Timestep ts, EditorCamera& camera);
void OnViewportResize(uint32_t width, uint32_t height);
Entity DuplicateEntity(Entity entity);
Entity FindEntityByName(std::string_view name);
Entity GetEntityByUUID(UUID uuid);
Entity GetPrimaryCameraEntity();
bool IsRunning() const { return m_IsRunning; }
bool IsPaused() const { return m_IsPaused; }
void SetPaused(bool paused) { m_IsPaused = paused; }
void Step(int frames = 1);
template<typename... Components>
auto GetAllEntitiesWith()
{
return m_Registry.view<Components...>();
}
private:
template<typename T>
void OnComponentAdded(Entity entity, T& component);
void OnPhysics2DStart();
void OnPhysics2DStop();
void RenderScene(EditorCamera& camera);
private:
entt::registry m_Registry;
uint32_t m_ViewportWidth = 0, m_ViewportHeight = 0;
bool m_IsRunning = false;
bool m_IsPaused = false;
int m_StepFrames = 0;
b2World* m_PhysicsWorld = nullptr;
std::unordered_map<UUID, entt::entity> m_EntityMap;
friend class Entity;
friend class SceneSerializer;
friend class SceneHierarchyPanel;
};
}
================================================
FILE: Hazel/src/Hazel/Scene/SceneCamera.cpp
================================================
#include "hzpch.h"
#include "SceneCamera.h"
#include <glm/gtc/matrix_transform.hpp>
namespace Hazel {
SceneCamera::SceneCamera()
{
RecalculateProjection();
}
void SceneCamera::SetPerspective(float verticalFOV, float nearClip, float farClip)
{
m_ProjectionType = ProjectionType::Perspective;
m_PerspectiveFOV = verticalFOV;
m_PerspectiveNear = nearClip;
m_PerspectiveFar = farClip;
RecalculateProjection();
}
void SceneCamera::SetOrthographic(float size, float nearClip, float farClip)
{
m_ProjectionType = ProjectionType::Orthographic;
m_OrthographicSize = size;
m_OrthographicNear = nearClip;
m_OrthographicFar = farClip;
RecalculateProjection();
}
void SceneCamera::SetViewportSize(uint32_t width, uint32_t height)
{
HZ_CORE_ASSERT(width > 0 && height > 0);
m_AspectRatio = (float)width / (float)height;
RecalculateProjection();
}
void SceneCamera::RecalculateProjection()
{
if (m_ProjectionType == ProjectionType::Perspective)
{
m_Projection = glm::perspective(m_PerspectiveFOV, m_AspectRatio, m_PerspectiveNear, m_PerspectiveFar);
}
else
{
float orthoLeft = -m_OrthographicSize * m_AspectRatio * 0.5f;
float orthoRight = m_OrthographicSize * m_AspectRatio * 0.5f;
float orthoBottom = -m_OrthographicSize * 0.5f;
float orthoTop = m_OrthographicSize * 0.5f;
m_Projection = glm::ortho(orthoLeft, orthoRight,
orthoBottom, orthoTop, m_OrthographicNear, m_OrthographicFar);
}
}
}
================================================
FILE: Hazel/src/Hazel/Scene/SceneCamera.h
================================================
#pragma once
#include "Hazel/Renderer/Camera.h"
namespace Hazel {
class SceneCamera : public Camera
{
public:
enum class ProjectionType { Perspective = 0, Orthographic = 1 };
public:
SceneCamera();
virtual ~SceneCamera() = default;
void SetPerspective(float verticalFOV, float nearClip, float farClip);
void SetOrthographic(float size, float nearClip, float farClip);
void SetViewportSize(uint32_t width, uint32_t height);
float GetPerspectiveVerticalFOV() const { return m_PerspectiveFOV; }
void SetPerspectiveVerticalFOV(float verticalFov) { m_PerspectiveFOV = verticalFov; RecalculateProjection(); }
float GetPerspectiveNearClip() const { return m_PerspectiveNear; }
void SetPerspectiveNearClip(float nearClip) { m_PerspectiveNear = nearClip; RecalculateProjection(); }
float GetPerspectiveFarClip() const { return m_PerspectiveFar; }
void SetPerspectiveFarClip(float farClip) { m_PerspectiveFar = farClip; RecalculateProjection(); }
float GetOrthographicSize() const { return m_OrthographicSize; }
void SetOrthographicSize(float size) { m_OrthographicSize = size; RecalculateProjection(); }
float GetOrthographicNearClip() const { return m_OrthographicNear; }
void SetOrthographicNearClip(float nearClip) { m_OrthographicNear = nearClip; RecalculateProjection(); }
float GetOrthographicFarClip() const { return m_OrthographicFar; }
void SetOrthographicFarClip(float farClip) { m_OrthographicFar = farClip; RecalculateProjection(); }
ProjectionType GetProjectionType() const { return m_ProjectionType; }
void SetProjectionType(ProjectionType type) { m_ProjectionType = type; RecalculateProjection(); }
private:
void RecalculateProjection();
private:
ProjectionType m_ProjectionType = ProjectionType::Orthographic;
float m_PerspectiveFOV = glm::radians(45.0f);
float m_PerspectiveNear = 0.01f, m_PerspectiveFar = 1000.0f;
float m_OrthographicSize = 10.0f;
float m_OrthographicNear = -1.0f, m_OrthographicFar = 1.0f;
float m_AspectRatio = 0.0f;
};
}
================================================
FILE: Hazel/src/Hazel/Scene/SceneSerializer.cpp
================================================
#include "hzpch.h"
#include "SceneSerializer.h"
#include "Entity.h"
#include "Components.h"
#include "Hazel/Scripting/ScriptEngine.h"
#include "Hazel/Core/UUID.h"
#include "Hazel/Project/Project.h"
#include <fstream>
#include <yaml-cpp/yaml.h>
namespace YAML {
template<>
struct convert<glm::vec2>
{
static Node encode(const glm::vec2& rhs)
{
Node node;
node.push_back(rhs.x);
node.push_back(rhs.y);
node.SetStyle(EmitterStyle::Flow);
return node;
}
static bool decode(const Node& node, glm::vec2& rhs)
{
if (!node.IsSequence() || node.size() != 2)
return false;
rhs.x = node[0].as<float>();
rhs.y = node[1].as<float>();
return true;
}
};
template<>
struct convert<glm::vec3>
{
static Node encode(const glm::vec3& rhs)
{
Node node;
node.push_back(rhs.x);
node.push_back(rhs.y);
node.push_back(rhs.z);
node.SetStyle(EmitterStyle::Flow);
return node;
}
static bool decode(const Node& node, glm::vec3& rhs)
{
if (!node.IsSequence() || node.size() != 3)
return false;
rhs.x = node[0].as<float>();
rhs.y = node[1].as<float>();
rhs.z = node[2].as<float>();
return true;
}
};
template<>
struct convert<glm::vec4>
{
static Node encode(const glm::vec4& rhs)
{
Node node;
node.push_back(rhs.x);
node.push_back(rhs.y);
node.push_back(rhs.z);
node.push_back(rhs.w);
node.SetStyle(EmitterStyle::Flow);
return node;
}
static bool decode(const Node& node, glm::vec4& rhs)
{
if (!node.IsSequence() || node.size() != 4)
return false;
rhs.x = node[0].as<float>();
rhs.y = node[1].as<float>();
rhs.z = node[2].as<float>();
rhs.w = node[3].as<float>();
return true;
}
};
template<>
struct convert<Hazel::UUID>
{
static Node encode(const Hazel::UUID& uuid)
{
Node node;
node.push_back((uint64_t)uuid);
return node;
}
static bool decode(const Node& node, Hazel::UUID& uuid)
{
uuid = node.as<uint64_t>();
return true;
}
};
}
namespace Hazel {
#define WRITE_SCRIPT_FIELD(FieldType, Type) \
case ScriptFieldType::FieldType: \
out << scriptField.GetValue<Type>(); \
break
#define READ_SCRIPT_FIELD(FieldType, Type) \
case ScriptFieldType::FieldType: \
{ \
Type data = scriptField["Data"].as<Type>(); \
fieldInstance.SetValue(data); \
break; \
}
YAML::Emitter& operator<<(YAML::Emitter& out, const glm::vec2& v)
{
out << YAML::Flow;
out << YAML::BeginSeq << v.x << v.y << YAML::EndSeq;
return out;
}
YAML::Emitter& operator<<(YAML::Emitter& out, const glm::vec3& v)
{
out << YAML::Flow;
out << YAML::BeginSeq << v.x << v.y << v.z << YAML::EndSeq;
return out;
}
YAML::Emitter& operator<<(YAML::Emitter& out, const glm::vec4& v)
{
out << YAML::Flow;
out << YAML::BeginSeq << v.x << v.y << v.z << v.w << YAML::EndSeq;
return out;
}
static std::string RigidBody2DBodyTypeToString(Rigidbody2DComponent::BodyType bodyType)
{
switch (bodyType)
{
case Rigidbody2DComponent::BodyType::Static: return "Static";
case Rigidbody2DComponent::BodyType::Dynamic: return "Dynamic";
case Rigidbody2DComponent::BodyType::Kinematic: return "Kinematic";
}
HZ_CORE_ASSERT(false, "Unknown body type");
return {};
}
static Rigidbody2DComponent::BodyType RigidBody2DBodyTypeFromString(const std::string& bodyTypeString)
{
if (bodyTypeString == "Static") return Rigidbody2DComponent::BodyType::Static;
if (bodyTypeString == "Dynamic") return Rigidbody2DComponent::BodyType::Dynamic;
if (bodyTypeString == "Kinematic") return Rigidbody2DComponent::BodyType::Kinematic;
HZ_CORE_ASSERT(false, "Unknown body type");
return Rigidbody2DComponent::BodyType::Static;
}
SceneSerializer::SceneSerializer(const Ref<Scene>& scene)
: m_Scene(scene)
{
}
static void SerializeEntity(YAML::Emitter& out, Entity entity)
{
HZ_CORE_ASSERT(entity.HasComponent<IDComponent>());
out << YAML::BeginMap; // Entity
out << YAML::Key << "Entity" << YAML::Value << entity.GetUUID();
if (entity.HasComponent<TagComponent>())
{
out << YAML::Key << "TagComponent";
out << YAML::BeginMap; // TagComponent
auto& tag = entity.GetComponent<TagComponent>().Tag;
out << YAML::Key << "Tag" << YAML::Value << tag;
out << YAML::EndMap; // TagComponent
}
if (entity.HasComponent<TransformComponent>())
{
out << YAML::Key << "TransformComponent";
out << YAML::BeginMap; // TransformComponent
auto& tc = entity.GetComponent<TransformComponent>();
out << YAML::Key << "Translation" << YAML::Value << tc.Translation;
out << YAML::Key << "Rotation" << YAML::Value << tc.Rotation;
out << YAML::Key << "Scale" << YAML::Value << tc.Scale;
out << YAML::EndMap; // TransformComponent
}
if (entity.HasComponent<CameraComponent>())
{
out << YAML::Key << "CameraComponent";
out << YAML::BeginMap; // CameraComponent
auto& cameraComponent = entity.GetComponent<CameraComponent>();
auto& camera = cameraComponent.Camera;
out << YAML::Key << "Camera" << YAML::Value;
out << YAML::BeginMap; // Camera
out << YAML::Key << "ProjectionType" << YAML::Value << (int)camera.GetProjectionType();
out << YAML::Key << "PerspectiveFOV" << YAML::Value << camera.GetPerspectiveVerticalFOV();
out << YAML::Key << "PerspectiveNear" << YAML::Value << camera.GetPerspectiveNearClip();
out << YAML::Key << "PerspectiveFar" << YAML::Value << camera.GetPerspectiveFarClip();
out << YAML::Key << "OrthographicSize" << YAML::Value << camera.GetOrthographicSize();
out << YAML::Key << "OrthographicNear" << YAML::Value << camera.GetOrthographicNearClip();
out << YAML::Key << "OrthographicFar" << YAML::Value << camera.GetOrthographicFarClip();
out << YAML::EndMap; // Camera
out << YAML::Key << "Primary" << YAML::Value << cameraComponent.Primary;
out << YAML::Key << "FixedAspectRatio" << YAML::Value << cameraComponent.FixedAspectRatio;
out << YAML::EndMap; // CameraComponent
}
if (entity.HasComponent<ScriptComponent>())
{
auto& scriptComponent = entity.GetComponent<ScriptComponent>();
out << YAML::Key << "ScriptComponent";
out << YAML::BeginMap; // ScriptComponent
out << YAML::Key << "ClassName" << YAML::Value << scriptComponent.ClassName;
// Fields
Ref<ScriptClass> entityClass = ScriptEngine::GetEntityClass(scriptComponent.ClassName);
const auto& fields = entityClass->GetFields();
if (fields.size() > 0)
{
out << YAML::Key << "ScriptFields" << YAML::Value;
auto& entityFields = ScriptEngine::GetScriptFieldMap(entity);
out << YAML::BeginSeq;
for (const auto& [name, field] : fields)
{
if (entityFields.find(name) == entityFields.end())
continue;
out << YAML::BeginMap; // ScriptField
out << YAML::Key << "Name" << YAML::Value << name;
out << YAML::Key << "Type" << YAML::Value << Utils::ScriptFieldTypeToString(field.Type);
out << YAML::Key << "Data" << YAML::Value;
ScriptFieldInstance& scriptField = entityFields.at(name);
switch (field.Type)
{
WRITE_SCRIPT_FIELD(Float, float );
WRITE_SCRIPT_FIELD(Double, double );
WRITE_SCRIPT_FIELD(Bool, bool );
WRITE_SCRIPT_FIELD(Char, char );
WRITE_SCRIPT_FIELD(Byte, int8_t );
WRITE_SCRIPT_FIELD(Short, int16_t );
WRITE_SCRIPT_FIELD(Int, int32_t );
WRITE_SCRIPT_FIELD(Long, int64_t );
WRITE_SCRIPT_FIELD(UByte, uint8_t );
WRITE_SCRIPT_FIELD(UShort, uint16_t );
WRITE_SCRIPT_FIELD(UInt, uint32_t );
WRITE_SCRIPT_FIELD(ULong, uint64_t );
WRITE_SCRIPT_FIELD(Vector2, glm::vec2 );
WRITE_SCRIPT_FIELD(Vector3, glm::vec3 );
WRITE_SCRIPT_FIELD(Vector4, glm::vec4 );
WRITE_SCRIPT_FIELD(Entity, UUID );
}
out << YAML::EndMap; // ScriptFields
}
out << YAML::EndSeq;
}
out << YAML::EndMap; // ScriptComponent
}
if (entity.HasComponent<SpriteRendererComponent>())
{
out << YAML::Key << "SpriteRendererComponent";
out << YAML::BeginMap; // SpriteRendererComponent
auto& spriteRendererComponent = entity.GetComponent<SpriteRendererComponent>();
out << YAML::Key << "Color" << YAML::Value << spriteRendererComponent.Color;
if (spriteRendererComponent.Texture)
out << YAML::Key << "TexturePath" << YAML::Value << spriteRendererComponent.Texture->GetPath();
out << YAML::Key << "TilingFactor" << YAML::Value << spriteRendererComponent.TilingFactor;
out << YAML::EndMap; // SpriteRendererComponent
}
if (entity.HasComponent<CircleRendererComponent>())
{
out << YAML::Key << "CircleRendererComponent";
out << YAML::BeginMap; // CircleRendererComponent
auto& circleRendererComponent = entity.GetComponent<CircleRendererComponent>();
out << YAML::Key << "Color" << YAML::Value << circleRendererComponent.Color;
out << YAML::Key << "Thickness" << YAML::Value << circleRendererComponent.Thickness;
out << YAML::Key << "Fade" << YAML::Value << circleRendererComponent.Fade;
out << YAML::EndMap; // CircleRendererComponent
}
if (entity.HasComponent<Rigidbody2DComponent>())
{
out << YAML::Key << "Rigidbody2DComponent";
out << YAML::BeginMap; // Rigidbody2DComponent
auto& rb2dComponent = entity.GetComponent<Rigidbody2DComponent>();
out << YAML::Key << "BodyType" << YAML::Value << RigidBody2DBodyTypeToString(rb2dComponent.Type);
out << YAML::Key << "FixedRotation" << YAML::Value << rb2dComponent.FixedRotation;
out << YAML::EndMap; // Rigidbody2DComponent
}
if (entity.HasComponent<BoxCollider2DComponent>())
{
out << YAML::Key << "BoxCollider2DComponent";
out << YAML::BeginMap; // BoxCollider2DComponent
auto& bc2dComponent = entity.GetComponent<BoxCollider2DComponent>();
out << YAML::Key << "Offset" << YAML::Value << bc2dComponent.Offset;
out << YAML::Key << "Size" << YAML::Value << bc2dComponent.Size;
out << YAML::Key << "Density" << YAML::Value << bc2dComponent.Density;
out << YAML::Key << "Friction" << YAML::Value << bc2dComponent.Friction;
out << YAML::Key << "Restitution" << YAML::Value << bc2dComponent.Restitution;
out << YAML::Key << "RestitutionThreshold" << YAML::Value << bc2dComponent.RestitutionThreshold;
out << YAML::EndMap; // BoxCollider2DComponent
}
if (entity.HasComponent<CircleCollider2DComponent>())
{
out << YAML::Key << "CircleCollider2DComponent";
out << YAML::BeginMap; // CircleCollider2DComponent
auto& cc2dComponent = entity.GetComponent<CircleCollider2DComponent>();
out << YAML::Key << "Offset" << YAML::Value << cc2dComponent.Offset;
out << YAML::Key << "Radius" << YAML::Value << cc2dComponent.Radius;
out << YAML::Key << "Density" << YAML::Value << cc2dComponent.Density;
out << YAML::Key << "Friction" << YAML::Value << cc2dComponent.Friction;
out << YAML::Key << "Restitution" << YAML::Value << cc2dComponent.Restitution;
out << YAML::Key << "RestitutionThreshold" << YAML::Value << cc2dComponent.RestitutionThreshold;
out << YAML::EndMap; // CircleCollider2DComponent
}
if (entity.HasComponent<TextComponent>())
{
out << YAML::Key << "TextComponent";
out << YAML::BeginMap; // TextComponent
auto& textComponent = entity.GetComponent<TextComponent>();
out << YAML::Key << "TextString" << YAML::Value << textComponent.TextString;
// TODO: textComponent.FontAsset
out << YAML::Key << "Color" << YAML::Value << textComponent.Color;
out << YAML::Key << "Kerning" << YAML::Value << textComponent.Kerning;
out << YAML::Key << "LineSpacing" << YAML::Value << textComponent.LineSpacing;
out << YAML::EndMap; // TextComponent
}
out << YAML::EndMap; // Entity
}
void SceneSerializer::Serialize(const std::string& filepath)
{
YAML::Emitter out;
out << YAML::BeginMap;
out << YAML::Key << "Scene" << YAML::Value << "Untitled";
out << YAML::Key << "Entities" << YAML::Value << YAML::BeginSeq;
m_Scene->m_Registry.each([&](auto entityID)
{
Entity entity = { entityID, m_Scene.get() };
if (!entity)
return;
SerializeEntity(out, entity);
});
out << YAML::EndSeq;
out << YAML::EndMap;
std::ofstream fout(filepath);
fout << out.c_str();
}
void SceneSerializer::SerializeRuntime(const std::string& filepath)
{
// Not implemented
HZ_CORE_ASSERT(false);
}
bool SceneSerializer::Deserialize(const std::string& filepath)
{
YAML::Node data;
try
{
data = YAML::LoadFile(filepath);
}
catch (YAML::ParserException e)
{
HZ_CORE_ERROR("Failed to load .hazel file '{0}'\n {1}", filepath, e.what());
return false;
}
if (!data["Scene"])
return false;
std::string sceneName = data["Scene"].as<std::string>();
HZ_CORE_TRACE("Deserializing scene '{0}'", sceneName);
auto entities = data["Entities"];
if (entities)
{
for (auto entity : entities)
{
uint64_t uuid = entity["Entity"].as<uint64_t>();
std::string name;
auto tagComponent = entity["TagComponent"];
if (tagComponent)
name = tagComponent["Tag"].as<std::string>();
HZ_CORE_TRACE("Deserialized entity with ID = {0}, name = {1}", uuid, name);
Entity deserializedEntity = m_Scene->CreateEntityWithUUID(uuid, name);
auto transformComponent = entity["TransformComponent"];
if (transformComponent)
{
// Entities always have transforms
auto& tc = deserializedEntity.GetComponent<TransformComponent>();
tc.Translation = transformComponent["Translation"].as<glm::vec3>();
tc.Rotation = transformComponent["Rotation"].as<glm::vec3>();
tc.Scale = transformComponent["Scale"].as<glm::vec3>();
}
auto cameraComponent = entity["CameraComponent"];
if (cameraComponent)
{
auto& cc = deserializedEntity.AddComponent<CameraComponent>();
auto& cameraProps = cameraComponent["Camera"];
cc.Camera.SetProjectionType((SceneCamera::ProjectionType)cameraProps["ProjectionType"].as<int>());
cc.Camera.SetPerspectiveVerticalFOV(cameraProps["PerspectiveFOV"].as<float>());
cc.Camera.SetPerspectiveNearClip(cameraProps["PerspectiveNear"].as<float>());
cc.Camera.SetPerspectiveFarClip(cameraProps["PerspectiveFar"].as<float>());
cc.Camera.SetOrthographicSize(cameraProps["OrthographicSize"].as<float>());
cc.Camera.SetOrthographicNearClip(cameraProps["OrthographicNear"].as<float>());
cc.Camera.SetOrthographicFarClip(cameraProps["OrthographicFar"].as<float>());
cc.Primary = cameraComponent["Primary"].as<bool>();
cc.FixedAspectRatio = cameraComponent["FixedAspectRatio"].as<bool>();
}
auto scriptComponent = entity["ScriptComponent"];
if (scriptComponent)
{
auto& sc = deserializedEntity.AddComponent<ScriptComponent>();
sc.ClassName = scriptComponent["ClassName"].as<std::string>();
auto scriptFields = scriptComponent["ScriptFields"];
if (scriptFields)
{
Ref<ScriptClass> entityClass = ScriptEngine::GetEntityClass(sc.ClassName);
if (entityClass)
{
const auto& fields = entityClass->GetFields();
auto& entityFields = ScriptEngine::GetScriptFieldMap(deserializedEntity);
for (auto scriptField : scriptFields)
{
std::string name = scriptField["Name"].as<std::string>();
std::string typeString = scriptField["Type"].as<std::string>();
ScriptFieldType type = Utils::ScriptFieldTypeFromString(typeString);
ScriptFieldInstance& fieldInstance = entityFields[name];
// TODO(Yan): turn this assert into Hazelnut log warning
HZ_CORE_ASSERT(fields.find(name) != fields.end());
if (fields.find(name) == fields.end())
continue;
fieldInstance.Field = fields.at(name);
switch (type)
{
READ_SCRIPT_FIELD(Float, float);
READ_SCRIPT_FIELD(Double, double);
READ_SCRIPT_FIELD(Bool, bool);
READ_SCRIPT_FIELD(Char, char);
READ_SCRIPT_FIELD(Byte, int8_t);
READ_SCRIPT_FIELD(Short, int16_t);
READ_SCRIPT_FIELD(Int, int32_t);
READ_SCRIPT_FIELD(Long, int64_t);
READ_SCRIPT_FIELD(UByte, uint8_t);
READ_SCRIPT_FIELD(UShort, uint16_t);
READ_SCRIPT_FIELD(UInt, uint32_t);
READ_SCRIPT_FIELD(ULong, uint64_t);
READ_SCRIPT_FIELD(Vector2, glm::vec2);
READ_SCRIPT_FIELD(Vector3, glm::vec3);
READ_SCRIPT_FIELD(Vector4, glm::vec4);
READ_SCRIPT_FIELD(Entity, UUID);
}
}
}
}
}
auto spriteRendererComponent = entity["SpriteRendererComponent"];
if (spriteRendererComponent)
{
auto& src = deserializedEntity.AddComponent<SpriteRendererComponent>();
src.Color = spriteRendererComponent["Color"].as<glm::vec4>();
if (spriteRendererComponent["TexturePath"])
{
std::string texturePath = spriteRendererComponent["TexturePath"].as<std::string>();
auto path = Project::GetAssetFileSystemPath(texturePath);
src.Texture = Texture2D::Create(path.string());
}
if (spriteRendererComponent["TilingFactor"])
src.TilingFactor = spriteRendererComponent["TilingFactor"].as<float>();
}
auto circleRendererComponent = entity["CircleRendererComponent"];
if (circleRendererComponent)
{
auto& crc = deserializedEntity.AddComponent<CircleRendererComponent>();
crc.Color = circleRendererComponent["Color"].as<glm::vec4>();
crc.Thickness = circleRendererComponent["Thickness"].as<float>();
crc.Fade = circleRendererComponent["Fade"].as<float>();
}
auto rigidbody2DComponent = entity["Rigidbody2DComponent"];
if (rigidbody2DComponent)
{
auto& rb2d = deserializedEntity.AddComponent<Rigidbody2DComponent>();
rb2d.Type = RigidBody2DBodyTypeFromString(rigidbody2DComponent["BodyType"].as<std::string>());
rb2d.FixedRotation = rigidbody2DComponent["FixedRotation"].as<bool>();
}
auto boxCollider2DComponent = entity["BoxCollider2DComponent"];
if (boxCollider2DComponent)
{
auto& bc2d = deserializedEntity.AddComponent<BoxCollider2DComponent>();
bc2d.Offset = boxCollider2DComponent["Offset"].as<glm::vec2>();
bc2d.Size = boxCollider2DComponent["Size"].as<glm::vec2>();
bc2d.Density = boxCollider2DComponent["Density"].as<float>();
bc2d.Friction = boxCollider2DComponent["Friction"].as<float>();
bc2d.Restitution = boxCollider2DComponent["Restitution"].as<float>();
bc2d.RestitutionThreshold = boxCollider2DComponent["RestitutionThreshold"].as<float>();
}
auto circleCollider2DComponent = entity["CircleCollider2DComponent"];
if (circleCollider2DComponent)
{
auto& cc2d = deserializedEntity.AddComponent<CircleCollider2DComponent>();
cc2d.Offset = circleCollider2DComponent["Offset"].as<glm::vec2>();
cc2d.Radius = circleCollider2DComponent["Radius"].as<float>();
cc2d.Density = circleCollider2DComponent["Density"].as<float>();
cc2d.Friction = circleCollider2DComponent["Friction"].as<float>();
cc2d.Restitution = circleCollider2DComponent["Restitution"].as<float>();
cc2d.RestitutionThreshold = circleCollider2DComponent["RestitutionThreshold"].as<float>();
}
auto textComponent = entity["TextComponent"];
if (textComponent)
{
auto& tc = deserializedEntity.AddComponent<TextComponent>();
tc.TextString = textComponent["TextString"].as<std::string>();
// tc.FontAsset // TODO
tc.Color = textComponent["Color"].as<glm::vec4>();
tc.Kerning = textComponent["Kerning"].as<float>();
tc.LineSpacing = textComponent["LineSpacing"].as<float>();
}
}
}
return true;
}
bool SceneSerializer::DeserializeRuntime(const std::string& filepath)
{
// Not implemented
HZ_CORE_ASSERT(false);
return false;
}
}
================================================
FILE: Hazel/src/Hazel/Scene/SceneSerializer.h
================================================
#pragma once
#include "Scene.h"
namespace Hazel {
class SceneSerializer
{
public:
SceneSerializer(const Ref<Scene>& scene);
void Serialize(const std::string& filepath);
void SerializeRuntime(const std::string& filepath);
bool Deserialize(const std::string& filepath);
bool DeserializeRuntime(const std::string& filepath);
private:
Ref<Scene> m_Scene;
};
}
================================================
FILE: Hazel/src/Hazel/Scene/ScriptableEntity.h
================================================
#pragma once
#include "Entity.h"
namespace Hazel {
class ScriptableEntity
{
public:
virtual ~ScriptableEntity() {}
template<typename T>
T& GetComponent()
{
return m_Entity.GetComponent<T>();
}
protected:
virtual void OnCreate() {}
virtual void OnDestroy() {}
virtual void OnUpdate(Timestep ts) {}
private:
Entity m_Entity;
friend class Scene;
};
}
================================================
FILE: Hazel/src/Hazel/Scripting/ScriptEngine.cpp
================================================
#include "hzpch.h"
#include "ScriptEngine.h"
#include "ScriptGlue.h"
#include "mono/jit/jit.h"
#include "mono/metadata/assembly.h"
#include "mono/metadata/object.h"
#include "mono/metadata/tabledefs.h"
#include "mono/metadata/mono-debug.h"
#include "mono/metadata/threads.h"
#include "FileWatch.h"
#include "Hazel/Core/Application.h"
#include "Hazel/Core/Timer.h"
#include "Hazel/Core/Buffer.h"
#include "Hazel/Core/FileSystem.h"
#include "Hazel/Project/Project.h"
namespace Hazel {
static std::unordered_map<std::string, ScriptFieldType> s_ScriptFieldTypeMap =
{
{ "System.Single", ScriptFieldType::Float },
{ "System.Double", ScriptFieldType::Double },
{ "System.Boolean", ScriptFieldType::Bool },
{ "System.Char", ScriptFieldType::Char },
{ "System.Int16", ScriptFieldType::Short },
{ "System.Int32", ScriptFieldType::Int },
{ "System.Int64", ScriptFieldType::Long },
{ "System.Byte", ScriptFieldType::Byte },
{ "System.UInt16", ScriptFieldType::UShort },
{ "System.UInt32", ScriptFieldType::UInt },
{ "System.UInt64", ScriptFieldType::ULong },
{ "Hazel.Vector2", ScriptFieldType::Vector2 },
{ "Hazel.Vector3", ScriptFieldType::Vector3 },
{ "Hazel.Vector4", ScriptFieldType::Vector4 },
{ "Hazel.Entity", ScriptFieldType::Entity },
};
namespace Utils {
static MonoAssembly* LoadMonoAssembly(const std::filesystem::path& assemblyPath, bool loadPDB = false)
{
ScopedBuffer fileData = FileSystem::ReadFileBinary(assemblyPath);
// NOTE: We can't use this image for anything other than loading the assembly because this image doesn't have a reference to the assembly
MonoImageOpenStatus status;
MonoImage* image = mono_image_open_from_data_full(fileData.As<char>(), fileData.Size(), 1, &status, 0);
if (status != MONO_IMAGE_OK)
{
const char* errorMessage = mono_image_strerror(status);
// Log some error message using the errorMessage data
return nullptr;
}
if (loadPDB)
{
std::filesystem::path pdbPath = assemblyPath;
pdbPath.replace_extension(".pdb");
if (std::filesystem::exists(pdbPath))
{
ScopedBuffer pdbFileData = FileSystem::ReadFileBinary(pdbPath);
mono_debug_open_image_from_memory(image, pdbFileData.As<const mono_byte>(), pdbFileData.Size());
HZ_CORE_INFO("Loaded PDB {}", pdbPath);
}
}
std::string pathString = assemblyPath.string();
MonoAssembly* assembly = mono_assembly_load_from_full(image, pathString.c_str(), &status, 0);
mono_image_close(image);
return assembly;
}
void PrintAssemblyTypes(MonoAssembly* assembly)
{
MonoImage* image = mono_assembly_get_image(assembly);
const MonoTableInfo* typeDefinitionsTable = mono_image_get_table_info(image, MONO_TABLE_TYPEDEF);
int32_t numTypes = mono_table_info_get_rows(typeDefinitionsTable);
for (int32_t i = 0; i < numTypes; i++)
{
uint32_t cols[MONO_TYPEDEF_SIZE];
mono_metadata_decode_row(typeDefinitionsTable, i, cols, MONO_TYPEDEF_SIZE);
const char* nameSpace = mono_metadata_string_heap(image, cols[MONO_TYPEDEF_NAMESPACE]);
const char* name = mono_metadata_string_heap(image, cols[MONO_TYPEDEF_NAME]);
HZ_CORE_TRACE("{}.{}", nameSpace, name);
}
}
ScriptFieldType MonoTypeToScriptFieldType(MonoType* monoType)
{
std::string typeName = mono_type_get_name(monoType);
auto it = s_ScriptFieldTypeMap.find(typeName);
if (it == s_ScriptFieldTypeMap.end())
{
HZ_CORE_ERROR("Unknown type: {}", typeName);
return ScriptFieldType::None;
}
return it->second;
}
}
struct ScriptEngineData
{
MonoDomain* RootDomain = nullptr;
MonoDomain* AppDomain = nullptr;
MonoAssembly* CoreAssembly = nullptr;
MonoImage* CoreAssemblyImage = nullptr;
MonoAssembly* AppAssembly = nullptr;
MonoImage* AppAssemblyImage = nullptr;
std::filesystem::path CoreAssemblyFilepath;
std::filesystem::path AppAssemblyFilepath;
ScriptClass EntityClass;
std::unordered_map<std::string, Ref<ScriptClass>> EntityClasses;
std::unordered_map<UUID, Ref<ScriptInstance>> EntityInstances;
std::unordered_map<UUID, ScriptFieldMap> EntityScriptFields;
Scope<filewatch::FileWatch<std::string>> AppAssemblyFileWatcher;
bool AssemblyReloadPending = false;
#ifdef HZ_DEBUG
bool EnableDebugging = true;
#else
bool EnableDebugging = false;
#endif
// Runtime
Scene* SceneContext = nullptr;
};
static ScriptEngineData* s_Data = nullptr;
static void OnAppAssemblyFileSystemEvent(const std::string& path, const filewatch::Event change_type)
{
if (!s_Data->AssemblyReloadPending && change_type == filewatch::Event::modified)
{
s_Data->AssemblyReloadPending = true;
Application::Get().SubmitToMainThread([]()
{
s_Data->AppAssemblyFileWatcher.reset();
ScriptEngine::ReloadAssembly();
});
}
}
void ScriptEngine::Init()
{
s_Data = new ScriptEngineData();
InitMono();
ScriptGlue::RegisterFunctions();
bool status = LoadAssembly("Resources/Scripts/Hazel-ScriptCore.dll");
if (!status)
{
HZ_CORE_ERROR("[ScriptEngine] Could not load Hazel-ScriptCore assembly.");
return;
}
auto scriptModulePath = Project::GetAssetDirectory() / Project::GetActive()->GetConfig().ScriptModulePath;
status = LoadAppAssembly(scriptModulePath);
if (!status)
{
HZ_CORE_ERROR("[ScriptEngine] Could not load app assembly.");
return;
}
LoadAssemblyClasses();
ScriptGlue::RegisterComponents();
// Retrieve and instantiate class
s_Data->EntityClass = ScriptClass("Hazel", "Entity", true);
}
void ScriptEngine::Shutdown()
{
ShutdownMono();
delete s_Data;
}
void ScriptEngine::InitMono()
{
mono_set_assemblies_path("mono/lib");
if (s_Data->EnableDebugging)
{
const char* argv[2] = {
"--debugger-agent=transport=dt_socket,address=127.0.0.1:2550,server=y,suspend=n,loglevel=3,logfile=MonoDebugger.log",
"--soft-breakpoints"
};
mono_jit_parse_options(2, (char**)argv);
mono_debug_init(MONO_DEBUG_FORMAT_MONO);
}
MonoDomain* rootDomain = mono_jit_init("HazelJITRuntime");
HZ_CORE_ASSERT(rootDomain);
// Store the root domain pointer
s_Data->RootDomain = rootDomain;
if (s_Data->EnableDebugging)
mono_debug_domain_create(s_Data->RootDomain);
mono_thread_set_main(mono_thread_current());
}
void ScriptEngine::ShutdownMono()
{
mono_domain_set(mono_get_root_domain(), false);
mono_domain_unload(s_Data->AppDomain);
s_Data->AppDomain = nullptr;
mono_jit_cleanup(s_Data->RootDomain);
s_Data->RootDomain = nullptr;
}
bool ScriptEngine::LoadAssembly(const std::filesystem::path& filepath)
{
// Create an App Domain
s_Data->AppDomain = mono_domain_create_appdomain("HazelScriptRuntime", nullptr);
mono_domain_set(s_Data->AppDomain, true);
s_Data->CoreAssemblyFilepath = filepath;
s_Data->CoreAssembly = Utils::LoadMonoAssembly(filepath, s_Data->EnableDebugging);
if (s_Data->CoreAssembly == nullptr)
return false;
s_Data->CoreAssemblyImage = mono_assembly_get_image(s_Data->CoreAssembly);
return true;
}
bool ScriptEngine::LoadAppAssembly(const std::filesystem::path& filepath)
{
s_Data->AppAssemblyFilepath = filepath;
s_Data->AppAssembly = Utils::LoadMonoAssembly(filepath, s_Data->EnableDebugging);
if (s_Data->AppAssembly == nullptr)
return false;
s_Data->AppAssemblyImage = mono_assembly_get_image(s_Data->AppAssembly);
s_Data->AppAssemblyFileWatcher = CreateScope<filewatch::FileWatch<std::string>>(filepath.string(), OnAppAssemblyFileSystemEvent);
s_Data->AssemblyReloadPending = false;
return true;
}
void ScriptEngine::ReloadAssembly()
{
mono_domain_set(mono_get_root_domain(), false);
mono_domain_unload(s_Data->AppDomain);
LoadAssembly(s_Data->CoreAssemblyFilepath);
LoadAppAssembly(s_Data->AppAssemblyFilepath);
LoadAssemblyClasses();
ScriptGlue::RegisterComponents();
// Retrieve and instantiate class
s_Data->EntityClass = ScriptClass("Hazel", "Entity", true);
}
void ScriptEngine::OnRuntimeStart(Scene* scene)
{
s_Data->SceneContext = scene;
}
bool ScriptEngine::EntityClassExists(const std::string& fullClassName)
{
return s_Data->EntityClasses.find(fullClassName) != s_Data->EntityClasses.end();
}
void ScriptEngine::OnCreateEntity(Entity entity)
{
const auto& sc = entity.GetComponent<ScriptComponent>();
if (ScriptEngine::EntityClassExists(sc.ClassName))
{
UUID entityID = entity.GetUUID();
Ref<ScriptInstance> instance = CreateRef<ScriptInstance>(s_Data->EntityClasses[sc.ClassName], entity);
s_Data->EntityInstances[entityID] = instance;
// Copy field values
if (s_Data->EntityScriptFields.find(entityID) != s_Data->EntityScriptFields.end())
{
const ScriptFieldMap& fieldMap = s_Data->EntityScriptFields.at(entityID);
for (const auto& [name, fieldInstance] : fieldMap)
instance->SetFieldValueInternal(name, fieldInstance.m_Buffer);
}
instance->InvokeOnCreate();
}
}
void ScriptEngine::OnUpdateEntity(Entity entity, Timestep ts)
{
UUID entityUUID = entity.GetUUID();
if (s_Data->EntityInstances.find(entityUUID) != s_Data->EntityInstances.end())
{
Ref<ScriptInstance> instance = s_Data->EntityInstances[entityUUID];
instance->InvokeOnUpdate((float)ts);
}
else
{
HZ_CORE_ERROR("Could not find ScriptInstance for entity {}", entityUUID);
}
}
Scene* ScriptEngine::GetSceneContext()
{
return s_Data->SceneContext;
}
Ref<ScriptInstance> ScriptEngine::GetEntityScriptInstance(UUID entityID)
{
auto it = s_Data->EntityInstances.find(entityID);
if (it == s_Data->EntityInstances.end())
return nullptr;
return it->second;
}
Ref<ScriptClass> ScriptEngine::GetEntityClass(const std::string& name)
{
if (s_Data->EntityClasses.find(name) == s_Data->EntityClasses.end())
return nullptr;
return s_Data->EntityClasses.at(name);
}
void ScriptEngine::OnRuntimeStop()
{
s_Data->SceneContext = nullptr;
s_Data->EntityInstances.clear();
}
std::unordered_map<std::string, Ref<ScriptClass>> ScriptEngine::GetEntityClasses()
{
return s_Data->EntityClasses;
}
ScriptFieldMap& ScriptEngine::GetScriptFieldMap(Entity entity)
{
HZ_CORE_ASSERT(entity);
UUID entityID = entity.GetUUID();
return s_Data->EntityScriptFields[entityID];
}
void ScriptEngine::LoadAssemblyClasses()
{
s_Data->EntityClasses.clear();
const MonoTableInfo* typeDefinitionsTable = mono_image_get_table_info(s_Data->AppAssemblyImage, MONO_TABLE_TYPEDEF);
int32_t numTypes = mono_table_info_get_rows(typeDefinitionsTable);
MonoClass* entityClass = mono_class_from_name(s_Data->CoreAssemblyImage, "Hazel", "Entity");
for (int32_t i = 0; i < numTypes; i++)
{
uint32_t cols[MONO_TYPEDEF_SIZE];
mono_metadata_decode_row(typeDefinitionsTable, i, cols, MONO_TYPEDEF_SIZE);
const char* nameSpace = mono_metadata_string_heap(s_Data->AppAssemblyImage, cols[MONO_TYPEDEF_NAMESPACE]);
const char* className = mono_metadata_string_heap(s_Data->AppAssemblyImage, cols[MONO_TYPEDEF_NAME]);
std::string fullName;
if (strlen(nameSpace) != 0)
fullName = fmt::format("{}.{}", nameSpace, className);
else
fullName = className;
MonoClass* monoClass = mono_class_from_name(s_Data->AppAssemblyImage, nameSpace, className);
if (monoClass == entityClass)
continue;
bool isEntity = mono_class_is_subclass_of(monoClass, entityClass, false);
if (!isEntity)
continue;
Ref<ScriptClass> scriptClass = CreateRef<ScriptClass>(nameSpace, className);
s_Data->EntityClasses[fullName] = scriptClass;
// This routine is an iterator routine for retrieving the fields in a class.
// You must pass a gpointer that points to zero and is treated as an opaque handle
// to iterate over all of the elements. When no more values are available, the return value is NULL.
int fieldCount = mono_class_num_fields(monoClass);
HZ_CORE_WARN("{} has {} fields:", className, fieldCount);
void* iterator = nullptr;
while (MonoClassField* field = mono_class_get_fields(monoClass, &iterator))
{
const char* fieldName = mono_field_get_name(field);
uint32_t flags = mono_field_get_flags(field);
if (flags & FIELD_ATTRIBUTE_PUBLIC)
{
MonoType* type = mono_field_get_type(field);
ScriptFieldType fieldType = Utils::MonoTypeToScriptFieldType(type);
HZ_CORE_WARN(" {} ({})", fieldName, Utils::ScriptFieldTypeToString(fieldType));
scriptClass->m_Fields[fieldName] = { fieldType, fieldName, field };
}
}
}
auto& entityClasses = s_Data->EntityClasses;
//mono_field_get_value()
}
MonoImage* ScriptEngine::GetCoreAssemblyImage()
{
return s_Data->CoreAssemblyImage;
}
MonoObject* ScriptEngine::GetManagedInstance(UUID uuid)
{
HZ_CORE_ASSERT(s_Data->EntityInstances.find(uuid) != s_Data->EntityInstances.end());
return s_Data->EntityInstances.at(uuid)->GetManagedObject();
}
MonoString* ScriptEngine::CreateString(const char* string)
{
return mono_string_new(s_Data->AppDomain, string);
}
MonoObject* ScriptEngine::InstantiateClass(MonoClass* monoClass)
{
MonoObject* instance = mono_object_new(s_Data->AppDomain, monoClass);
mono_runtime_object_init(instance);
return instance;
}
ScriptClass::ScriptClass(const std::string& classNamespace, const std::string& className, bool isCore)
: m_ClassNamespace(classNamespace), m_ClassName(className)
{
m_MonoClass = mono_class_from_name(isCore ? s_Data->CoreAssemblyImage : s_Data->AppAssemblyImage, classNamespace.c_str(), className.c_str());
}
MonoObject* ScriptClass::Instantiate()
{
return ScriptEngine::InstantiateClass(m_MonoClass);
}
MonoMethod* ScriptClass::GetMethod(const std::string& name, int parameterCount)
{
return mono_class_get_method_from_name(m_MonoClass, name.c_str(), parameterCount);
}
MonoObject* ScriptClass::InvokeMethod(MonoObject* instance, MonoMethod* method, void** params)
{
MonoObject* exception = nullptr;
return mono_runtime_invoke(method, instance, params, &exception);
}
ScriptInstance::ScriptInstance(Ref<ScriptClass> scriptClass, Entity entity)
: m_ScriptClass(scriptClass)
{
m_Instance = scriptClass->Instantiate();
m_Constructor = s_Data->EntityClass.GetMethod(".ctor", 1);
gitextract_80u9dz8d/
├── .editorconfig
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ ├── issue--bug-report.md
│ │ ├── issue--feature-request.md
│ │ └── other-issues--blank-template.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .gitmodules
├── Dependencies.lua
├── Hazel/
│ ├── premake5.lua
│ ├── src/
│ │ ├── Hazel/
│ │ │ ├── Core/
│ │ │ │ ├── Application.cpp
│ │ │ │ ├── Application.h
│ │ │ │ ├── Assert.h
│ │ │ │ ├── Base.h
│ │ │ │ ├── Buffer.h
│ │ │ │ ├── EntryPoint.h
│ │ │ │ ├── FileSystem.cpp
│ │ │ │ ├── FileSystem.h
│ │ │ │ ├── Input.h
│ │ │ │ ├── KeyCodes.h
│ │ │ │ ├── Layer.cpp
│ │ │ │ ├── Layer.h
│ │ │ │ ├── LayerStack.cpp
│ │ │ │ ├── LayerStack.h
│ │ │ │ ├── Log.cpp
│ │ │ │ ├── Log.h
│ │ │ │ ├── MouseCodes.h
│ │ │ │ ├── PlatformDetection.h
│ │ │ │ ├── Timer.h
│ │ │ │ ├── Timestep.h
│ │ │ │ ├── UUID.cpp
│ │ │ │ ├── UUID.h
│ │ │ │ ├── Window.cpp
│ │ │ │ └── Window.h
│ │ │ ├── Debug/
│ │ │ │ └── Instrumentor.h
│ │ │ ├── Events/
│ │ │ │ ├── ApplicationEvent.h
│ │ │ │ ├── Event.h
│ │ │ │ ├── KeyEvent.h
│ │ │ │ └── MouseEvent.h
│ │ │ ├── ImGui/
│ │ │ │ ├── ImGuiBuild.cpp
│ │ │ │ ├── ImGuiLayer.cpp
│ │ │ │ └── ImGuiLayer.h
│ │ │ ├── Math/
│ │ │ │ ├── Math.cpp
│ │ │ │ └── Math.h
│ │ │ ├── Physics/
│ │ │ │ └── Physics2D.h
│ │ │ ├── Project/
│ │ │ │ ├── Project.cpp
│ │ │ │ ├── Project.h
│ │ │ │ ├── ProjectSerializer.cpp
│ │ │ │ └── ProjectSerializer.h
│ │ │ ├── Renderer/
│ │ │ │ ├── Buffer.cpp
│ │ │ │ ├── Buffer.h
│ │ │ │ ├── Camera.h
│ │ │ │ ├── EditorCamera.cpp
│ │ │ │ ├── EditorCamera.h
│ │ │ │ ├── Font.cpp
│ │ │ │ ├── Font.h
│ │ │ │ ├── Framebuffer.cpp
│ │ │ │ ├── Framebuffer.h
│ │ │ │ ├── GraphicsContext.cpp
│ │ │ │ ├── GraphicsContext.h
│ │ │ │ ├── MSDFData.h
│ │ │ │ ├── OrthographicCamera.cpp
│ │ │ │ ├── OrthographicCamera.h
│ │ │ │ ├── OrthographicCameraController.cpp
│ │ │ │ ├── OrthographicCameraController.h
│ │ │ │ ├── RenderCommand.cpp
│ │ │ │ ├── RenderCommand.h
│ │ │ │ ├── Renderer.cpp
│ │ │ │ ├── Renderer.h
│ │ │ │ ├── Renderer2D.cpp
│ │ │ │ ├── Renderer2D.h
│ │ │ │ ├── RendererAPI.cpp
│ │ │ │ ├── RendererAPI.h
│ │ │ │ ├── Shader.cpp
│ │ │ │ ├── Shader.h
│ │ │ │ ├── Texture.cpp
│ │ │ │ ├── Texture.h
│ │ │ │ ├── UniformBuffer.cpp
│ │ │ │ ├── UniformBuffer.h
│ │ │ │ ├── VertexArray.cpp
│ │ │ │ └── VertexArray.h
│ │ │ ├── Scene/
│ │ │ │ ├── Components.h
│ │ │ │ ├── Entity.cpp
│ │ │ │ ├── Entity.h
│ │ │ │ ├── Scene.cpp
│ │ │ │ ├── Scene.h
│ │ │ │ ├── SceneCamera.cpp
│ │ │ │ ├── SceneCamera.h
│ │ │ │ ├── SceneSerializer.cpp
│ │ │ │ ├── SceneSerializer.h
│ │ │ │ └── ScriptableEntity.h
│ │ │ ├── Scripting/
│ │ │ │ ├── ScriptEngine.cpp
│ │ │ │ ├── ScriptEngine.h
│ │ │ │ ├── ScriptGlue.cpp
│ │ │ │ └── ScriptGlue.h
│ │ │ ├── UI/
│ │ │ │ └── UI.h
│ │ │ └── Utils/
│ │ │ └── PlatformUtils.h
│ │ ├── Hazel.h
│ │ ├── Platform/
│ │ │ ├── OpenGL/
│ │ │ │ ├── OpenGLBuffer.cpp
│ │ │ │ ├── OpenGLBuffer.h
│ │ │ │ ├── OpenGLContext.cpp
│ │ │ │ ├── OpenGLContext.h
│ │ │ │ ├── OpenGLFramebuffer.cpp
│ │ │ │ ├── OpenGLFramebuffer.h
│ │ │ │ ├── OpenGLRendererAPI.cpp
│ │ │ │ ├── OpenGLRendererAPI.h
│ │ │ │ ├── OpenGLShader.cpp
│ │ │ │ ├── OpenGLShader.h
│ │ │ │ ├── OpenGLTexture.cpp
│ │ │ │ ├── OpenGLTexture.h
│ │ │ │ ├── OpenGLUniformBuffer.cpp
│ │ │ │ ├── OpenGLUniformBuffer.h
│ │ │ │ ├── OpenGLVertexArray.cpp
│ │ │ │ └── OpenGLVertexArray.h
│ │ │ └── Windows/
│ │ │ ├── WindowsInput.cpp
│ │ │ ├── WindowsPlatformUtils.cpp
│ │ │ ├── WindowsWindow.cpp
│ │ │ └── WindowsWindow.h
│ │ ├── hzpch.cpp
│ │ └── hzpch.h
│ └── vendor/
│ ├── Glad/
│ │ ├── include/
│ │ │ ├── KHR/
│ │ │ │ └── khrplatform.h
│ │ │ └── glad/
│ │ │ └── glad.h
│ │ ├── premake5.lua
│ │ └── src/
│ │ └── glad.c
│ ├── entt/
│ │ ├── LICENSE.txt
│ │ └── include/
│ │ └── entt.hpp
│ ├── filewatch/
│ │ └── FileWatch.h
│ ├── mono/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── include/
│ │ │ └── mono/
│ │ │ ├── jit/
│ │ │ │ └── jit.h
│ │ │ ├── metadata/
│ │ │ │ ├── abi-details.h
│ │ │ │ ├── appdomain-icalls.h
│ │ │ │ ├── appdomain.h
│ │ │ │ ├── assembly-internals.h
│ │ │ │ ├── assembly.h
│ │ │ │ ├── attach.h
│ │ │ │ ├── attrdefs.h
│ │ │ │ ├── blob.h
│ │ │ │ ├── callspec.h
│ │ │ │ ├── cil-coff.h
│ │ │ │ ├── class-abi-details.h
│ │ │ │ ├── class-getters.h
│ │ │ │ ├── class-init.h
│ │ │ │ ├── class-inlines.h
│ │ │ │ ├── class-internals.h
│ │ │ │ ├── class-private-definition.h
│ │ │ │ ├── class.h
│ │ │ │ ├── cominterop-win32-internals.h
│ │ │ │ ├── cominterop.h
│ │ │ │ ├── console-io.h
│ │ │ │ ├── console-win32-internals.h
│ │ │ │ ├── coree-internals.h
│ │ │ │ ├── coree.h
│ │ │ │ ├── culture-info-tables.h
│ │ │ │ ├── culture-info.h
│ │ │ │ ├── custom-attrs-internals.h
│ │ │ │ ├── debug-helpers.h
│ │ │ │ ├── debug-internals.h
│ │ │ │ ├── debug-mono-ppdb.h
│ │ │ │ ├── debug-mono-symfile.h
│ │ │ │ ├── domain-internals.h
│ │ │ │ ├── dynamic-image-internals.h
│ │ │ │ ├── dynamic-stream-internals.h
│ │ │ │ ├── environment.h
│ │ │ │ ├── exception-internals.h
│ │ │ │ ├── exception.h
│ │ │ │ ├── external-only.h
│ │ │ │ ├── fdhandle.h
│ │ │ │ ├── file-mmap.h
│ │ │ │ ├── filewatcher.h
│ │ │ │ ├── gc-internals.h
│ │ │ │ ├── handle-decl.h
│ │ │ │ ├── handle.h
│ │ │ │ ├── icall-decl.h
│ │ │ │ ├── icall-def-netcore.h
│ │ │ │ ├── icall-def.h
│ │ │ │ ├── icall-internals.h
│ │ │ │ ├── icall-signatures.h
│ │ │ │ ├── icall-table.h
│ │ │ │ ├── icall-windows-internals.h
│ │ │ │ ├── icalls.h
│ │ │ │ ├── image-internals.h
│ │ │ │ ├── image.h
│ │ │ │ ├── jit-icall-reg.h
│ │ │ │ ├── loaded-images-internals.h
│ │ │ │ ├── loader-internals.h
│ │ │ │ ├── loader.h
│ │ │ │ ├── locales.h
│ │ │ │ ├── lock-tracer.h
│ │ │ │ ├── marshal-ilgen.h
│ │ │ │ ├── marshal-internals.h
│ │ │ │ ├── marshal-windows-internals.h
│ │ │ │ ├── marshal.h
│ │ │ │ ├── mempool-internals.h
│ │ │ │ ├── mempool.h
│ │ │ │ ├── metadata-internals.h
│ │ │ │ ├── metadata.h
│ │ │ │ ├── method-builder-ilgen-internals.h
│ │ │ │ ├── method-builder-ilgen.h
│ │ │ │ ├── method-builder-internals.h
│ │ │ │ ├── method-builder.h
│ │ │ │ ├── monitor.h
│ │ │ │ ├── mono-basic-block.h
│ │ │ │ ├── mono-conc-hash.h
│ │ │ │ ├── mono-config-dirs.h
│ │ │ │ ├── mono-config-internals.h
│ │ │ │ ├── mono-config.h
│ │ │ │ ├── mono-debug.h
│ │ │ │ ├── mono-endian.h
│ │ │ │ ├── mono-gc.h
│ │ │ │ ├── mono-hash-internals.h
│ │ │ │ ├── mono-hash.h
│ │ │ │ ├── mono-mlist.h
│ │ │ │ ├── mono-perfcounters-def.h
│ │ │ │ ├── mono-perfcounters.h
│ │ │ │ ├── mono-ptr-array.h
│ │ │ │ ├── mono-security-windows-internals.h
│ │ │ │ ├── normalization-tables.h
│ │ │ │ ├── null-gc-handles.h
│ │ │ │ ├── number-formatter.h
│ │ │ │ ├── number-ms.h
│ │ │ │ ├── object-forward.h
│ │ │ │ ├── object-internals.h
│ │ │ │ ├── object-offsets.h
│ │ │ │ ├── object.h
│ │ │ │ ├── opcodes.h
│ │ │ │ ├── pal-ios.h
│ │ │ │ ├── profiler-events.h
│ │ │ │ ├── profiler-legacy.h
│ │ │ │ ├── profiler-private.h
│ │ │ │ ├── profiler.h
│ │ │ │ ├── property-bag.h
│ │ │ │ ├── rand.h
│ │ │ │ ├── reflection-cache.h
│ │ │ │ ├── reflection-internals.h
│ │ │ │ ├── reflection.h
│ │ │ │ ├── remoting.h
│ │ │ │ ├── row-indexes.h
│ │ │ │ ├── runtime.h
│ │ │ │ ├── security-core-clr.h
│ │ │ │ ├── security-manager.h
│ │ │ │ ├── security.h
│ │ │ │ ├── seq-points-data.h
│ │ │ │ ├── sgen-bridge-internals.h
│ │ │ │ ├── sgen-bridge.h
│ │ │ │ ├── sgen-client-mono.h
│ │ │ │ ├── sgen-dynarray.h
│ │ │ │ ├── sgen-mono-ilgen.h
│ │ │ │ ├── sgen-mono.h
│ │ │ │ ├── sgen-toggleref.h
│ │ │ │ ├── sre-internals.h
│ │ │ │ ├── string-icalls.h
│ │ │ │ ├── tabledefs.h
│ │ │ │ ├── threadpool-io.h
│ │ │ │ ├── threadpool-worker.h
│ │ │ │ ├── threadpool.h
│ │ │ │ ├── threads-types.h
│ │ │ │ ├── threads.h
│ │ │ │ ├── tokentype.h
│ │ │ │ ├── verify-internals.h
│ │ │ │ ├── verify.h
│ │ │ │ ├── w32error.h
│ │ │ │ ├── w32event.h
│ │ │ │ ├── w32file-internals.h
│ │ │ │ ├── w32file-unix-glob.h
│ │ │ │ ├── w32file-win32-internals.h
│ │ │ │ ├── w32file.h
│ │ │ │ ├── w32handle-namespace.h
│ │ │ │ ├── w32handle.h
│ │ │ │ ├── w32mutex.h
│ │ │ │ ├── w32process-internals.h
│ │ │ │ ├── w32process-unix-internals.h
│ │ │ │ ├── w32process.h
│ │ │ │ ├── w32semaphore.h
│ │ │ │ ├── w32socket-internals.h
│ │ │ │ ├── w32socket.h
│ │ │ │ ├── w32subset.h
│ │ │ │ └── wrapper-types.h
│ │ │ └── utils/
│ │ │ ├── mono-counters.h
│ │ │ ├── mono-dl-fallback.h
│ │ │ ├── mono-error.h
│ │ │ ├── mono-forward.h
│ │ │ ├── mono-logger.h
│ │ │ └── mono-publib.h
│ │ └── lib/
│ │ ├── Debug/
│ │ │ └── libmono-static-sgen.lib
│ │ └── Release/
│ │ └── libmono-static-sgen.lib
│ └── stb_image/
│ ├── stb_image.cpp
│ └── stb_image.h
├── Hazel-ScriptCore/
│ ├── Source/
│ │ └── Hazel/
│ │ ├── Input.cs
│ │ ├── InternalCalls.cs
│ │ ├── KeyCode.cs
│ │ ├── Scene/
│ │ │ ├── Components.cs
│ │ │ └── Entity.cs
│ │ ├── Vector2.cs
│ │ ├── Vector3.cs
│ │ └── Vector4.cs
│ └── premake5.lua
├── Hazelnut/
│ ├── SandboxProject/
│ │ ├── Assets/
│ │ │ ├── Scenes/
│ │ │ │ ├── 3DExample.hazel
│ │ │ │ ├── Example.hazel
│ │ │ │ ├── Physics2D.hazel
│ │ │ │ └── PinkCube.hazel
│ │ │ └── Scripts/
│ │ │ ├── Source/
│ │ │ │ ├── Camera.cs
│ │ │ │ └── Player.cs
│ │ │ ├── Win-GenProjects.bat
│ │ │ └── premake5.lua
│ │ └── Sandbox.hproj
│ ├── assets/
│ │ ├── fonts/
│ │ │ └── opensans/
│ │ │ └── LICENSE.txt
│ │ └── shaders/
│ │ ├── FlatColor.glsl
│ │ ├── Renderer2D_Circle.glsl
│ │ ├── Renderer2D_Line.glsl
│ │ ├── Renderer2D_Quad.glsl
│ │ └── Renderer2D_Text.glsl
│ ├── imgui.ini
│ ├── mono/
│ │ └── lib/
│ │ └── mono/
│ │ └── 4.5/
│ │ ├── Facades/
│ │ │ ├── Microsoft.Win32.Registry.AccessControl.pdb
│ │ │ ├── System.IO.FileSystem.AccessControl.pdb
│ │ │ ├── System.Reflection.TypeExtensions.pdb
│ │ │ ├── System.ServiceProcess.ServiceController.pdb
│ │ │ ├── System.Text.Encoding.CodePages.pdb
│ │ │ └── System.Threading.AccessControl.pdb
│ │ ├── MSBuild/
│ │ │ ├── Microsoft.Build.CommonTypes.xsd
│ │ │ └── Microsoft.Build.Core.xsd
│ │ ├── Microsoft.Build.xsd
│ │ ├── Microsoft.CSharp.targets
│ │ ├── Microsoft.Common.targets
│ │ ├── Microsoft.Common.tasks
│ │ ├── Microsoft.VisualBasic.targets
│ │ ├── RabbitMQ.Client.Apigen.pdb
│ │ ├── VBCSCompiler.exe.config
│ │ ├── al.pdb
│ │ ├── aprofutil.pdb
│ │ ├── browsercaps-updater.pdb
│ │ ├── caspol.pdb
│ │ ├── cccheck.pdb
│ │ ├── ccrewrite.pdb
│ │ ├── cert-sync.pdb
│ │ ├── cert2spc.pdb
│ │ ├── certmgr.pdb
│ │ ├── chktrust.pdb
│ │ ├── crlupdate.pdb
│ │ ├── csc.exe.config
│ │ ├── csc.rsp
│ │ ├── csharp.pdb
│ │ ├── csi.exe.config
│ │ ├── csi.rsp
│ │ ├── culevel.pdb
│ │ ├── disco.pdb
│ │ ├── dtd2rng.pdb
│ │ ├── dtd2xsd.pdb
│ │ ├── gacutil.pdb
│ │ ├── genxs.pdb
│ │ ├── httpcfg.pdb
│ │ ├── ictool.pdb
│ │ ├── ikdasm.pdb
│ │ ├── ilasm.pdb
│ │ ├── illinkanalyzer.pdb
│ │ ├── installutil.pdb
│ │ ├── installvst.pdb
│ │ ├── lc.pdb
│ │ ├── macpack.pdb
│ │ ├── makecert.pdb
│ │ ├── mconfig.pdb
│ │ ├── mcs.pdb
│ │ ├── mdbrebase.pdb
│ │ ├── mdoc.pdb
│ │ ├── mkbundle.pdb
│ │ ├── mod.pdb
│ │ ├── mono-api-diff.pdb
│ │ ├── mono-api-html.pdb
│ │ ├── mono-api-info.pdb
│ │ ├── mono-cil-strip.pdb
│ │ ├── mono-service.pdb
│ │ ├── mono-shlib-cop.exe.config
│ │ ├── mono-shlib-cop.pdb
│ │ ├── mono-symbolicate.pdb
│ │ ├── mono-xmltool.pdb
│ │ ├── monolinker.pdb
│ │ ├── monop.pdb
│ │ ├── mozroots.pdb
│ │ ├── mscorlib.pdb
│ │ ├── pdb2mdb.pdb
│ │ ├── permview.pdb
│ │ ├── resgen.pdb
│ │ ├── secutil.pdb
│ │ ├── setreg.pdb
│ │ ├── sgen.pdb
│ │ ├── signcode.pdb
│ │ ├── sn.pdb
│ │ ├── soapsuds.pdb
│ │ ├── sqlmetal.exe.config
│ │ ├── sqlmetal.pdb
│ │ ├── sqlsharp.pdb
│ │ ├── svcutil.pdb
│ │ ├── vbc.exe.config
│ │ ├── vbc.rsp
│ │ ├── vbnc.exe.mdb
│ │ ├── vbnc.rsp
│ │ ├── wsdl.pdb
│ │ ├── xbuild.exe.config
│ │ ├── xbuild.pdb
│ │ ├── xbuild.rsp
│ │ └── xsd.pdb
│ ├── premake5.lua
│ └── src/
│ ├── EditorLayer.cpp
│ ├── EditorLayer.h
│ ├── HazelnutApp.cpp
│ └── Panels/
│ ├── ContentBrowserPanel.cpp
│ ├── ContentBrowserPanel.h
│ ├── SceneHierarchyPanel.cpp
│ └── SceneHierarchyPanel.h
├── LICENSE
├── README.md
├── Sandbox/
│ ├── assets/
│ │ ├── fonts/
│ │ │ └── opensans/
│ │ │ └── LICENSE.txt
│ │ └── shaders/
│ │ ├── FlatColor.glsl
│ │ └── Texture.glsl
│ ├── imgui.ini
│ ├── premake5.lua
│ └── src/
│ ├── ExampleLayer.cpp
│ ├── ExampleLayer.h
│ ├── Sandbox2D.cpp
│ ├── Sandbox2D.h
│ └── SandboxApp.cpp
├── premake5.lua
├── scripts/
│ ├── Setup.bat
│ ├── Setup.py
│ ├── SetupPremake.py
│ ├── SetupPython.py
│ ├── SetupVulkan.py
│ ├── Utils.py
│ └── Win-GenProjects.bat
└── vendor/
└── premake/
├── premake5.lua
└── premake_customization/
└── solution_items.lua
Copy disabled (too large)
Download .txt
Showing preview only (12,815K chars total). Download the full file to get everything.
SYMBOL INDEX (2609 symbols across 228 files)
FILE: Hazel-ScriptCore/Source/Hazel/Input.cs
class Input (line 3) | public class Input
method IsKeyDown (line 5) | public static bool IsKeyDown(KeyCode keycode)
FILE: Hazel-ScriptCore/Source/Hazel/InternalCalls.cs
class InternalCalls (line 6) | public static class InternalCalls
method Entity_HasComponent (line 9) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Entity_FindEntityByName (line 11) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method GetScriptInstance (line 13) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TransformComponent_GetTranslation (line 18) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TransformComponent_SetTranslation (line 20) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Rigidbody2DComponent_ApplyLinearImpulse (line 25) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Rigidbody2DComponent_GetLinearVelocity (line 27) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Rigidbody2DComponent_GetType (line 29) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Rigidbody2DComponent_SetType (line 31) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Rigidbody2DComponent_ApplyLinearImpulseToCenter (line 33) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_GetText (line 38) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_SetText (line 40) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_GetColor (line 42) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_SetColor (line 44) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_GetKerning (line 46) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_SetKerning (line 48) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_GetLineSpacing (line 50) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method TextComponent_SetLineSpacing (line 52) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
method Input_IsKeyDown (line 57) | [MethodImplAttribute(MethodImplOptions.InternalCall)]
FILE: Hazel-ScriptCore/Source/Hazel/KeyCode.cs
type KeyCode (line 3) | public enum KeyCode
FILE: Hazel-ScriptCore/Source/Hazel/Scene/Components.cs
class Component (line 9) | public abstract class Component
class TransformComponent (line 14) | public class TransformComponent : Component
class Rigidbody2DComponent (line 30) | public class Rigidbody2DComponent : Component
type BodyType (line 32) | public enum BodyType { Static = 0, Dynamic, Kinematic }
method ApplyLinearImpulse (line 49) | public void ApplyLinearImpulse(Vector2 impulse, Vector2 worldPosition,...
method ApplyLinearImpulse (line 54) | public void ApplyLinearImpulse(Vector2 impulse, bool wake)
class TextComponent (line 61) | public class TextComponent : Component
FILE: Hazel-ScriptCore/Source/Hazel/Scene/Entity.cs
class Entity (line 6) | public class Entity
method Entity (line 8) | protected Entity() { ID = 0; }
method Entity (line 10) | internal Entity(ulong id)
method HasComponent (line 30) | public bool HasComponent<T>() where T : Component, new()
method GetComponent (line 36) | public T GetComponent<T>() where T : Component, new()
method FindEntityByName (line 45) | public Entity FindEntityByName(string name)
method As (line 54) | public T As<T>() where T : Entity, new()
FILE: Hazel-ScriptCore/Source/Hazel/Vector2.cs
type Vector2 (line 5) | public struct Vector2
method Vector2 (line 11) | public Vector2(float scalar)
method Vector2 (line 17) | public Vector2(float x, float y)
method LengthSquared (line 33) | public float LengthSquared()
method Length (line 38) | public float Length()
FILE: Hazel-ScriptCore/Source/Hazel/Vector3.cs
type Vector3 (line 3) | public struct Vector3
method Vector3 (line 9) | public Vector3(float scalar)
method Vector3 (line 16) | public Vector3(float x, float y, float z)
method Vector3 (line 23) | public Vector3(Vector2 xy, float z)
FILE: Hazel-ScriptCore/Source/Hazel/Vector4.cs
type Vector4 (line 3) | public struct Vector4
method Vector4 (line 9) | public Vector4(float scalar)
method Vector4 (line 17) | public Vector4(float x, float y, float z, float w)
method Vector4 (line 25) | public Vector4(Vector3 xyz, float w)
FILE: Hazel/src/Hazel/Core/Application.cpp
type Hazel (line 12) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Application.h
function namespace (line 16) | namespace Hazel {
function class (line 37) | class Application
FILE: Hazel/src/Hazel/Core/Base.h
function namespace (line 28) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Buffer.h
function namespace (line 6) | namespace Hazel {
type ScopedBuffer (line 58) | struct ScopedBuffer
function Size (line 76) | uint64_t Size() { return m_Buffer.Size; }
FILE: Hazel/src/Hazel/Core/EntryPoint.h
function main (line 9) | int main(int argc, char** argv)
FILE: Hazel/src/Hazel/Core/FileSystem.cpp
type Hazel (line 4) | namespace Hazel {
function Buffer (line 6) | Buffer FileSystem::ReadFileBinary(const std::filesystem::path& filepath)
FILE: Hazel/src/Hazel/Core/FileSystem.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Input.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/KeyCodes.h
function namespace (line 3) | namespace Hazel
FILE: Hazel/src/Hazel/Core/Layer.cpp
type Hazel (line 4) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Layer.h
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/LayerStack.cpp
type Hazel (line 4) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/LayerStack.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Log.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Log.h
function namespace (line 14) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/MouseCodes.h
function namespace (line 3) | namespace Hazel
FILE: Hazel/src/Hazel/Core/Timer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/Timestep.h
function namespace (line 3) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/UUID.cpp
type Hazel (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Core/UUID.h
function namespace (line 3) | namespace Hazel {
function namespace (line 19) | namespace std {
FILE: Hazel/src/Hazel/Core/Window.cpp
type Hazel (line 8) | namespace Hazel
FILE: Hazel/src/Hazel/Core/Window.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Debug/Instrumentor.h
function namespace (line 14) | namespace Hazel {
function class (line 144) | class InstrumentationTimer
function Stop (line 159) | void Stop()
FILE: Hazel/src/Hazel/Events/ApplicationEvent.h
function class (line 7) | class WindowResizeEvent : public Event
FILE: Hazel/src/Hazel/Events/Event.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Events/KeyEvent.h
function namespace (line 6) | namespace Hazel {
function class (line 41) | class KeyReleasedEvent : public KeyEvent
function class (line 57) | class KeyTypedEvent : public KeyEvent
FILE: Hazel/src/Hazel/Events/MouseEvent.h
function namespace (line 6) | namespace Hazel {
function class (line 30) | class MouseScrolledEvent : public Event
function class (line 52) | class MouseButtonEvent : public Event
function class (line 65) | class MouseButtonPressedEvent : public MouseButtonEvent
function class (line 81) | class MouseButtonReleasedEvent : public MouseButtonEvent
FILE: Hazel/src/Hazel/ImGui/ImGuiLayer.cpp
type Hazel (line 18) | namespace Hazel {
FILE: Hazel/src/Hazel/ImGui/ImGuiLayer.h
function namespace (line 9) | namespace Hazel {
FILE: Hazel/src/Hazel/Math/Math.cpp
type Hazel::Math (line 7) | namespace Hazel::Math {
function DecomposeTransform (line 9) | bool DecomposeTransform(const glm::mat4& transform, glm::vec3& transla...
FILE: Hazel/src/Hazel/Math/Math.h
function namespace (line 5) | namespace Hazel::Math {
FILE: Hazel/src/Hazel/Physics/Physics2D.h
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Project/Project.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Hazel/Project/Project.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Project/ProjectSerializer.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Project/ProjectSerializer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Buffer.cpp
type Hazel (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Buffer.h
function namespace (line 3) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Camera.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/EditorCamera.cpp
type Hazel (line 13) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/EditorCamera.h
function namespace (line 10) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Font.cpp
type Hazel (line 11) | namespace Hazel {
function CreateAndCacheAtlas (line 14) | static Ref<Texture2D> CreateAndCacheAtlas(const std::string& fontName,...
type CharsetRange (line 55) | struct CharsetRange
FILE: Hazel/src/Hazel/Renderer/Font.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Framebuffer.cpp
type Hazel (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Framebuffer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/GraphicsContext.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/GraphicsContext.h
function namespace (line 3) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/MSDFData.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/OrthographicCamera.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/OrthographicCamera.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/OrthographicCameraController.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/OrthographicCameraController.h
function namespace (line 9) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/RenderCommand.cpp
type Hazel (line 4) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/RenderCommand.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Renderer.cpp
type Hazel (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Renderer.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Renderer2D.cpp
type Hazel (line 14) | namespace Hazel {
type QuadVertex (line 16) | struct QuadVertex
type CircleVertex (line 28) | struct CircleVertex
type LineVertex (line 40) | struct LineVertex
type TextVertex (line 49) | struct TextVertex
type Renderer2DData (line 61) | struct Renderer2DData
type CameraData (line 112) | struct CameraData
FILE: Hazel/src/Hazel/Renderer/Renderer2D.h
function namespace (line 13) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/RendererAPI.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/RendererAPI.h
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Shader.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Shader.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Texture.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/Texture.h
type class (line 9) | enum class
type TextureSpecification (line 18) | struct TextureSpecification
function class (line 26) | class Texture
FILE: Hazel/src/Hazel/Renderer/UniformBuffer.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/UniformBuffer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/VertexArray.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Renderer/VertexArray.h
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/Components.h
function namespace (line 14) | namespace Hazel {
type BoxCollider2DComponent (line 128) | struct BoxCollider2DComponent
type CircleCollider2DComponent (line 146) | struct CircleCollider2DComponent
type TextComponent (line 164) | struct TextComponent
FILE: Hazel/src/Hazel/Scene/Entity.cpp
type Hazel (line 4) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/Entity.h
function namespace (line 9) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/Scene.cpp
type Hazel (line 22) | namespace Hazel {
function CopyComponent (line 34) | static void CopyComponent(entt::registry& dst, entt::registry& src, co...
function CopyComponent (line 50) | static void CopyComponent(ComponentGroup<Component...>, entt::registry...
function CopyComponentIfExists (line 56) | static void CopyComponentIfExists(Entity dst, Entity src)
function CopyComponentIfExists (line 66) | static void CopyComponentIfExists(ComponentGroup<Component...>, Entity...
function Entity (line 98) | Entity Scene::CreateEntity(const std::string& name)
function Entity (line 103) | Entity Scene::CreateEntityWithUUID(UUID uuid, const std::string& name)
function Entity (line 328) | Entity Scene::GetPrimaryCameraEntity()
function Entity (line 345) | Entity Scene::DuplicateEntity(Entity entity)
function Entity (line 354) | Entity Scene::FindEntityByName(std::string_view name)
function Entity (line 366) | Entity Scene::GetEntityByUUID(UUID uuid)
FILE: Hazel/src/Hazel/Scene/Scene.h
function namespace (line 11) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/SceneCamera.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/SceneCamera.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/SceneSerializer.cpp
type YAML (line 15) | namespace YAML {
type convert<glm::vec2> (line 18) | struct convert<glm::vec2>
method Node (line 20) | static Node encode(const glm::vec2& rhs)
method decode (line 29) | static bool decode(const Node& node, glm::vec2& rhs)
type convert<glm::vec3> (line 41) | struct convert<glm::vec3>
method Node (line 43) | static Node encode(const glm::vec3& rhs)
method decode (line 53) | static bool decode(const Node& node, glm::vec3& rhs)
type convert<glm::vec4> (line 66) | struct convert<glm::vec4>
method Node (line 68) | static Node encode(const glm::vec4& rhs)
method decode (line 79) | static bool decode(const Node& node, glm::vec4& rhs)
type convert<Hazel::UUID> (line 93) | struct convert<Hazel::UUID>
method Node (line 95) | static Node encode(const Hazel::UUID& uuid)
method decode (line 102) | static bool decode(const Node& node, Hazel::UUID& uuid)
type Hazel (line 111) | namespace Hazel {
function RigidBody2DBodyTypeToString (line 147) | static std::string RigidBody2DBodyTypeToString(Rigidbody2DComponent::B...
function RigidBody2DBodyTypeFromString (line 160) | static Rigidbody2DComponent::BodyType RigidBody2DBodyTypeFromString(co...
function SerializeEntity (line 175) | static void SerializeEntity(YAML::Emitter& out, Entity entity)
FILE: Hazel/src/Hazel/Scene/SceneSerializer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Scene/ScriptableEntity.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Hazel/Scripting/ScriptEngine.cpp
type Hazel (line 22) | namespace Hazel {
type Utils (line 45) | namespace Utils {
function MonoAssembly (line 47) | static MonoAssembly* LoadMonoAssembly(const std::filesystem::path& a...
function PrintAssemblyTypes (line 82) | void PrintAssemblyTypes(MonoAssembly* assembly)
function ScriptFieldType (line 99) | ScriptFieldType MonoTypeToScriptFieldType(MonoType* monoType)
type ScriptEngineData (line 115) | struct ScriptEngineData
function OnAppAssemblyFileSystemEvent (line 150) | static void OnAppAssemblyFileSystemEvent(const std::string& path, cons...
function Scene (line 329) | Scene* ScriptEngine::GetSceneContext()
function ScriptFieldMap (line 364) | ScriptFieldMap& ScriptEngine::GetScriptFieldMap(Entity entity)
function MonoImage (line 435) | MonoImage* ScriptEngine::GetCoreAssemblyImage()
function MonoObject (line 441) | MonoObject* ScriptEngine::GetManagedInstance(UUID uuid)
function MonoString (line 447) | MonoString* ScriptEngine::CreateString(const char* string)
function MonoObject (line 452) | MonoObject* ScriptEngine::InstantiateClass(MonoClass* monoClass)
function MonoObject (line 465) | MonoObject* ScriptClass::Instantiate()
function MonoMethod (line 470) | MonoMethod* ScriptClass::GetMethod(const std::string& name, int parame...
function MonoObject (line 475) | MonoObject* ScriptClass::InvokeMethod(MonoObject* instance, MonoMethod...
FILE: Hazel/src/Hazel/Scripting/ScriptEngine.h
type MonoClass (line 11) | typedef struct _MonoClass MonoClass;
type MonoObject (line 12) | typedef struct _MonoObject MonoObject;
type MonoMethod (line 13) | typedef struct _MonoMethod MonoMethod;
type MonoAssembly (line 14) | typedef struct _MonoAssembly MonoAssembly;
type MonoImage (line 15) | typedef struct _MonoImage MonoImage;
type MonoClassField (line 16) | typedef struct _MonoClassField MonoClassField;
type MonoString (line 17) | typedef struct _MonoString MonoString;
function namespace (line 20) | namespace Hazel {
function class (line 72) | class ScriptClass
function class (line 94) | class ScriptInstance
function class (line 142) | class ScriptEngine
function namespace (line 183) | namespace Utils {
FILE: Hazel/src/Hazel/Scripting/ScriptGlue.cpp
type Hazel (line 19) | namespace Hazel {
type Utils (line 21) | namespace Utils {
function MonoStringToString (line 23) | std::string MonoStringToString(MonoString* string)
function NativeLog (line 37) | static void NativeLog(MonoString* string, int parameter)
function NativeLog_Vector (line 43) | static void NativeLog_Vector(glm::vec3* parameter, glm::vec3* outResult)
function NativeLog_VectorDot (line 49) | static float NativeLog_VectorDot(glm::vec3* parameter)
function MonoObject (line 55) | static MonoObject* GetScriptInstance(UUID entityID)
function Entity_HasComponent (line 60) | static bool Entity_HasComponent(UUID entityID, MonoReflectionType* com...
function Entity_FindEntityByName (line 72) | static uint64_t Entity_FindEntityByName(MonoString* name)
function TransformComponent_GetTranslation (line 87) | static void TransformComponent_GetTranslation(UUID entityID, glm::vec3...
function TransformComponent_SetTranslation (line 97) | static void TransformComponent_SetTranslation(UUID entityID, glm::vec3...
function Rigidbody2DComponent_ApplyLinearImpulse (line 107) | static void Rigidbody2DComponent_ApplyLinearImpulse(UUID entityID, glm...
function Rigidbody2DComponent_ApplyLinearImpulseToCenter (line 119) | static void Rigidbody2DComponent_ApplyLinearImpulseToCenter(UUID entit...
function Rigidbody2DComponent_GetLinearVelocity (line 131) | static void Rigidbody2DComponent_GetLinearVelocity(UUID entityID, glm:...
function Rigidbody2DComponent_GetType (line 144) | static Rigidbody2DComponent::BodyType Rigidbody2DComponent_GetType(UUI...
function Rigidbody2DComponent_SetType (line 156) | static void Rigidbody2DComponent_SetType(UUID entityID, Rigidbody2DCom...
function MonoString (line 168) | static MonoString* TextComponent_GetText(UUID entityID)
function TextComponent_SetText (line 180) | static void TextComponent_SetText(UUID entityID, MonoString* textString)
function TextComponent_GetColor (line 192) | static void TextComponent_GetColor(UUID entityID, glm::vec4* color)
function TextComponent_SetColor (line 204) | static void TextComponent_SetColor(UUID entityID, glm::vec4* color)
function TextComponent_GetKerning (line 216) | static float TextComponent_GetKerning(UUID entityID)
function TextComponent_SetKerning (line 228) | static void TextComponent_SetKerning(UUID entityID, float kerning)
function TextComponent_GetLineSpacing (line 240) | static float TextComponent_GetLineSpacing(UUID entityID)
function TextComponent_SetLineSpacing (line 252) | static void TextComponent_SetLineSpacing(UUID entityID, float lineSpac...
function Input_IsKeyDown (line 264) | static bool Input_IsKeyDown(KeyCode keycode)
function RegisterComponent (line 270) | static void RegisterComponent()
function RegisterComponent (line 290) | static void RegisterComponent(ComponentGroup<Component...>)
FILE: Hazel/src/Hazel/Scripting/ScriptGlue.h
function namespace (line 3) | namespace Hazel {
FILE: Hazel/src/Hazel/Utils/PlatformUtils.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLBuffer.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLBuffer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLContext.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLContext.h
type GLFWwindow (line 5) | struct GLFWwindow
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLFramebuffer.cpp
type Hazel (line 6) | namespace Hazel {
type Utils (line 10) | namespace Utils {
function GLenum (line 12) | static GLenum TextureTarget(bool multisampled)
function CreateTextures (line 17) | static void CreateTextures(bool multisampled, uint32_t* outID, uint3...
function BindTexture (line 22) | static void BindTexture(bool multisampled, uint32_t id)
function AttachColorTexture (line 27) | static void AttachColorTexture(uint32_t id, int samples, GLenum inte...
function AttachDepthTexture (line 48) | static void AttachDepthTexture(uint32_t id, int samples, GLenum form...
function IsDepthFormat (line 69) | static bool IsDepthFormat(FramebufferTextureFormat format)
function GLenum (line 79) | static GLenum HazelFBTextureFormatToGL(FramebufferTextureFormat format)
FILE: Hazel/src/Platform/OpenGL/OpenGLFramebuffer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLRendererAPI.cpp
type Hazel (line 6) | namespace Hazel {
function OpenGLMessageCallback (line 8) | void OpenGLMessageCallback(
FILE: Hazel/src/Platform/OpenGL/OpenGLRendererAPI.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLShader.cpp
type Hazel (line 14) | namespace Hazel {
type Utils (line 16) | namespace Utils {
function GLenum (line 18) | static GLenum ShaderTypeFromString(const std::string& type)
function shaderc_shader_kind (line 29) | static shaderc_shader_kind GLShaderStageToShaderC(GLenum stage)
function CreateCacheDirectoryIfNeeded (line 57) | static void CreateCacheDirectoryIfNeeded()
FILE: Hazel/src/Platform/OpenGL/OpenGLShader.h
type GLenum (line 7) | typedef unsigned int GLenum;
function namespace (line 9) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLTexture.cpp
type Hazel (line 6) | namespace Hazel {
type Utils (line 8) | namespace Utils {
function GLenum (line 10) | static GLenum HazelImageFormatToGLDataFormat(ImageFormat format)
function GLenum (line 22) | static GLenum HazelImageFormatToGLInternalFormat(ImageFormat format)
FILE: Hazel/src/Platform/OpenGL/OpenGLTexture.h
function namespace (line 7) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLUniformBuffer.cpp
type Hazel (line 6) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLUniformBuffer.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/OpenGL/OpenGLVertexArray.cpp
type Hazel (line 6) | namespace Hazel {
function GLenum (line 8) | static GLenum ShaderDataTypeToOpenGLBaseType(ShaderDataType type)
FILE: Hazel/src/Platform/OpenGL/OpenGLVertexArray.h
function namespace (line 5) | namespace Hazel {
FILE: Hazel/src/Platform/Windows/WindowsInput.cpp
type Hazel (line 7) | namespace Hazel {
FILE: Hazel/src/Platform/Windows/WindowsPlatformUtils.cpp
type Hazel (line 10) | namespace Hazel {
FILE: Hazel/src/Platform/Windows/WindowsWindow.cpp
type Hazel (line 14) | namespace Hazel {
function GLFWErrorCallback (line 18) | static void GLFWErrorCallback(int error, const char* description)
FILE: Hazel/src/Platform/Windows/WindowsWindow.h
function namespace (line 8) | namespace Hazel {
FILE: Hazel/vendor/Glad/include/KHR/khrplatform.h
type khronos_int32_t (line 142) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 143) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 144) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 145) | typedef uint64_t khronos_uint64_t;
type khronos_int32_t (line 155) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 156) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 157) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 158) | typedef uint64_t khronos_uint64_t;
type __int32 (line 167) | typedef __int32 khronos_int32_t;
type khronos_uint32_t (line 168) | typedef unsigned __int32 khronos_uint32_t;
type __int64 (line 169) | typedef __int64 khronos_int64_t;
type khronos_uint64_t (line 170) | typedef unsigned __int64 khronos_uint64_t;
type khronos_int32_t (line 179) | typedef int khronos_int32_t;
type khronos_uint32_t (line 180) | typedef unsigned int khronos_uint32_t;
type khronos_int64_t (line 182) | typedef long int khronos_int64_t;
type khronos_uint64_t (line 183) | typedef unsigned long int khronos_uint64_t;
type khronos_int64_t (line 185) | typedef long long int khronos_int64_t;
type khronos_uint64_t (line 186) | typedef unsigned long long int khronos_uint64_t;
type khronos_int32_t (line 196) | typedef int khronos_int32_t;
type khronos_uint32_t (line 197) | typedef unsigned int khronos_uint32_t;
type khronos_int32_t (line 207) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 208) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 209) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 210) | typedef uint64_t khronos_uint64_t;
type khronos_int8_t (line 220) | typedef signed char khronos_int8_t;
type khronos_uint8_t (line 221) | typedef unsigned char khronos_uint8_t;
type khronos_int16_t (line 222) | typedef signed short int khronos_int16_t;
type khronos_uint16_t (line 223) | typedef unsigned short int khronos_uint16_t;
type khronos_intptr_t (line 231) | typedef signed long long int khronos_intptr_t;
type khronos_uintptr_t (line 232) | typedef unsigned long long int khronos_uintptr_t;
type khronos_ssize_t (line 233) | typedef signed long long int khronos_ssize_t;
type khronos_usize_t (line 234) | typedef unsigned long long int khronos_usize_t;
type khronos_intptr_t (line 236) | typedef signed long int khronos_intptr_t;
type khronos_uintptr_t (line 237) | typedef unsigned long int khronos_uintptr_t;
type khronos_ssize_t (line 238) | typedef signed long int khronos_ssize_t;
type khronos_usize_t (line 239) | typedef unsigned long int khronos_usize_t;
type khronos_float_t (line 246) | typedef float khronos_float_t;
type khronos_uint64_t (line 259) | typedef khronos_uint64_t khronos_utime_nanoseconds_t;
type khronos_int64_t (line 260) | typedef khronos_int64_t khronos_stime_nanoseconds_t;
type khronos_boolean_enum_t (line 276) | typedef enum {
FILE: Hazel/vendor/Glad/include/glad/glad.h
type gladGLversionStruct (line 56) | struct gladGLversionStruct {
type GLenum (line 96) | typedef unsigned int GLenum;
type GLboolean (line 97) | typedef unsigned char GLboolean;
type GLbitfield (line 98) | typedef unsigned int GLbitfield;
type GLvoid (line 99) | typedef void GLvoid;
type khronos_int8_t (line 100) | typedef khronos_int8_t GLbyte;
type khronos_uint8_t (line 101) | typedef khronos_uint8_t GLubyte;
type khronos_int16_t (line 102) | typedef khronos_int16_t GLshort;
type khronos_uint16_t (line 103) | typedef khronos_uint16_t GLushort;
type GLint (line 104) | typedef int GLint;
type GLuint (line 105) | typedef unsigned int GLuint;
type khronos_int32_t (line 106) | typedef khronos_int32_t GLclampx;
type GLsizei (line 107) | typedef int GLsizei;
type khronos_float_t (line 108) | typedef khronos_float_t GLfloat;
type khronos_float_t (line 109) | typedef khronos_float_t GLclampf;
type GLdouble (line 110) | typedef double GLdouble;
type GLclampd (line 111) | typedef double GLclampd;
type GLchar (line 114) | typedef char GLchar;
type GLcharARB (line 115) | typedef char GLcharARB;
type GLhandleARB (line 119) | typedef unsigned int GLhandleARB;
type khronos_uint16_t (line 121) | typedef khronos_uint16_t GLhalf;
type khronos_uint16_t (line 122) | typedef khronos_uint16_t GLhalfARB;
type khronos_int32_t (line 123) | typedef khronos_int32_t GLfixed;
type khronos_intptr_t (line 124) | typedef khronos_intptr_t GLintptr;
type khronos_intptr_t (line 125) | typedef khronos_intptr_t GLintptrARB;
type khronos_ssize_t (line 126) | typedef khronos_ssize_t GLsizeiptr;
type khronos_ssize_t (line 127) | typedef khronos_ssize_t GLsizeiptrARB;
type khronos_int64_t (line 128) | typedef khronos_int64_t GLint64;
type khronos_int64_t (line 129) | typedef khronos_int64_t GLint64EXT;
type khronos_uint64_t (line 130) | typedef khronos_uint64_t GLuint64;
type khronos_uint64_t (line 131) | typedef khronos_uint64_t GLuint64EXT;
type __GLsync (line 132) | struct __GLsync
type _cl_context (line 133) | struct _cl_context
type _cl_event (line 134) | struct _cl_event
type GLhalfNV (line 139) | typedef unsigned short GLhalfNV;
type GLintptr (line 140) | typedef GLintptr GLvdpauSurfaceNV;
type GLubyte (line 1630) | typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name);
type GLubyte (line 2319) | typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLu...
type const (line 2758) | typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint p...
type const (line 2761) | typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, G...
type const (line 3184) | typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint progr...
type const (line 3193) | typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint pro...
type const (line 3196) | typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuin...
FILE: Hazel/vendor/Glad/src/glad.c
function open_gl (line 53) | static
function close_gl (line 68) | static
function open_gl (line 84) | static
function close_gl (line 115) | static
function gladLoadGL (line 145) | int gladLoadGL(void) {
type gladGLversionStruct (line 156) | struct gladGLversionStruct
function get_exts (line 169) | static int get_exts(void) {
function free_exts (line 207) | static void free_exts(void) {
function has_ext (line 218) | static int has_ext(const char *ext) {
function load_GL_VERSION_1_0 (line 977) | static void load_GL_VERSION_1_0(GLADloadproc load) {
function load_GL_VERSION_1_1 (line 1028) | static void load_GL_VERSION_1_1(GLADloadproc load) {
function load_GL_VERSION_1_2 (line 1044) | static void load_GL_VERSION_1_2(GLADloadproc load) {
function load_GL_VERSION_1_3 (line 1051) | static void load_GL_VERSION_1_3(GLADloadproc load) {
function load_GL_VERSION_1_4 (line 1063) | static void load_GL_VERSION_1_4(GLADloadproc load) {
function load_GL_VERSION_1_5 (line 1075) | static void load_GL_VERSION_1_5(GLADloadproc load) {
function load_GL_VERSION_2_0 (line 1097) | static void load_GL_VERSION_2_0(GLADloadproc load) {
function load_GL_VERSION_2_1 (line 1193) | static void load_GL_VERSION_2_1(GLADloadproc load) {
function load_GL_VERSION_3_0 (line 1202) | static void load_GL_VERSION_3_0(GLADloadproc load) {
function load_GL_VERSION_3_1 (line 1289) | static void load_GL_VERSION_3_1(GLADloadproc load) {
function load_GL_VERSION_3_2 (line 1307) | static void load_GL_VERSION_3_2(GLADloadproc load) {
function load_GL_VERSION_3_3 (line 1329) | static void load_GL_VERSION_3_3(GLADloadproc load) {
function load_GL_VERSION_4_0 (line 1390) | static void load_GL_VERSION_4_0(GLADloadproc load) {
function load_GL_VERSION_4_1 (line 1439) | static void load_GL_VERSION_4_1(GLADloadproc load) {
function load_GL_VERSION_4_2 (line 1531) | static void load_GL_VERSION_4_2(GLADloadproc load) {
function load_GL_VERSION_4_3 (line 1546) | static void load_GL_VERSION_4_3(GLADloadproc load) {
function load_GL_VERSION_4_4 (line 1593) | static void load_GL_VERSION_4_4(GLADloadproc load) {
function load_GL_VERSION_4_5 (line 1605) | static void load_GL_VERSION_4_5(GLADloadproc load) {
function load_GL_VERSION_4_6 (line 1730) | static void load_GL_VERSION_4_6(GLADloadproc load) {
function find_extensionsGL (line 1737) | static int find_extensionsGL(void) {
function find_coreGL (line 1744) | static void find_coreGL(void) {
function gladLoadGLLoader (line 1805) | int gladLoadGLLoader(GLADloadproc load) {
FILE: Hazel/vendor/entt/include/entt.hpp
type entt (line 90) | namespace entt {
type identity (line 94) | struct identity {
method Type (line 102) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 1404) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 11008) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
function overload (line 116) | constexpr auto overload(Type Class:: *member) ENTT_NOEXCEPT { return m...
function overload (line 126) | constexpr auto overload(Func *func) ENTT_NOEXCEPT { return func; }
type overloaded (line 134) | struct overloaded: Func... {
type y_combinator (line 152) | struct y_combinator {
method y_combinator (line 157) | y_combinator(Func recursive):
method y_combinator (line 1459) | y_combinator(Func recursive):
method y_combinator (line 11063) | y_combinator(Func recursive):
type std_sort (line 201) | struct std_sort {
type insertion_sort (line 223) | struct insertion_sort {
type radix_sort (line 259) | struct radix_sort {
class family (line 399) | class family {
type internal (line 440) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
class basic_hashed_string (line 484) | class basic_hashed_string {
type const_wrapper (line 487) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 494) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 526) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 535) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 545) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 552) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 571) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 580) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 588) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 596) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 1757) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 1764) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 1796) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 1805) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 1815) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 1822) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 1841) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 1850) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 1858) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 1866) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 10445) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 10452) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 10484) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 10493) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 10503) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 10510) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 10529) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 10538) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 10546) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 10554) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 13889) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 13896) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 13928) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 13937) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 13947) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 13954) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 13973) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 13982) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 13990) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 13998) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 16174) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 16181) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 16213) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 16222) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 16232) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 16239) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 16258) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 16267) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 16275) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 16283) | constexpr hash_type value() const ENTT_NOEXCEPT {
class identifier (line 731) | class identifier {
method id_type (line 735) | static constexpr id_type get(std::index_sequence<Indexes...>) {
type monostate (line 781) | struct monostate {
type internal (line 878) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
function type_index (line 903) | struct ENTT_API type_index {
type has_type_index (line 921) | struct has_type_index: std::false_type {}
type has_type_index<Type, std::void_t<decltype(type_index<Type>::value())>> (line 926) | struct has_type_index<Type, std::void_t<decltype(type_index<Type>::val...
function type_info (line 942) | struct ENTT_API type_info {
type choice_t (line 1005) | struct choice_t
type choice_t<0> (line 1015) | struct choice_t<0> {}
type type_list (line 1028) | struct type_list {}
type type_list_size (line 1033) | struct type_list_size
type type_list_cat (line 1056) | struct type_list_cat
type type_list_cat<> (line 1061) | struct type_list_cat<> {
type type_list_unique (line 1101) | struct type_list_unique
type type_list_unique<type_list<>> (line 1122) | struct type_list_unique<type_list<>> {
type is_equality_comparable (line 1142) | struct is_equality_comparable: std::false_type {}
type is_equality_comparable<Type, std::void_t<decltype(std::declval<Type>() == std::declval<Type>())>> (line 1147) | struct is_equality_comparable<Type, std::void_t<decltype(std::declval<...
class member_class (line 1163) | class member_class {
type identity (line 1396) | struct identity {
method Type (line 102) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 1404) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 11008) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
function overload (line 1418) | constexpr auto overload(Type Class:: *member) ENTT_NOEXCEPT { return m...
function overload (line 1428) | constexpr auto overload(Func *func) ENTT_NOEXCEPT { return func; }
type overloaded (line 1436) | struct overloaded: Func... {
type y_combinator (line 1454) | struct y_combinator {
method y_combinator (line 157) | y_combinator(Func recursive):
method y_combinator (line 1459) | y_combinator(Func recursive):
method y_combinator (line 11063) | y_combinator(Func recursive):
type std_sort (line 1503) | struct std_sort {
type insertion_sort (line 1525) | struct insertion_sort {
type radix_sort (line 1561) | struct radix_sort {
type internal (line 1710) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
class basic_hashed_string (line 1754) | class basic_hashed_string {
type const_wrapper (line 487) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 494) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 526) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 535) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 545) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 552) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 571) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 580) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 588) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 596) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 1757) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 1764) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 1796) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 1805) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 1815) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 1822) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 1841) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 1850) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 1858) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 1866) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 10445) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 10452) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 10484) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 10493) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 10503) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 10510) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 10529) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 10538) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 10546) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 10554) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 13889) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 13896) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 13928) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 13937) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 13947) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 13954) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 13973) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 13982) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 13990) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 13998) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 16174) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 16181) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 16213) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 16222) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 16232) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 16239) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 16258) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 16267) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 16275) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 16283) | constexpr hash_type value() const ENTT_NOEXCEPT {
type internal (line 1968) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
function type_index (line 1993) | struct ENTT_API type_index {
type has_type_index (line 2011) | struct has_type_index: std::false_type {}
type has_type_index<Type, std::void_t<decltype(type_index<Type>::value())>> (line 2016) | struct has_type_index<Type, std::void_t<decltype(type_index<Type>::val...
function type_info (line 2032) | struct ENTT_API type_info {
type choice_t (line 2095) | struct choice_t
type choice_t<0> (line 2105) | struct choice_t<0> {}
type type_list (line 2118) | struct type_list {}
type type_list_size (line 2123) | struct type_list_size
type type_list_cat (line 2146) | struct type_list_cat
type type_list_cat<> (line 2151) | struct type_list_cat<> {
type type_list_unique (line 2191) | struct type_list_unique
type type_list_unique<type_list<>> (line 2212) | struct type_list_unique<type_list<>> {
type is_equality_comparable (line 2232) | struct is_equality_comparable: std::false_type {}
type is_equality_comparable<Type, std::void_t<decltype(std::declval<Type>() == std::declval<Type>())>> (line 2237) | struct is_equality_comparable<Type, std::void_t<decltype(std::declval<...
class member_class (line 2253) | class member_class {
type internal (line 2403) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
type connect_arg_t (line 2447) | struct connect_arg_t {}
class delegate (line 2462) | class delegate
class delegate (line 2723) | class delegate
class dispatcher (line 2726) | class dispatcher
type basic_pool (line 17047) | struct basic_pool {
type pool_handler (line 17055) | struct pool_handler final: basic_pool {
method publish (line 17059) | void publish() override {
method ENTT_NOEXCEPT (line 17069) | ENTT_NOEXCEPT override {
method sink_type (line 17073) | sink_type sink() ENTT_NOEXCEPT {
method trigger (line 17078) | void trigger(Args &&... args) {
method enqueue (line 17083) | void enqueue(Args &&... args) {
method ENTT_NOEXCEPT (line 17087) | ENTT_NOEXCEPT override {
method sink (line 17137) | auto sink() {
method trigger (line 17152) | void trigger(Args &&... args) {
method trigger (line 17166) | void trigger(Event &&event) {
method enqueue (line 17181) | void enqueue(Args &&... args) {
method enqueue (line 17195) | void enqueue(Event &&event) {
method clear (line 17208) | void clear() {
method update (line 17230) | void update() {
method update (line 17241) | void update() const {
class emitter (line 2730) | class emitter
type basic_pool (line 17306) | struct basic_pool {
type pool_handler (line 17314) | struct pool_handler final: basic_pool {
method ENTT_NOEXCEPT (line 17320) | ENTT_NOEXCEPT override {
method ENTT_NOEXCEPT (line 17327) | ENTT_NOEXCEPT override {
method connection_type (line 17342) | connection_type once(listener_type listener) {
method connection_type (line 17346) | connection_type on(listener_type listener) {
method erase (line 17350) | void erase(connection_type conn) {
method publish (line 17360) | void publish(const Event &event, Derived &ref) {
method ENTT_NOEXCEPT (line 17379) | ENTT_NOEXCEPT override {
type connection (line 17431) | struct connection: private pool_handler<Event>::connection_type {
method connection (line 17436) | connection() = default;
method connection (line 17442) | connection(typename pool_handler<Event>::connection_type conn)
method emitter (line 17448) | emitter() = default;
method emitter (line 17456) | emitter(emitter &&) = default;
method emitter (line 17459) | emitter & operator=(emitter &&) = default;
method publish (line 17473) | void publish(Args &&... args) {
method on (line 17498) | connection<Event> on(listener<Event> instance) {
method once (line 17523) | connection<Event> once(listener<Event> instance) {
method erase (line 17537) | void erase(connection<Event> conn) {
method clear (line 17550) | void clear() {
method empty (line 17574) | bool empty() const {
method empty (line 17582) | bool empty() const ENTT_NOEXCEPT {
class connection (line 2733) | class connection
method connection (line 2895) | connection(delegate<void(void *)> fn, void *ref)
method connection (line 2901) | connection() = default;
method release (line 2912) | void release() {
method connection (line 16669) | connection(delegate<void(void *)> fn, void *ref)
method connection (line 16675) | connection() = default;
method release (line 16686) | void release() {
type scoped_connection (line 2736) | struct scoped_connection
method scoped_connection (line 2936) | scoped_connection() = default;
method scoped_connection (line 2942) | scoped_connection(const connection &other)
method scoped_connection (line 2947) | scoped_connection(const scoped_connection &) = delete;
method scoped_connection (line 2958) | scoped_connection & operator=(const scoped_connection &) = delete;
method scoped_connection (line 2965) | scoped_connection & operator=(connection other) {
method release (line 2979) | void release() {
method scoped_connection (line 16710) | scoped_connection() = default;
method scoped_connection (line 16716) | scoped_connection(const connection &other)
method scoped_connection (line 16721) | scoped_connection(const scoped_connection &) = delete;
method scoped_connection (line 16732) | scoped_connection & operator=(const scoped_connection &) = delete;
method scoped_connection (line 16739) | scoped_connection & operator=(connection other) {
method release (line 16753) | void release() {
class sink (line 2740) | class sink
class sigh (line 2744) | class sigh
class sink (line 2766) | class sink
class sigh (line 2778) | class sigh
class connection (line 2890) | class connection {
method connection (line 2895) | connection(delegate<void(void *)> fn, void *ref)
method connection (line 2901) | connection() = default;
method release (line 2912) | void release() {
method connection (line 16669) | connection(delegate<void(void *)> fn, void *ref)
method connection (line 16675) | connection() = default;
method release (line 16686) | void release() {
type scoped_connection (line 2934) | struct scoped_connection {
method scoped_connection (line 2936) | scoped_connection() = default;
method scoped_connection (line 2942) | scoped_connection(const connection &other)
method scoped_connection (line 2947) | scoped_connection(const scoped_connection &) = delete;
method scoped_connection (line 2958) | scoped_connection & operator=(const scoped_connection &) = delete;
method scoped_connection (line 2965) | scoped_connection & operator=(connection other) {
method release (line 2979) | void release() {
method scoped_connection (line 16710) | scoped_connection() = default;
method scoped_connection (line 16716) | scoped_connection(const connection &other)
method scoped_connection (line 16721) | scoped_connection(const scoped_connection &) = delete;
method scoped_connection (line 16732) | scoped_connection & operator=(const scoped_connection &) = delete;
method scoped_connection (line 16739) | scoped_connection & operator=(connection other) {
method release (line 16753) | void release() {
type entt_traits (line 3280) | struct entt_traits
type entt_traits<std::uint16_t> (line 3292) | struct entt_traits<std::uint16_t> {
type entt_traits<std::uint32_t> (line 3318) | struct entt_traits<std::uint32_t> {
type entt_traits<std::uint64_t> (line 3344) | struct entt_traits<std::uint64_t> {
type internal (line 3367) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
class basic_registry (line 3454) | class basic_registry
type pool_handler (line 7405) | struct pool_handler final: storage<Entity, Component> {
method on_construct (line 7409) | auto on_construct() ENTT_NOEXCEPT {
method emplace (line 7422) | decltype(auto) emplace(basic_registry &owner, const Entity entt, A...
method insert (line 7432) | void insert(basic_registry &owner, It first, It last, Args &&... a...
method remove (line 7440) | void remove(basic_registry &owner, const Entity entt) {
method remove (line 7446) | void remove(basic_registry &owner, It first, It last) {
method patch (line 7459) | decltype(auto) patch(basic_registry &owner, const Entity entt, Fun...
method replace (line 7468) | decltype(auto) replace(basic_registry &owner, const Entity entt, [...
type pool_data (line 7482) | struct pool_data {
type group_handler (line 7489) | struct group_handler
type group_data (line 7531) | struct group_data {
type variable_data (line 7539) | struct variable_data {
method basic_registry (line 7597) | basic_registry() = default;
method basic_registry (line 7600) | basic_registry(basic_registry &&) = default;
method basic_registry (line 7603) | basic_registry & operator=(basic_registry &&) = default;
method prepare (line 7610) | void prepare() {
method size_type (line 7620) | size_type size() const {
method size_type (line 7628) | size_type size() const ENTT_NOEXCEPT {
method size_type (line 7636) | size_type alive() const {
method reserve (line 7661) | void reserve(const size_type cap) {
method size_type (line 7675) | size_type capacity() const {
method size_type (line 7684) | size_type capacity() const ENTT_NOEXCEPT {
method shrink_to_fit (line 7694) | void shrink_to_fit() {
method empty (line 7710) | bool empty() const {
method Component (line 7736) | const Component * raw() const {
method Component (line 7742) | Component * raw() {
method entity_type (line 7760) | const entity_type * data() const {
method entity_type (line 7776) | const entity_type * data() const ENTT_NOEXCEPT {
method valid (line 7785) | bool valid(const entity_type entity) const {
method entity_type (line 7795) | static entity_type entity(const entity_type entity) ENTT_NOEXCEPT {
method version_type (line 7804) | static version_type version(const entity_type entity) ENTT_NOEXCEPT {
method version_type (line 7821) | version_type current(const entity_type entity) const {
method entity_type (line 7837) | entity_type create() {
method entity_type (line 7865) | entity_type create(const entity_type hint) {
method create (line 7900) | void create(It first, It last) {
method assign (line 7920) | void assign(It first, It last) {
method destroy (line 7944) | void destroy(const entity_type entity) {
method destroy (line 7959) | void destroy(const entity_type entity, const version_type version) {
method destroy (line 7977) | void destroy(It first, It last) {
method emplace (line 8002) | decltype(auto) emplace(const entity_type entity, Args &&... args) {
method assign (line 8009) | [[deprecated("use ::emplace instead")]]
method insert (line 8026) | void insert(It first, It last, const Component &value = {}) {
method assign (line 8033) | [[deprecated("use ::insert instead")]]
method insert (line 8053) | void insert(EIt first, EIt last, CIt from, CIt to) {
method assign (line 8061) | [[deprecated("use ::insert instead")]]
method emplace_or_replace (line 8090) | decltype(auto) emplace_or_replace(const entity_type entity, Args &&....
method assign_or_replace (line 8101) | [[deprecated("use ::emplace_or_replace instead")]]
method patch (line 8134) | decltype(auto) patch(const entity_type entity, Func &&... func) {
method replace (line 8141) | [[deprecated("use registry::patch instead")]]
class basic_view (line 3458) | class basic_view
class basic_runtime_view (line 3462) | class basic_runtime_view
class view_iterator (line 5786) | class view_iterator final {
method view_iterator (line 5791) | view_iterator(const direct_type &all, underlying_iterator curr) EN...
method valid (line 5800) | bool valid() const {
method view_iterator (line 5813) | view_iterator() ENTT_NOEXCEPT = default;
method view_iterator (line 5815) | view_iterator & operator++() {
method view_iterator (line 5820) | view_iterator operator++(int) {
method view_iterator (line 5825) | view_iterator & operator--() ENTT_NOEXCEPT {
method view_iterator (line 5830) | view_iterator operator--(int) ENTT_NOEXCEPT {
method pointer (line 5843) | pointer operator->() const {
method reference (line 5847) | reference operator*() const {
method basic_runtime_view (line 5856) | basic_runtime_view(std::vector<const sparse_set<Entity> *> others) E...
method valid (line 5867) | bool valid() const {
method size_type (line 5883) | size_type size() const {
method empty (line 5891) | bool empty() const {
method iterator (line 5909) | iterator begin() const {
method iterator (line 5934) | iterator end() const {
method contains (line 5949) | bool contains(const entity_type entt) const {
method each (line 5971) | void each(Func func) const {
class basic_group (line 3466) | class basic_group
class basic_observer (line 3470) | class basic_observer
type matcher_handler (line 9695) | struct matcher_handler
method disconnect (line 9774) | static void disconnect(basic_observer &obs, basic_registry<Entity> &...
method connect (line 9779) | void connect(basic_registry<Entity> ®, std::index_sequence<Index....
method basic_observer (line 9794) | basic_observer()
method basic_observer (line 9799) | basic_observer(const basic_observer &) = delete;
method basic_observer (line 9801) | basic_observer(basic_observer &&) = delete;
method basic_observer (line 9809) | basic_observer(basic_registry<entity_type> ®, basic_collector<Mat...
method basic_observer (line 9824) | basic_observer & operator=(const basic_observer &) = delete;
method basic_observer (line 9830) | basic_observer & operator=(basic_observer &&) = delete;
method connect (line 9838) | void connect(basic_registry<entity_type> ®, basic_collector<Match...
method disconnect (line 9846) | void disconnect() {
method size_type (line 9857) | size_type size() const ENTT_NOEXCEPT {
method empty (line 9865) | bool empty() const ENTT_NOEXCEPT {
method entity_type (line 9881) | const entity_type * data() const ENTT_NOEXCEPT {
method iterator (line 9893) | iterator begin() const ENTT_NOEXCEPT {
method iterator (line 9907) | iterator end() const ENTT_NOEXCEPT {
method each (line 9930) | void each(Func func) const {
method each (line 9948) | void each(Func func) {
type basic_actor (line 3474) | struct basic_actor
method basic_actor (line 9177) | basic_actor() ENTT_NOEXCEPT
method basic_actor (line 9190) | basic_actor(basic_actor &&other) ENTT_NOEXCEPT
method basic_actor (line 9200) | explicit basic_actor(registry_type &ref)
method basic_actor (line 9209) | explicit basic_actor(entity_type entity, registry_type &ref) ENTT_NO...
method basic_actor (line 9232) | basic_actor & operator=(basic_actor &&other) ENTT_NOEXCEPT {
method assign (line 9257) | decltype(auto) assign(Args &&... args) {
method remove (line 9266) | void remove() {
method has (line 9276) | bool has() const {
method get (line 9286) | decltype(auto) get() const {
method get (line 9292) | decltype(auto) get() {
method try_get (line 9302) | auto try_get() const {
method try_get (line 9308) | auto try_get() {
method registry_type (line 9316) | const registry_type & backend() const ENTT_NOEXCEPT {
method registry_type (line 9321) | registry_type & backend() ENTT_NOEXCEPT {
method entity_type (line 9329) | entity_type entity() const ENTT_NOEXCEPT {
class basic_snapshot (line 3478) | class basic_snapshot
method get (line 6028) | void get(Archive &archive, std::size_t sz, It first, It last) const {
method component (line 6045) | void component(Archive &archive, It first, It last, std::index_seque...
method basic_snapshot (line 6065) | basic_snapshot(const basic_registry<entity_type> &source) ENTT_NOEXCEPT
method basic_snapshot (line 6070) | basic_snapshot(basic_snapshot &&) = default;
method basic_snapshot (line 6073) | basic_snapshot & operator=(basic_snapshot &&) = default;
method basic_snapshot (line 6086) | const basic_snapshot & entities(Archive &archive) const {
method basic_snapshot (line 6106) | [[deprecated("use ::entities instead, it exports now also destroyed ...
method basic_snapshot (line 6121) | const basic_snapshot & component(Archive &archive) const {
method basic_snapshot (line 6141) | const basic_snapshot & component(Archive &archive, It first, It last...
class basic_snapshot_loader (line 3482) | class basic_snapshot_loader
method assign (line 6169) | void assign(Archive &archive, Args... args) const {
method basic_snapshot_loader (line 6199) | basic_snapshot_loader(basic_registry<entity_type> &source) ENTT_NOEX...
method basic_snapshot_loader (line 6207) | basic_snapshot_loader(basic_snapshot_loader &&) = default;
method basic_snapshot_loader (line 6210) | basic_snapshot_loader & operator=(basic_snapshot_loader &&) = default;
method basic_snapshot_loader (line 6223) | const basic_snapshot_loader & entities(Archive &archive) const {
method basic_snapshot_loader (line 6244) | [[deprecated("use ::entities instead, it imports now also destroyed ...
method basic_snapshot_loader (line 6261) | const basic_snapshot_loader & component(Archive &archive) const {
method basic_snapshot_loader (line 6276) | const basic_snapshot_loader & orphans() const {
class basic_continuous_loader (line 3486) | class basic_continuous_loader
method destroy (line 6309) | void destroy(Entity entt) {
method restore (line 6319) | void restore(Entity entt) {
method update (line 6333) | auto update(int, Container &container)
method update (line 6356) | auto update(char, Container &container)
method update (line 6367) | void update([[maybe_unused]] Other &instance, [[maybe_unused]] Membe...
method remove_if_exists (line 6379) | void remove_if_exists() {
method assign (line 6390) | void assign(Archive &archive, [[maybe_unused]] Member Type:: *... me...
method basic_continuous_loader (line 6419) | basic_continuous_loader(basic_registry<entity_type> &source) ENTT_NO...
method basic_continuous_loader (line 6424) | basic_continuous_loader(basic_continuous_loader &&) = default;
method basic_continuous_loader (line 6427) | basic_continuous_loader & operator=(basic_continuous_loader &&) = de...
method basic_continuous_loader (line 6440) | basic_continuous_loader & entities(Archive &archive) {
method basic_continuous_loader (line 6465) | [[deprecated("use ::entities instead, it imports now also destroyed ...
method basic_continuous_loader (line 6488) | basic_continuous_loader & component(Archive &archive, Member Type:: ...
method basic_continuous_loader (line 6502) | basic_continuous_loader & shrink() {
method basic_continuous_loader (line 6534) | basic_continuous_loader & orphans() {
method contains (line 6547) | bool contains(entity_type entt) const ENTT_NOEXCEPT {
method has (line 6552) | [[deprecated("use ::contains instead")]]
method entity_type (line 6562) | entity_type map(entity_type entt) const ENTT_NOEXCEPT {
type entity (line 3489) | enum class entity: id_type
class sparse_set (line 3596) | class sparse_set {
class sparse_set_iterator (line 3603) | class sparse_set_iterator final {
method sparse_set_iterator (line 3609) | sparse_set_iterator(const packed_type &ref, const index_type idx) ...
method sparse_set_iterator (line 3620) | sparse_set_iterator() ENTT_NOEXCEPT = default;
method sparse_set_iterator (line 3622) | sparse_set_iterator & operator++() ENTT_NOEXCEPT {
method sparse_set_iterator (line 3626) | sparse_set_iterator operator++(int) ENTT_NOEXCEPT {
method sparse_set_iterator (line 3631) | sparse_set_iterator & operator--() ENTT_NOEXCEPT {
method sparse_set_iterator (line 3635) | sparse_set_iterator operator--(int) ENTT_NOEXCEPT {
method sparse_set_iterator (line 3640) | sparse_set_iterator & operator+=(const difference_type value) ENTT...
method sparse_set_iterator (line 3645) | sparse_set_iterator operator+(const difference_type value) const E...
method sparse_set_iterator (line 3650) | sparse_set_iterator & operator-=(const difference_type value) ENTT...
method sparse_set_iterator (line 3654) | sparse_set_iterator operator-(const difference_type value) const E...
method difference_type (line 3658) | difference_type operator-(const sparse_set_iterator &other) const ...
method reference (line 3662) | reference operator[](const difference_type value) const {
method pointer (line 3691) | pointer operator->() const {
method reference (line 3696) | reference operator*() const {
method page (line 3705) | auto page(const Entity entt) const ENTT_NOEXCEPT {
method offset (line 3709) | auto offset(const Entity entt) const ENTT_NOEXCEPT {
method page_type (line 3713) | page_type & assure(const std::size_t pos) {
method sparse_set (line 3738) | sparse_set() = default;
method sparse_set (line 3741) | sparse_set(sparse_set &&) = default;
method sparse_set (line 3747) | sparse_set & operator=(sparse_set &&) = default;
method reserve (line 3757) | void reserve(const size_type cap) {
method size_type (line 3766) | size_type capacity() const ENTT_NOEXCEPT {
method shrink_to_fit (line 3771) | void shrink_to_fit() {
method size_type (line 3791) | size_type extent() const ENTT_NOEXCEPT {
method size_type (line 3805) | size_type size() const ENTT_NOEXCEPT {
method empty (line 3813) | bool empty() const ENTT_NOEXCEPT {
method entity_type (line 3832) | const entity_type * data() const ENTT_NOEXCEPT {
method iterator (line 3849) | iterator begin() const ENTT_NOEXCEPT {
method iterator (line 3868) | iterator end() const ENTT_NOEXCEPT {
method iterator (line 3878) | iterator find(const entity_type entt) const {
method contains (line 3887) | bool contains(const entity_type entt) const {
method has (line 3894) | [[deprecated("use ::contains instead")]]
method size_type (line 3911) | size_type index(const entity_type entt) const {
method emplace (line 3927) | void emplace(const entity_type entt) {
method construct (line 3934) | [[deprecated("use ::emplace instead")]]
method insert (line 3953) | void insert(It first, It last) {
method construct (line 3966) | [[deprecated("use ::insert instead")]]
method erase (line 3982) | void erase(const entity_type entt) {
method destroy (line 3993) | [[deprecated("use ::erase instead")]]
method swap (line 4013) | virtual void swap(const entity_type lhs, const entity_type rhs) {
method sort (line 4060) | void sort(iterator first, iterator last, Compare compare, Sort algo ...
method arrange (line 4104) | void arrange(iterator first, iterator last, Apply apply, Compare com...
method respect (line 4149) | void respect(const sparse_set &other) {
class storage (line 4240) | class storage: public sparse_set<Entity> {
class storage_iterator (line 4248) | class storage_iterator final {
method storage_iterator (line 4254) | storage_iterator(instance_type &ref, const index_type idx) ENTT_NO...
method storage_iterator (line 4265) | storage_iterator() ENTT_NOEXCEPT = default;
method storage_iterator (line 4267) | storage_iterator & operator++() ENTT_NOEXCEPT {
method storage_iterator (line 4271) | storage_iterator operator++(int) ENTT_NOEXCEPT {
method storage_iterator (line 4276) | storage_iterator & operator--() ENTT_NOEXCEPT {
method storage_iterator (line 4280) | storage_iterator operator--(int) ENTT_NOEXCEPT {
method storage_iterator (line 4285) | storage_iterator & operator+=(const difference_type value) ENTT_NO...
method storage_iterator (line 4290) | storage_iterator operator+(const difference_type value) const ENTT...
method storage_iterator (line 4295) | storage_iterator & operator-=(const difference_type value) ENTT_NO...
method storage_iterator (line 4299) | storage_iterator operator-(const difference_type value) const ENTT...
method difference_type (line 4303) | difference_type operator-(const storage_iterator &other) const ENT...
method reference (line 4307) | reference operator[](const difference_type value) const ENTT_NOEXC...
method pointer (line 4336) | pointer operator->() const ENTT_NOEXCEPT {
method reference (line 4341) | reference operator*() const ENTT_NOEXCEPT {
method reserve (line 4370) | void reserve(const size_type cap) {
method shrink_to_fit (line 4376) | void shrink_to_fit() {
method object_type (line 4396) | const object_type * raw() const ENTT_NOEXCEPT {
method object_type (line 4401) | object_type * raw() ENTT_NOEXCEPT {
method const_iterator (line 4417) | const_iterator cbegin() const ENTT_NOEXCEPT {
method const_iterator (line 4423) | const_iterator begin() const ENTT_NOEXCEPT {
method iterator (line 4428) | iterator begin() ENTT_NOEXCEPT {
method const_iterator (line 4447) | const_iterator cend() const ENTT_NOEXCEPT {
method const_iterator (line 4452) | const_iterator end() const ENTT_NOEXCEPT {
method iterator (line 4457) | iterator end() ENTT_NOEXCEPT {
method object_type (line 4473) | const object_type & get(const entity_type entt) const {
method object_type (line 4478) | object_type & get(const entity_type entt) {
method object_type (line 4487) | const object_type * try_get(const entity_type entt) const {
method object_type (line 4492) | object_type * try_get(const entity_type entt) {
method emplace (line 4514) | void emplace(const entity_type entt, Args &&... args) {
method construct (line 4527) | [[deprecated("use ::emplace instead")]]
method insert (line 4548) | void insert(It first, It last, const object_type &value = {}) {
method construct (line 4556) | [[deprecated("use ::insert instead")]]
method insert (line 4576) | void insert(EIt first, EIt last, CIt from, CIt to) {
method construct (line 4584) | [[deprecated("use ::insert instead")]]
method erase (line 4601) | void erase(const entity_type entt) {
method destroy (line 4609) | [[deprecated("use ::erase instead")]]
method swap (line 4626) | void swap(const entity_type lhs, const entity_type rhs) override {
method sort (line 4677) | void sort(iterator first, iterator last, Compare compare, Sort algo ...
method clear (line 4698) | void clear() {
class storage<Entity, Type, std::enable_if_t<ENTT_IS_EMPTY(Type)>> (line 4710) | class storage<Entity, Type, std::enable_if_t<ENTT_IS_EMPTY(Type)>>: pu...
method emplace (line 4736) | void emplace(const entity_type entt, Args &&... args) {
method construct (line 4743) | [[deprecated("use ::emplace instead")]]
method insert (line 4762) | void insert(It first, It last, const object_type & = {}) {
method construct (line 4771) | [[deprecated("use ::insert instead")]]
type exclude_t (line 4801) | struct exclude_t: type_list<Type...> {}
type get_t (line 4817) | struct get_t: type_list<Type...>{}
class basic_group (line 4849) | class basic_group
class basic_runtime_view (line 5780) | class basic_runtime_view {
class view_iterator (line 5786) | class view_iterator final {
method view_iterator (line 5791) | view_iterator(const direct_type &all, underlying_iterator curr) EN...
method valid (line 5800) | bool valid() const {
method view_iterator (line 5813) | view_iterator() ENTT_NOEXCEPT = default;
method view_iterator (line 5815) | view_iterator & operator++() {
method view_iterator (line 5820) | view_iterator operator++(int) {
method view_iterator (line 5825) | view_iterator & operator--() ENTT_NOEXCEPT {
method view_iterator (line 5830) | view_iterator operator--(int) ENTT_NOEXCEPT {
method pointer (line 5843) | pointer operator->() const {
method reference (line 5847) | reference operator*() const {
method basic_runtime_view (line 5856) | basic_runtime_view(std::vector<const sparse_set<Entity> *> others) E...
method valid (line 5867) | bool valid() const {
method size_type (line 5883) | size_type size() const {
method empty (line 5891) | bool empty() const {
method iterator (line 5909) | iterator begin() const {
method iterator (line 5934) | iterator end() const {
method contains (line 5949) | bool contains(const entity_type entt) const {
method each (line 5971) | void each(Func func) const {
class basic_snapshot (line 6021) | class basic_snapshot {
method get (line 6028) | void get(Archive &archive, std::size_t sz, It first, It last) const {
method component (line 6045) | void component(Archive &archive, It first, It last, std::index_seque...
method basic_snapshot (line 6065) | basic_snapshot(const basic_registry<entity_type> &source) ENTT_NOEXCEPT
method basic_snapshot (line 6070) | basic_snapshot(basic_snapshot &&) = default;
method basic_snapshot (line 6073) | basic_snapshot & operator=(basic_snapshot &&) = default;
method basic_snapshot (line 6086) | const basic_snapshot & entities(Archive &archive) const {
method basic_snapshot (line 6106) | [[deprecated("use ::entities instead, it exports now also destroyed ...
method basic_snapshot (line 6121) | const basic_snapshot & component(Archive &archive) const {
method basic_snapshot (line 6141) | const basic_snapshot & component(Archive &archive, It first, It last...
class basic_snapshot_loader (line 6162) | class basic_snapshot_loader {
method assign (line 6169) | void assign(Archive &archive, Args... args) const {
method basic_snapshot_loader (line 6199) | basic_snapshot_loader(basic_registry<entity_type> &source) ENTT_NOEX...
method basic_snapshot_loader (line 6207) | basic_snapshot_loader(basic_snapshot_loader &&) = default;
method basic_snapshot_loader (line 6210) | basic_snapshot_loader & operator=(basic_snapshot_loader &&) = default;
method basic_snapshot_loader (line 6223) | const basic_snapshot_loader & entities(Archive &archive) const {
method basic_snapshot_loader (line 6244) | [[deprecated("use ::entities instead, it imports now also destroyed ...
method basic_snapshot_loader (line 6261) | const basic_snapshot_loader & component(Archive &archive) const {
method basic_snapshot_loader (line 6276) | const basic_snapshot_loader & orphans() const {
class basic_continuous_loader (line 6306) | class basic_continuous_loader {
method destroy (line 6309) | void destroy(Entity entt) {
method restore (line 6319) | void restore(Entity entt) {
method update (line 6333) | auto update(int, Container &container)
method update (line 6356) | auto update(char, Container &container)
method update (line 6367) | void update([[maybe_unused]] Other &instance, [[maybe_unused]] Membe...
method remove_if_exists (line 6379) | void remove_if_exists() {
method assign (line 6390) | void assign(Archive &archive, [[maybe_unused]] Member Type:: *... me...
method basic_continuous_loader (line 6419) | basic_continuous_loader(basic_registry<entity_type> &source) ENTT_NO...
method basic_continuous_loader (line 6424) | basic_continuous_loader(basic_continuous_loader &&) = default;
method basic_continuous_loader (line 6427) | basic_continuous_loader & operator=(basic_continuous_loader &&) = de...
method basic_continuous_loader (line 6440) | basic_continuous_loader & entities(Archive &archive) {
method basic_continuous_loader (line 6465) | [[deprecated("use ::entities instead, it imports now also destroyed ...
method basic_continuous_loader (line 6488) | basic_continuous_loader & component(Archive &archive, Member Type:: ...
method basic_continuous_loader (line 6502) | basic_continuous_loader & shrink() {
method basic_continuous_loader (line 6534) | basic_continuous_loader & orphans() {
method contains (line 6547) | bool contains(entity_type entt) const ENTT_NOEXCEPT {
method has (line 6552) | [[deprecated("use ::contains instead")]]
method entity_type (line 6562) | entity_type map(entity_type entt) const ENTT_NOEXCEPT {
class basic_view (line 6627) | class basic_view
class basic_view<Entity, exclude_t<>, Component> (line 7143) | class basic_view<Entity, exclude_t<>, Component> {
method basic_view (line 7149) | basic_view(pool_type &ref) ENTT_NOEXCEPT
method size_type (line 7167) | size_type size() const ENTT_NOEXCEPT {
method empty (line 7175) | bool empty() const ENTT_NOEXCEPT {
method raw_type (line 7191) | raw_type * raw() const ENTT_NOEXCEPT {
method entity_type (line 7207) | const entity_type * data() const ENTT_NOEXCEPT {
method iterator (line 7225) | iterator begin() const ENTT_NOEXCEPT {
method iterator (line 7244) | iterator end() const ENTT_NOEXCEPT {
method entity_type (line 7253) | entity_type front() const {
method entity_type (line 7263) | entity_type back() const {
method iterator (line 7274) | iterator find(const entity_type entt) const {
method entity_type (line 7284) | entity_type operator[](const size_type pos) const {
method contains (line 7293) | bool contains(const entity_type entt) const {
method get (line 7313) | decltype(auto) get(const entity_type entt) const {
method each (line 7342) | void each(Func func) const {
method less (line 7370) | [[deprecated("use ::each instead")]]
class basic_registry (line 7401) | class basic_registry {
type pool_handler (line 7405) | struct pool_handler final: storage<Entity, Component> {
method on_construct (line 7409) | auto on_construct() ENTT_NOEXCEPT {
method emplace (line 7422) | decltype(auto) emplace(basic_registry &owner, const Entity entt, A...
method insert (line 7432) | void insert(basic_registry &owner, It first, It last, Args &&... a...
method remove (line 7440) | void remove(basic_registry &owner, const Entity entt) {
method remove (line 7446) | void remove(basic_registry &owner, It first, It last) {
method patch (line 7459) | decltype(auto) patch(basic_registry &owner, const Entity entt, Fun...
method replace (line 7468) | decltype(auto) replace(basic_registry &owner, const Entity entt, [...
type pool_data (line 7482) | struct pool_data {
type group_handler (line 7489) | struct group_handler
type group_data (line 7531) | struct group_data {
type variable_data (line 7539) | struct variable_data {
method basic_registry (line 7597) | basic_registry() = default;
method basic_registry (line 7600) | basic_registry(basic_registry &&) = default;
method basic_registry (line 7603) | basic_registry & operator=(basic_registry &&) = default;
method prepare (line 7610) | void prepare() {
method size_type (line 7620) | size_type size() const {
method size_type (line 7628) | size_type size() const ENTT_NOEXCEPT {
method size_type (line 7636) | size_type alive() const {
method reserve (line 7661) | void reserve(const size_type cap) {
method size_type (line 7675) | size_type capacity() const {
method size_type (line 7684) | size_type capacity() const ENTT_NOEXCEPT {
method shrink_to_fit (line 7694) | void shrink_to_fit() {
method empty (line 7710) | bool empty() const {
method Component (line 7736) | const Component * raw() const {
method Component (line 7742) | Component * raw() {
method entity_type (line 7760) | const entity_type * data() const {
method entity_type (line 7776) | const entity_type * data() const ENTT_NOEXCEPT {
method valid (line 7785) | bool valid(const entity_type entity) const {
method entity_type (line 7795) | static entity_type entity(const entity_type entity) ENTT_NOEXCEPT {
method version_type (line 7804) | static version_type version(const entity_type entity) ENTT_NOEXCEPT {
method version_type (line 7821) | version_type current(const entity_type entity) const {
method entity_type (line 7837) | entity_type create() {
method entity_type (line 7865) | entity_type create(const entity_type hint) {
method create (line 7900) | void create(It first, It last) {
method assign (line 7920) | void assign(It first, It last) {
method destroy (line 7944) | void destroy(const entity_type entity) {
method destroy (line 7959) | void destroy(const entity_type entity, const version_type version) {
method destroy (line 7977) | void destroy(It first, It last) {
method emplace (line 8002) | decltype(auto) emplace(const entity_type entity, Args &&... args) {
method assign (line 8009) | [[deprecated("use ::emplace instead")]]
method insert (line 8026) | void insert(It first, It last, const Component &value = {}) {
method assign (line 8033) | [[deprecated("use ::insert instead")]]
method insert (line 8053) | void insert(EIt first, EIt last, CIt from, CIt to) {
method assign (line 8061) | [[deprecated("use ::insert instead")]]
method emplace_or_replace (line 8090) | decltype(auto) emplace_or_replace(const entity_type entity, Args &&....
method assign_or_replace (line 8101) | [[deprecated("use ::emplace_or_replace instead")]]
method patch (line 8134) | decltype(auto) patch(const entity_type entity, Func &&... func) {
method replace (line 8141) | [[deprecated("use registry::patch instead")]]
type basic_actor (line 9171) | struct basic_actor {
method basic_actor (line 9177) | basic_actor() ENTT_NOEXCEPT
method basic_actor (line 9190) | basic_actor(basic_actor &&other) ENTT_NOEXCEPT
method basic_actor (line 9200) | explicit basic_actor(registry_type &ref)
method basic_actor (line 9209) | explicit basic_actor(entity_type entity, registry_type &ref) ENTT_NO...
method basic_actor (line 9232) | basic_actor & operator=(basic_actor &&other) ENTT_NOEXCEPT {
method assign (line 9257) | decltype(auto) assign(Args &&... args) {
method remove (line 9266) | void remove() {
method has (line 9276) | bool has() const {
method get (line 9286) | decltype(auto) get() const {
method get (line 9292) | decltype(auto) get() {
method try_get (line 9302) | auto try_get() const {
method try_get (line 9308) | auto try_get() {
method registry_type (line 9316) | const registry_type & backend() const ENTT_NOEXCEPT {
method registry_type (line 9321) | registry_type & backend() ENTT_NOEXCEPT {
method entity_type (line 9329) | entity_type entity() const ENTT_NOEXCEPT {
type as_view (line 9383) | struct as_view {
method as_view (line 9391) | as_view(registry_type &source) ENTT_NOEXCEPT: reg{source} {}
type as_group (line 9432) | struct as_group {
method as_group (line 9440) | as_group(registry_type &source) ENTT_NOEXCEPT: reg{source} {}
function invoke (line 9485) | void invoke(basic_registry<Entity> ®, const Entity entt) {
type matcher (line 9529) | struct matcher {}
type basic_collector (line 9539) | struct basic_collector
type basic_collector<> (line 9551) | struct basic_collector<> {
method group (line 9559) | static constexpr auto group(exclude_t<NoneOf...> = {}) ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 9569) | static constexpr auto update() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 9575) | [[deprecated("use ::update instead")]]
class basic_observer (line 9691) | class basic_observer {
type matcher_handler (line 9695) | struct matcher_handler
method disconnect (line 9774) | static void disconnect(basic_observer &obs, basic_registry<Entity> &...
method connect (line 9779) | void connect(basic_registry<Entity> ®, std::index_sequence<Index....
method basic_observer (line 9794) | basic_observer()
method basic_observer (line 9799) | basic_observer(const basic_observer &) = delete;
method basic_observer (line 9801) | basic_observer(basic_observer &&) = delete;
method basic_observer (line 9809) | basic_observer(basic_registry<entity_type> ®, basic_collector<Mat...
method basic_observer (line 9824) | basic_observer & operator=(const basic_observer &) = delete;
method basic_observer (line 9830) | basic_observer & operator=(basic_observer &&) = delete;
method connect (line 9838) | void connect(basic_registry<entity_type> ®, basic_collector<Match...
method disconnect (line 9846) | void disconnect() {
method size_type (line 9857) | size_type size() const ENTT_NOEXCEPT {
method empty (line 9865) | bool empty() const ENTT_NOEXCEPT {
method entity_type (line 9881) | const entity_type * data() const ENTT_NOEXCEPT {
method iterator (line 9893) | iterator begin() const ENTT_NOEXCEPT {
method iterator (line 9907) | iterator end() const ENTT_NOEXCEPT {
method each (line 9930) | void each(Func func) const {
method each (line 9948) | void each(Func func) {
type service_locator (line 10074) | struct service_locator {
method service_locator (line 10079) | service_locator() = delete;
method Service (line 10119) | static Service & ref() ENTT_NOEXCEPT {
method set (line 10130) | static void set(Args &&... args) {
method set (line 10138) | static void set(std::shared_ptr<Service> ptr) {
method reset (line 10148) | static void reset() {
type internal (line 10398) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
class basic_hashed_string (line 10442) | class basic_hashed_string {
type const_wrapper (line 487) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 494) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 526) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 535) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 545) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 552) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 571) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 580) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 588) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 596) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 1757) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 1764) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 1796) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 1805) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 1815) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 1822) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 1841) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 1850) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 1858) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 1866) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 10445) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 10452) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 10484) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 10493) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 10503) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 10510) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 10529) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 10538) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 10546) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 10554) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 13889) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 13896) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 13928) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 13937) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 13947) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 13954) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 13973) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 13982) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 13990) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 13998) | constexpr hash_type value() const ENTT_NOEXCEPT {
type const_wrapper (line 16174) | struct const_wrapper {
method const_wrapper (line 489) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 1759) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 10447) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 13891) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method const_wrapper (line 16176) | constexpr const_wrapper(const Char *curr) ENTT_NOEXCEPT: str{curr} {}
method id_type (line 16181) | static constexpr id_type helper(const Char *curr) ENTT_NOEXCEPT {
method hash_type (line 16213) | static constexpr hash_type value(const value_type (&str)[N]) ENTT_NO...
method hash_type (line 16222) | static hash_type value(const_wrapper wrapper) ENTT_NOEXCEPT {
method hash_type (line 16232) | static hash_type value(const value_type *str, std::size_t size) ENTT...
method basic_hashed_string (line 16239) | constexpr basic_hashed_string() ENTT_NOEXCEPT
method basic_hashed_string (line 16258) | constexpr basic_hashed_string(const value_type (&curr)[N]) ENTT_NOEX...
method basic_hashed_string (line 16267) | explicit constexpr basic_hashed_string(const_wrapper wrapper) ENTT_N...
method value_type (line 16275) | constexpr const value_type * data() const ENTT_NOEXCEPT {
method hash_type (line 16283) | constexpr hash_type value() const ENTT_NOEXCEPT {
type internal (line 10656) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
function type_index (line 10681) | struct ENTT_API type_index {
type has_type_index (line 10699) | struct has_type_index: std::false_type {}
type has_type_index<Type, std::void_t<decltype(type_index<Type>::value())>> (line 10704) | struct has_type_index<Type, std::void_t<decltype(type_index<Type>::val...
function type_info (line 10720) | struct ENTT_API type_info {
type choice_t (line 10783) | struct choice_t
type choice_t<0> (line 10793) | struct choice_t<0> {}
type type_list (line 10806) | struct type_list {}
type type_list_size (line 10811) | struct type_list_size
type type_list_cat (line 10834) | struct type_list_cat
type type_list_cat<> (line 10839) | struct type_list_cat<> {
type type_list_unique (line 10879) | struct type_list_unique
type type_list_unique<type_list<>> (line 10900) | struct type_list_unique<type_list<>> {
type is_equality_comparable (line 10920) | struct is_equality_comparable: std::false_type {}
type is_equality_comparable<Type, std::void_t<decltype(std::declval<Type>() == std::declval<Type>())>> (line 10925) | struct is_equality_comparable<Type, std::void_t<decltype(std::declval<...
class member_class (line 10941) | class member_class {
type identity (line 11000) | struct identity {
method Type (line 102) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 1404) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
method Type (line 11008) | constexpr Type && operator()(Type &&value) const ENTT_NOEXCEPT {
function overload (line 11022) | constexpr auto overload(Type Class:: *member) ENTT_NOEXCEPT { return m...
function overload (line 11032) | constexpr auto overload(Func *func) ENTT_NOEXCEPT { return func; }
type overloaded (line 11040) | struct overloaded: Func... {
type y_combinator (line 11058) | struct y_combinator {
method y_combinator (line 157) | y_combinator(Func recursive):
method y_combinator (line 1459) | y_combinator(Func recursive):
method y_combinator (line 11063) | y_combinator(Func recursive):
class meta_any (line 11116) | class meta_any
type type_traits (line 11383) | struct type_traits {
method instance (line 11385) | static void instance(meta_any &any, Args &&... args) {
method destroy (line 11390) | static void destroy(meta_any &any) {
method copy (line 11396) | static void copy(meta_any &to, const meta_any &from) {
method steal (line 11402) | static void steal(meta_any &to, meta_any &from) {
type type_traits<Type, std::enable_if_t<sizeof(Type) <= sizeof(void *) && std::is_nothrow_move_constructible_v<Type>>> (line 11409) | struct type_traits<Type, std::enable_if_t<sizeof(Type) <= sizeof(voi...
method instance (line 11411) | static void instance(meta_any &any, Args &&... args) {
method destroy (line 11415) | static void destroy(meta_any &any) {
method copy (line 11421) | static void copy(meta_any &to, const meta_any &from) {
method steal (line 11425) | static void steal(meta_any &to, meta_any &from) {
method meta_any (line 11431) | meta_any(const internal::meta_type_node *curr, void *ref) ENTT_NOEXCEPT
method meta_any (line 11440) | meta_any() ENTT_NOEXCEPT
method meta_any (line 11456) | explicit meta_any(std::in_place_type_t<Type>, [[maybe_unused]] Args ...
method meta_any (line 11476) | meta_any(std::reference_wrapper<Type> value)
method meta_any (line 11486) | meta_any(Type &&value)
method meta_any (line 11494) | meta_any(const meta_any &other)
method meta_any (line 11512) | meta_any(meta_any &&other)
method meta_any (line 11532) | meta_any & operator=(Type &&value) {
method meta_any (line 11541) | meta_any & operator=(meta_any other) {
method Type (line 11571) | const Type * try_cast() const {
method Type (line 11585) | Type * try_cast() {
method Type (line 11604) | const Type & cast() const {
method Type (line 11612) | Type & cast() {
method meta_any (line 11623) | meta_any convert() const {
method convert (line 11641) | bool convert() {
method emplace (line 11662) | void emplace(Args &&... args) {
method meta_any (line 11670) | meta_any ref() const ENTT_NOEXCEPT {
method meta_any (line 11678) | meta_any operator *() const ENTT_NOEXCEPT {
method swap (line 11705) | void swap(meta_any &lhs, meta_any &rhs) {
class meta_type (line 11117) | class meta_type
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
type internal (line 11126) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
type meta_ctx (line 11356) | struct meta_ctx {
method bind (line 11361) | static void bind(meta_ctx other) ENTT_NOEXCEPT {
class meta_any (line 11376) | class meta_any {
type type_traits (line 11383) | struct type_traits {
method instance (line 11385) | static void instance(meta_any &any, Args &&... args) {
method destroy (line 11390) | static void destroy(meta_any &any) {
method copy (line 11396) | static void copy(meta_any &to, const meta_any &from) {
method steal (line 11402) | static void steal(meta_any &to, meta_any &from) {
type type_traits<Type, std::enable_if_t<sizeof(Type) <= sizeof(void *) && std::is_nothrow_move_constructible_v<Type>>> (line 11409) | struct type_traits<Type, std::enable_if_t<sizeof(Type) <= sizeof(voi...
method instance (line 11411) | static void instance(meta_any &any, Args &&... args) {
method destroy (line 11415) | static void destroy(meta_any &any) {
method copy (line 11421) | static void copy(meta_any &to, const meta_any &from) {
method steal (line 11425) | static void steal(meta_any &to, meta_any &from) {
method meta_any (line 11431) | meta_any(const internal::meta_type_node *curr, void *ref) ENTT_NOEXCEPT
method meta_any (line 11440) | meta_any() ENTT_NOEXCEPT
method meta_any (line 11456) | explicit meta_any(std::in_place_type_t<Type>, [[maybe_unused]] Args ...
method meta_any (line 11476) | meta_any(std::reference_wrapper<Type> value)
method meta_any (line 11486) | meta_any(Type &&value)
method meta_any (line 11494) | meta_any(const meta_any &other)
method meta_any (line 11512) | meta_any(meta_any &&other)
method meta_any (line 11532) | meta_any & operator=(Type &&value) {
method meta_any (line 11541) | meta_any & operator=(meta_any other) {
method Type (line 11571) | const Type * try_cast() const {
method Type (line 11585) | Type * try_cast() {
method Type (line 11604) | const Type & cast() const {
method Type (line 11612) | Type & cast() {
method meta_any (line 11623) | meta_any convert() const {
method convert (line 11641) | bool convert() {
method emplace (line 11662) | void emplace(Args &&... args) {
method meta_any (line 11670) | meta_any ref() const ENTT_NOEXCEPT {
method meta_any (line 11678) | meta_any operator *() const ENTT_NOEXCEPT {
method swap (line 11705) | void swap(meta_any &lhs, meta_any &rhs) {
type meta_handle (line 11742) | struct meta_handle {
method meta_handle (line 11744) | meta_handle()
method meta_handle (line 11754) | meta_handle(Type &&value) ENTT_NOEXCEPT
method meta_any (line 11766) | meta_any operator *() const {
type meta_prop (line 11787) | struct meta_prop {
method meta_prop (line 11792) | meta_prop(const internal::meta_prop_node *curr = nullptr) ENTT_NOEXCEPT
method meta_any (line 11800) | meta_any key() const {
method meta_any (line 11808) | meta_any value() const {
type meta_base (line 11826) | struct meta_base {
method meta_base (line 11828) | meta_base(const internal::meta_base_node *curr = nullptr) ENTT_NOEXCEPT
type meta_conv (line 11864) | struct meta_conv {
method meta_conv (line 11866) | meta_conv(const internal::meta_conv_node *curr = nullptr) ENTT_NOEXCEPT
method meta_any (line 11881) | meta_any convert(const void *instance) const {
type meta_ctor (line 11899) | struct meta_ctor {
method meta_ctor (line 11904) | meta_ctor(const internal::meta_ctor_node *curr = nullptr) ENTT_NOEXCEPT
method size_type (line 11915) | size_type size() const ENTT_NOEXCEPT {
method meta_any (line 11938) | meta_any invoke([[maybe_unused]] Args &&... args) const {
method prop (line 11953) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 11963) | meta_prop prop(meta_any key) const {
type meta_data (line 11983) | struct meta_data {
method meta_data (line 11985) | meta_data(const internal::meta_data_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 11990) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 11995) | [[deprecated("use ::id instead")]]
method is_const (line 12007) | bool is_const() const ENTT_NOEXCEPT {
method is_static (line 12015) | bool is_static() const ENTT_NOEXCEPT {
method set (line 12037) | bool set(meta_handle instance, Type &&value) const {
method set (line 12057) | bool set(meta_handle instance, std::size_t index, Type &&value) const {
method meta_any (line 12071) | meta_any get(meta_handle instance) const {
method meta_any (line 12085) | meta_any get(meta_handle instance, std::size_t index) const {
method prop (line 12096) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12106) | meta_prop prop(meta_any key) const {
type meta_func (line 12126) | struct meta_func {
method meta_func (line 12131) | meta_func(const internal::meta_func_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12136) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12141) | [[deprecated("use ::id instead")]]
method size_type (line 12153) | size_type size() const ENTT_NOEXCEPT {
method is_const (line 12161) | bool is_const() const ENTT_NOEXCEPT {
method is_static (line 12169) | bool is_static() const ENTT_NOEXCEPT {
method meta_any (line 12202) | meta_any invoke(meta_handle instance, Args &&... args) const {
method prop (line 12213) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12223) | meta_prop prop(meta_any key) const {
class meta_type (line 12243) | class meta_type {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12631) | inline meta_type meta_any::type() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12636) | inline meta_type meta_base::parent() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12641) | inline meta_type meta_base::type() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12646) | inline meta_type meta_conv::parent() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12651) | inline meta_type meta_conv::type() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12656) | inline meta_type meta_ctor::parent() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12661) | inline meta_type meta_ctor::arg(size_type index) const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12666) | inline meta_type meta_data::parent() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12671) | inline meta_type meta_data::type() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12676) | inline meta_type meta_func::parent() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12681) | inline meta_type meta_func::ret() const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 12686) | inline meta_type meta_func::arg(size_type index) const ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
type as_ref_t (line 12705) | struct as_ref_t {}
type as_is_t (line 12722) | struct as_is_t {}
type as_void_t (line 12726) | struct as_void_t {}
type internal (line 12745) | namespace internal {
type fnv1a_traits (line 444) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 448) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 456) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 881) | struct ENTT_API type_index {
type fnv1a_traits (line 1714) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 1718) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 1726) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 1971) | struct ENTT_API type_index {
function index_sequence_for (line 2431) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
class null (line 3370) | class null {
type fnv1a_traits (line 10402) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 10406) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 10414) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 10659) | struct ENTT_API type_index {
type meta_type_node (line 11129) | struct meta_type_node
type meta_prop_node (line 11132) | struct meta_prop_node {
type meta_base_node (line 11139) | struct meta_base_node {
type meta_conv_node (line 11147) | struct meta_conv_node {
type meta_ctor_node (line 11155) | struct meta_ctor_node {
type meta_dtor_node (line 11166) | struct meta_dtor_node {
type meta_data_node (line 11172) | struct meta_data_node {
type meta_func_node (line 11185) | struct meta_func_node {
type meta_type_node (line 11200) | struct meta_type_node {
function visit (line 11231) | void visit(Op &op, Node *node) {
function visit (line 11240) | void visit(Op &op, const internal::meta_type_node *node) {
function find_if (line 11254) | auto find_if(const Op &op, Node *node) {
function find_if (line 11264) | auto find_if(const Op &op, const meta_type_node *node)
function compare (line 11283) | bool compare(const void *lhs, const void *rhs) {
function meta_context (line 11292) | struct ENTT_API meta_context {
function meta_node (line 11311) | struct ENTT_API meta_node {
type meta_info (line 11343) | struct meta_info: meta_node<std::remove_cv_t<std::remove_reference_t...
type meta_function_helper (line 12749) | struct meta_function_helper
function meta_any (line 12795) | meta_any construct(meta_any * const args, std::index_sequence<Indexe...
function setter (line 12808) | bool setter([[maybe_unused]] meta_any instance, [[maybe_unused]] met...
function meta_any (line 12874) | meta_any getter([[maybe_unused]] meta_any instance, [[maybe_unused]]...
function meta_any (line 12915) | meta_any invoke([[maybe_unused]] meta_any instance, meta_any *args, ...
type fnv1a_traits (line 13846) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 13850) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 13858) | struct fnv1a_traits<std::uint64_t> {
function index_sequence_for (line 15679) | constexpr auto index_sequence_for(Ret(*)(Args...)) {
type fnv1a_traits (line 16131) | struct fnv1a_traits
type fnv1a_traits<std::uint32_t> (line 16135) | struct fnv1a_traits<std::uint32_t> {
type fnv1a_traits<std::uint64_t> (line 16143) | struct fnv1a_traits<std::uint64_t> {
function type_index (line 16388) | struct ENTT_API type_index {
class meta_factory (line 12967) | class meta_factory
class meta_factory<Type> (line 13092) | class meta_factory<Type> {
method exists (line 13094) | bool exists(const Node *candidate, const Node *node) ENTT_NOEXCEPT {
method exists (line 13099) | bool exists(const id_type id, const Node *node) ENTT_NOEXCEPT {
method type (line 13109) | auto type(const id_type id = type_info<Type>::id()) {
method alias (line 13122) | [[deprecated("use ::type instead")]]
method ENTT_NOEXCEPT (line 13136) | auto base() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 13166) | auto conv() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 13199) | auto conv() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 13233) | auto ctor() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 13267) | auto ctor() ENTT_NOEXCEPT {
method ENTT_NOEXCEPT (line 13306) | auto dtor() ENTT_NOEXCEPT {
method data (line 13339) | auto data(const id_type id) ENTT_NOEXCEPT {
method data (line 13424) | auto data(const id_type id) ENTT_NOEXCEPT {
method func (line 13464) | auto func(const id_type id) ENTT_NOEXCEPT {
function ENTT_NOEXCEPT (line 13546) | inline meta_factory<Type> meta() ENTT_NOEXCEPT {
function meta_type (line 13579) | inline meta_type resolve() ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 13591) | inline meta_type resolve_if(Func func) ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 13603) | inline meta_type resolve_id(const id_type id) ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 13613) | inline meta_type resolve_type(const id_type id) ENTT_NOEXCEPT {
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT {
method is_floating_point (line 12309) | bool is_floating_point() const ENTT_NOEXCEPT {
method is_array (line 12318) | bool is_array() const ENTT_NOEXCEPT {
method is_enum (line 12326) | bool is_enum() const ENTT_NOEXCEPT {
method is_union (line 12334) | bool is_union() const ENTT_NOEXCEPT {
method is_class (line 12342) | bool is_class() const ENTT_NOEXCEPT {
method is_pointer (line 12350) | bool is_pointer() const ENTT_NOEXCEPT {
method is_function_pointer (line 12360) | bool is_function_pointer() const ENTT_NOEXCEPT {
method is_member_object_pointer (line 12370) | bool is_member_object_pointer() const ENTT_NOEXCEPT {
method is_member_function_pointer (line 12380) | bool is_member_function_pointer() const ENTT_NOEXCEPT {
method size_type (line 12390) | size_type extent() const ENTT_NOEXCEPT {
method meta_type (line 12399) | meta_type remove_pointer() const ENTT_NOEXCEPT {
method meta_type (line 12408) | meta_type remove_extent() const ENTT_NOEXCEPT {
method base (line 12418) | std::enable_if_t<std::is_invocable_v<Op, meta_base>, void>
method meta_base (line 12428) | meta_base base(const id_type id) const {
method conv (line 12440) | void conv(Op op) const {
method meta_conv (line 12451) | meta_conv conv() const {
method ctor (line 12463) | void ctor(Op op) const {
method meta_ctor (line 12473) | meta_ctor ctor() const {
method data (line 12486) | std::enable_if_t<std::is_invocable_v<Op, meta_data>, void>
method meta_data (line 12499) | meta_data data(const id_type id) const {
method func (line 12514) | std::enable_if_t<std::is_invocable_v<Op, meta_func>, void>
method meta_func (line 12527) | meta_func func(const id_type id) const {
method meta_any (line 12545) | meta_any construct(Args &&... args) const {
method prop (line 12573) | std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void>
method meta_prop (line 12586) | meta_prop prop(meta_any key) const {
function meta_type (line 13619) | [[deprecated("use entt::resolve_id instead")]]
method ctor (line 12245) | auto ctor(std::index_sequence<Indexes...>) const {
method meta_type (line 12260) | meta_type(const internal::meta_type_node *curr = nullptr) ENTT_NOEXCEPT
method id_type (line 12268) | id_type type_id() const ENTT_NOEXCEPT {
method id_type (line 12276) | id_type id() const ENTT_NOEXCEPT {
method id_type (line 12281) | [[deprecated("use ::id instead")]]
method is_void (line 12290) | bool is_void() const ENTT_NOEXCEPT {
method is_integral (line 12299) | bool is_integral() const ENTT_NOEXCEPT
Condensed preview — 432 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,749K chars).
[
{
"path": ".editorconfig",
"chars": 165,
"preview": "# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\nend_of_line = lf\nin"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 5080,
"preview": "Contributing to Hazel!\n======================\n\nThanks for your interest in contributing to Hazel! :tada: We love getting"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 206,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Hazel Community Support (Discord)\n url: https://thecherno.com/di"
},
{
"path": ".github/ISSUE_TEMPLATE/issue--bug-report.md",
"chars": 994,
"preview": "---\nname: 'Issue: Bug report'\nabout: Create a report to help us improve Hazel\n\n---\n\n#### Describe the bug\nA clear and co"
},
{
"path": ".github/ISSUE_TEMPLATE/issue--feature-request.md",
"chars": 651,
"preview": "---\nname: 'Issue: Feature request'\nabout: Suggest an idea/extension for Hazel\n\n---\n\n#### Is your feature request related"
},
{
"path": ".github/ISSUE_TEMPLATE/other-issues--blank-template.md",
"chars": 713,
"preview": "---\nname: 'Other issues: Blank template'\nabout: For issues that are not a bug report or feature request\n\n---\n\nPlease con"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1013,
"preview": "#### Describe the issue (if no issue has been made)\nA clear and concise description of what the issue is. Explain the di"
},
{
"path": ".gitignore",
"chars": 246,
"preview": "# Binaries\n**/bin/\nbin-int/\nIntermediates/\n\n# Hazel files\n*.log\n\n# Visual Studio files and folder\n.vs/\n**.sln\n**.vcxproj"
},
{
"path": ".gitmodules",
"chars": 880,
"preview": "[submodule \"Hazel/vendor/spdlog\"]\n\tpath = Hazel/vendor/spdlog\n\turl = ../../gabime/spdlog.git\n\tbranch = v1.x\n[submodule \""
},
{
"path": "Dependencies.lua",
"chars": 2199,
"preview": "\n-- Hazel Dependencies\n\nVULKAN_SDK = os.getenv(\"VULKAN_SDK\")\n\nIncludeDir = {}\nIncludeDir[\"stb_image\"] = \"%{wks.location}"
},
{
"path": "Hazel/premake5.lua",
"chars": 2011,
"preview": "project \"Hazel\"\n\tkind \"StaticLib\"\n\tlanguage \"C++\"\n\tcppdialect \"C++17\"\n\tstaticruntime \"off\"\n\n\ttargetdir (\"%{wks.location}"
},
{
"path": "Hazel/src/Hazel/Core/Application.cpp",
"chars": 3140,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/Application.h\"\n\n#include \"Hazel/Core/Log.h\"\n\n#include \"Hazel/Renderer/Renderer.h"
},
{
"path": "Hazel/src/Hazel/Core/Application.h",
"chars": 1853,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n\n#include \"Hazel/Core/Window.h\"\n#include \"Hazel/Core/LayerStack.h\"\n#include \""
},
{
"path": "Hazel/src/Hazel/Core/Assert.h",
"chars": 1443,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Core/Log.h\"\n#include <filesystem>\n\n#ifdef HZ_ENABLE_ASSERTS\n\n"
},
{
"path": "Hazel/src/Hazel/Core/Base.h",
"chars": 1117,
"preview": "#pragma once\n\n#include \"Hazel/Core/PlatformDetection.h\"\n\n#include <memory>\n\n#ifdef HZ_DEBUG\n\t#if defined(HZ_PLATFORM_WIN"
},
{
"path": "Hazel/src/Hazel/Core/Buffer.h",
"chars": 1156,
"preview": "#pragma once\n\n#include <stdint.h>\n#include <cstring>\n\nnamespace Hazel {\n\n\t// Non-owning raw buffer class\n\tstruct Buffer\n"
},
{
"path": "Hazel/src/Hazel/Core/EntryPoint.h",
"chars": 626,
"preview": "#pragma once\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Core/Application.h\"\n\n#ifdef HZ_PLATFORM_WINDOWS\n\nextern Hazel:"
},
{
"path": "Hazel/src/Hazel/Core/FileSystem.cpp",
"chars": 556,
"preview": "#include \"hzpch.h\"\n#include \"FileSystem.h\"\n\nnamespace Hazel {\n\n\tBuffer FileSystem::ReadFileBinary(const std::filesystem:"
},
{
"path": "Hazel/src/Hazel/Core/FileSystem.h",
"chars": 209,
"preview": "#pragma once\n\n#include \"Hazel/Core/Buffer.h\"\n\nnamespace Hazel {\n\n\tclass FileSystem\n\t{\n\tpublic:\n\t\t// TODO: move to FileSy"
},
{
"path": "Hazel/src/Hazel/Core/Input.h",
"chars": 348,
"preview": "#pragma once\n\n#include \"Hazel/Core/KeyCodes.h\"\n#include \"Hazel/Core/MouseCodes.h\"\n\n#include <glm/glm.hpp>\n\nnamespace Haz"
},
{
"path": "Hazel/src/Hazel/Core/KeyCodes.h",
"chars": 3930,
"preview": "#pragma once\n\nnamespace Hazel\n{\n\tusing KeyCode = uint16_t;\n\t\n\tnamespace Key\n\t{\n\t\tenum : KeyCode\n\t\t{\n\t\t\t// From glfw3.h\n\t"
},
{
"path": "Hazel/src/Hazel/Core/Layer.cpp",
"chars": 149,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/Layer.h\"\n\nnamespace Hazel {\n\n\tLayer::Layer(const std::string& debugName)\n\t\t: m_D"
},
{
"path": "Hazel/src/Hazel/Core/Layer.h",
"chars": 507,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Core/Timestep.h\"\n#include \"Hazel/Events/Event.h\"\n\nnamespace H"
},
{
"path": "Hazel/src/Hazel/Core/LayerStack.cpp",
"chars": 901,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/LayerStack.h\"\n\nnamespace Hazel {\n\n\tLayerStack::~LayerStack()\n\t{\n\t\tfor (Layer* la"
},
{
"path": "Hazel/src/Hazel/Core/LayerStack.h",
"chars": 1033,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Core/Layer.h\"\n\n#include <vector>\n\nnamespace Hazel {\n\n\tclass L"
},
{
"path": "Hazel/src/Hazel/Core/Log.cpp",
"chars": 1051,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/Log.h\"\n\n#include <spdlog/sinks/stdout_color_sinks.h>\n#include <spdlog/sinks/basi"
},
{
"path": "Hazel/src/Hazel/Core/Log.h",
"chars": 2016,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n\n#define GLM_ENABLE_EXPERIMENTAL\n#include \"glm/gtx/string_cast.hpp\"\n\n// This "
},
{
"path": "Hazel/src/Hazel/Core/MouseCodes.h",
"chars": 529,
"preview": "#pragma once\n\nnamespace Hazel\n{\n\tusing MouseCode = uint16_t;\n\n\tnamespace Mouse\n\t{\n\t\tenum : MouseCode\n\t\t{\n\t\t\t// From glfw"
},
{
"path": "Hazel/src/Hazel/Core/PlatformDetection.h",
"chars": 1196,
"preview": "// Platform detection using predefined macros\n#ifdef _WIN32\n\t/* Windows x64/x86 */\n\t#ifdef _WIN64\n\t\t/* Windows x64 */\n\t"
},
{
"path": "Hazel/src/Hazel/Core/Timer.h",
"chars": 540,
"preview": "#pragma once\n\n#include <chrono>\n\nnamespace Hazel {\n\n\tclass Timer\n\t{\n\tpublic:\n\t\tTimer()\n\t\t{\n\t\t\tReset();\n\t\t}\n\n\t\tvoid Timer"
},
{
"path": "Hazel/src/Hazel/Core/Timestep.h",
"chars": 302,
"preview": "#pragma once\n\nnamespace Hazel {\n\n\tclass Timestep\n\t{\n\tpublic:\n\t\tTimestep(float time = 0.0f)\n\t\t\t: m_Time(time)\n\t\t{\n\t\t}\n\n\t\t"
},
{
"path": "Hazel/src/Hazel/Core/UUID.cpp",
"chars": 387,
"preview": "#include \"hzpch.h\"\n#include \"UUID.h\"\n\n#include <random>\n\n#include <unordered_map>\n\nnamespace Hazel {\n\n\tstatic std::rando"
},
{
"path": "Hazel/src/Hazel/Core/UUID.h",
"chars": 397,
"preview": "#pragma once\n\nnamespace Hazel {\n\n\tclass UUID\n\t{\n\tpublic:\n\t\tUUID();\n\t\tUUID(uint64_t uuid);\n\t\tUUID(const UUID&) = default;"
},
{
"path": "Hazel/src/Hazel/Core/Window.cpp",
"chars": 364,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/Window.h\"\n\n#ifdef HZ_PLATFORM_WINDOWS\n\t#include \"Platform/Windows/WindowsWindow."
},
{
"path": "Hazel/src/Hazel/Core/Window.h",
"chars": 969,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Events/Event.h\"\n\n#include <sstream>\n\nnamespace Hazel {\n\n\tstru"
},
{
"path": "Hazel/src/Hazel/Debug/Instrumentor.h",
"chars": 6518,
"preview": "#pragma once\n\n#include \"Hazel/Core/Log.h\"\n\n#include <algorithm>\n#include <chrono>\n#include <fstream>\n#include <iomanip>\n"
},
{
"path": "Hazel/src/Hazel/Events/ApplicationEvent.h",
"chars": 1272,
"preview": "#pragma once\n\n#include \"Hazel/Events/Event.h\"\n\nnamespace Hazel {\n\n\tclass WindowResizeEvent : public Event\n\t{\n\tpublic:\n\t\t"
},
{
"path": "Hazel/src/Hazel/Events/Event.h",
"chars": 2148,
"preview": "#pragma once\n\n#include \"Hazel/Debug/Instrumentor.h\"\n#include \"Hazel/Core/Base.h\"\n\n#include <functional>\n\nnamespace Hazel"
},
{
"path": "Hazel/src/Hazel/Events/KeyEvent.h",
"chars": 1400,
"preview": "#pragma once\n\n#include \"Hazel/Events/Event.h\"\n#include \"Hazel/Core/KeyCodes.h\"\n\nnamespace Hazel {\n\n\tclass KeyEvent : pub"
},
{
"path": "Hazel/src/Hazel/Events/MouseEvent.h",
"chars": 2180,
"preview": "#pragma once\n\n#include \"Hazel/Events/Event.h\"\n#include \"Hazel/Core/MouseCodes.h\"\n\nnamespace Hazel {\n\n\tclass MouseMovedEv"
},
{
"path": "Hazel/src/Hazel/ImGui/ImGuiBuild.cpp",
"chars": 179,
"preview": "#include \"hzpch.h\"\n\n#include <misc/cpp/imgui_stdlib.cpp>\n\n#define IMGUI_IMPL_OPENGL_LOADER_GLAD\n#include <examples/imgui"
},
{
"path": "Hazel/src/Hazel/ImGui/ImGuiLayer.cpp",
"chars": 4632,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/ImGui/ImGuiLayer.h\"\n\n#include <imgui.h>\n#include <imgui_internal.h>\n\n#include <exampl"
},
{
"path": "Hazel/src/Hazel/ImGui/ImGuiLayer.h",
"chars": 591,
"preview": "#pragma once\n\n#include \"Hazel/Core/Layer.h\"\n\n#include \"Hazel/Events/ApplicationEvent.h\"\n#include \"Hazel/Events/KeyEvent."
},
{
"path": "Hazel/src/Hazel/Math/Math.cpp",
"chars": 2220,
"preview": "#include \"hzpch.h\"\n#include \"Math.h\"\n\n#define GLM_ENABLE_EXPERIMENTAL\n#include <glm/gtx/matrix_decompose.hpp>\n\nnamespace"
},
{
"path": "Hazel/src/Hazel/Math/Math.h",
"chars": 183,
"preview": "#pragma once\n\n#include <glm/glm.hpp>\n\nnamespace Hazel::Math {\n\n\tbool DecomposeTransform(const glm::mat4& transform, glm:"
},
{
"path": "Hazel/src/Hazel/Physics/Physics2D.h",
"chars": 1010,
"preview": "#pragma once\n\n#include \"Hazel/Scene/Components.h\"\n\n#include \"box2d/b2_body.h\"\n\nnamespace Hazel {\n\n\tnamespace Utils {\n\n\t\t"
},
{
"path": "Hazel/src/Hazel/Project/Project.cpp",
"chars": 783,
"preview": "#include \"hzpch.h\"\n#include \"Project.h\"\n\n#include \"ProjectSerializer.h\"\n\nnamespace Hazel {\n\n\tRef<Project> Project::New()"
},
{
"path": "Hazel/src/Hazel/Project/Project.h",
"chars": 1266,
"preview": "#pragma once\n\n#include <string>\n#include <filesystem>\n\n#include \"Hazel/Core/Base.h\"\n\nnamespace Hazel {\n\n\tstruct ProjectC"
},
{
"path": "Hazel/src/Hazel/Project/ProjectSerializer.cpp",
"chars": 1683,
"preview": "#include \"hzpch.h\"\n#include \"ProjectSerializer.h\"\n\n#include <fstream>\n#include <yaml-cpp/yaml.h>\n\nnamespace Hazel {\n\n\tPr"
},
{
"path": "Hazel/src/Hazel/Project/ProjectSerializer.h",
"chars": 295,
"preview": "#pragma once\n\n#include \"Project.h\"\n\nnamespace Hazel {\n\n\tclass ProjectSerializer\n\t{\n\tpublic:\n\t\tProjectSerializer(Ref<Proj"
},
{
"path": "Hazel/src/Hazel/Renderer/Buffer.cpp",
"chars": 1318,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Buffer.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n\n#include \"Platform/OpenGL/O"
},
{
"path": "Hazel/src/Hazel/Renderer/Buffer.h",
"chars": 3516,
"preview": "#pragma once\n\nnamespace Hazel {\n\n\tenum class ShaderDataType\n\t{\n\t\tNone = 0, Float, Float2, Float3, Float4, Mat3, Mat4, In"
},
{
"path": "Hazel/src/Hazel/Renderer/Camera.h",
"chars": 337,
"preview": "#pragma once\n\n#include <glm/glm.hpp>\n\nnamespace Hazel {\n\n\tclass Camera\n\t{\n\tpublic:\n\t\tCamera() = default;\n\t\tCamera(const "
},
{
"path": "Hazel/src/Hazel/Renderer/EditorCamera.cpp",
"chars": 3785,
"preview": "#include \"hzpch.h\"\n#include \"EditorCamera.h\"\n\n#include \"Hazel/Core/Input.h\"\n#include \"Hazel/Core/KeyCodes.h\"\n#include \"H"
},
{
"path": "Hazel/src/Hazel/Renderer/EditorCamera.h",
"chars": 1868,
"preview": "#pragma once\n\n#include \"Camera.h\"\n#include \"Hazel/Core/Timestep.h\"\n#include \"Hazel/Events/Event.h\"\n#include \"Hazel/Event"
},
{
"path": "Hazel/src/Hazel/Renderer/Font.cpp",
"chars": 4573,
"preview": "#include \"hzpch.h\"\n#include \"Font.h\"\n\n#undef INFINITE\n#include \"msdf-atlas-gen.h\"\n#include \"FontGeometry.h\"\n#include \"Gl"
},
{
"path": "Hazel/src/Hazel/Renderer/Font.h",
"chars": 449,
"preview": "#pragma once\n\n#include <filesystem>\n\n#include \"Hazel/Core/Base.h\"\n#include \"Hazel/Renderer/Texture.h\"\n\nnamespace Hazel {"
},
{
"path": "Hazel/src/Hazel/Renderer/Framebuffer.cpp",
"chars": 559,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Framebuffer.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n\n#include \"Platform/Ope"
},
{
"path": "Hazel/src/Hazel/Renderer/Framebuffer.h",
"chars": 1574,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n\nnamespace Hazel {\n\n\tenum class FramebufferTextureFormat\n\t{\n\t\tNone = 0,\n\n\t\t//"
},
{
"path": "Hazel/src/Hazel/Renderer/GraphicsContext.cpp",
"chars": 567,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/GraphicsContext.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Platform/"
},
{
"path": "Hazel/src/Hazel/Renderer/GraphicsContext.h",
"chars": 231,
"preview": "#pragma once\n\nnamespace Hazel {\n\n\tclass GraphicsContext\n\t{\n\tpublic:\n\t\tvirtual ~GraphicsContext() = default;\n\n\t\tvirtual v"
},
{
"path": "Hazel/src/Hazel/Renderer/MSDFData.h",
"chars": 215,
"preview": "#pragma once\n\n#include <vector>\n\n#undef INFINITE\n#include \"msdf-atlas-gen.h\"\n\nnamespace Hazel {\n\n\tstruct MSDFData\n\t{\n\t\ts"
},
{
"path": "Hazel/src/Hazel/Renderer/OrthographicCamera.cpp",
"chars": 1003,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/OrthographicCamera.h\"\n\n#include <glm/gtc/matrix_transform.hpp>\n\nnamespace Ha"
},
{
"path": "Hazel/src/Hazel/Renderer/OrthographicCamera.h",
"chars": 999,
"preview": "#pragma once\n\n#include <glm/glm.hpp>\n\nnamespace Hazel {\n\n\tclass OrthographicCamera\n\t{\n\tpublic:\n\t\tOrthographicCamera(floa"
},
{
"path": "Hazel/src/Hazel/Renderer/OrthographicCameraController.cpp",
"chars": 2973,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/OrthographicCameraController.h\"\n\n#include \"Hazel/Core/Input.h\"\n#include \"Haz"
},
{
"path": "Hazel/src/Hazel/Renderer/OrthographicCameraController.h",
"chars": 1081,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/OrthographicCamera.h\"\n#include \"Hazel/Core/Timestep.h\"\n\n#include \"Hazel/Events/Ap"
},
{
"path": "Hazel/src/Hazel/Renderer/RenderCommand.cpp",
"chars": 157,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/RenderCommand.h\"\n\nnamespace Hazel {\n\n\tScope<RendererAPI> RenderCommand::s_Re"
},
{
"path": "Hazel/src/Hazel/Renderer/RenderCommand.h",
"chars": 913,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/RendererAPI.h\"\n\nnamespace Hazel {\n\n\tclass RenderCommand\n\t{\n\tpublic:\n\t\tstatic void"
},
{
"path": "Hazel/src/Hazel/Renderer/Renderer.cpp",
"chars": 985,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Hazel/Renderer/Renderer2D.h\"\n\nnamespace Hazel {\n\n\tScop"
},
{
"path": "Hazel/src/Hazel/Renderer/Renderer.h",
"chars": 704,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/RenderCommand.h\"\n\n#include \"Hazel/Renderer/OrthographicCamera.h\"\n#include \"Hazel/"
},
{
"path": "Hazel/src/Hazel/Renderer/Renderer2D.cpp",
"chars": 21489,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Renderer2D.h\"\n\n#include \"Hazel/Renderer/VertexArray.h\"\n#include \"Hazel/Rende"
},
{
"path": "Hazel/src/Hazel/Renderer/Renderer2D.h",
"chars": 3468,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/OrthographicCamera.h\"\n\n#include \"Hazel/Renderer/Texture.h\"\n\n#include \"Hazel/Rende"
},
{
"path": "Hazel/src/Hazel/Renderer/RendererAPI.cpp",
"chars": 535,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/RendererAPI.h\"\n\n#include \"Platform/OpenGL/OpenGLRendererAPI.h\"\n\nnamespace Ha"
},
{
"path": "Hazel/src/Hazel/Renderer/RendererAPI.h",
"chars": 776,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/VertexArray.h\"\n\n#include <glm/glm.hpp>\n\nnamespace Hazel {\n\n\tclass RendererAPI\n\t{\n"
},
{
"path": "Hazel/src/Hazel/Renderer/Shader.cpp",
"chars": 1834,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Shader.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Platform/OpenGL/Op"
},
{
"path": "Hazel/src/Hazel/Renderer/Shader.h",
"chars": 1415,
"preview": "#pragma once\n\n#include <string>\n#include <unordered_map>\n\n#include <glm/glm.hpp>\n\nnamespace Hazel {\n\n\tclass Shader\n\t{\n\tp"
},
{
"path": "Hazel/src/Hazel/Renderer/Texture.cpp",
"chars": 927,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/Texture.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Platform/OpenGL/O"
},
{
"path": "Hazel/src/Hazel/Renderer/Texture.h",
"chars": 1016,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n\n#include <string>\n\nnamespace Hazel {\n\n\tenum class ImageFormat\n\t{\n\t\tNone = 0,"
},
{
"path": "Hazel/src/Hazel/Renderer/UniformBuffer.cpp",
"chars": 555,
"preview": "#include \"hzpch.h\"\n#include \"UniformBuffer.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Platform/OpenGL/OpenGLUnif"
},
{
"path": "Hazel/src/Hazel/Renderer/UniformBuffer.h",
"chars": 287,
"preview": "#pragma once\n\n#include \"Hazel/Core/Base.h\"\n\nnamespace Hazel {\n\n\tclass UniformBuffer\n\t{\n\tpublic:\n\t\tvirtual ~UniformBuffer"
},
{
"path": "Hazel/src/Hazel/Renderer/VertexArray.cpp",
"chars": 515,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Renderer/VertexArray.h\"\n\n#include \"Hazel/Renderer/Renderer.h\"\n#include \"Platform/Open"
},
{
"path": "Hazel/src/Hazel/Renderer/VertexArray.h",
"chars": 557,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Buffer.h\"\n\n#include <memory>\n\nnamespace Hazel {\n\n\tclass VertexArray\n\t{\n\tpublic:\n\t"
},
{
"path": "Hazel/src/Hazel/Scene/Components.h",
"chars": 4281,
"preview": "#pragma once\n\n#include \"SceneCamera.h\"\n#include \"Hazel/Core/UUID.h\"\n#include \"Hazel/Renderer/Texture.h\"\n#include \"Hazel/"
},
{
"path": "Hazel/src/Hazel/Scene/Entity.cpp",
"chars": 161,
"preview": "#include \"hzpch.h\"\n#include \"Entity.h\"\n\nnamespace Hazel {\n\n\tEntity::Entity(entt::entity handle, Scene* scene)\n\t\t: m_Enti"
},
{
"path": "Hazel/src/Hazel/Scene/Entity.h",
"chars": 1954,
"preview": "#pragma once\n\n#include \"Hazel/Core/UUID.h\"\n#include \"Scene.h\"\n#include \"Components.h\"\n\n#include \"entt.hpp\"\n\nnamespace Ha"
},
{
"path": "Hazel/src/Hazel/Scene/Scene.cpp",
"chars": 13783,
"preview": "#include \"hzpch.h\"\n#include \"Scene.h\"\n#include \"Entity.h\"\n\n#include \"Components.h\"\n#include \"ScriptableEntity.h\"\n#includ"
},
{
"path": "Hazel/src/Hazel/Scene/Scene.h",
"chars": 1803,
"preview": "#pragma once\n\n#include \"Hazel/Core/Timestep.h\"\n#include \"Hazel/Core/UUID.h\"\n#include \"Hazel/Renderer/EditorCamera.h\"\n\n#i"
},
{
"path": "Hazel/src/Hazel/Scene/SceneCamera.cpp",
"chars": 1467,
"preview": "#include \"hzpch.h\"\n#include \"SceneCamera.h\"\n\n#include <glm/gtc/matrix_transform.hpp>\n\nnamespace Hazel {\n\n\tSceneCamera::S"
},
{
"path": "Hazel/src/Hazel/Scene/SceneCamera.h",
"chars": 2024,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Camera.h\"\n\nnamespace Hazel {\n\n\tclass SceneCamera : public Camera\n\t{\n\tpublic:\n\t\ten"
},
{
"path": "Hazel/src/Hazel/Scene/SceneSerializer.cpp",
"chars": 19986,
"preview": "#include \"hzpch.h\"\n#include \"SceneSerializer.h\"\n\n#include \"Entity.h\"\n#include \"Components.h\"\n#include \"Hazel/Scripting/S"
},
{
"path": "Hazel/src/Hazel/Scene/SceneSerializer.h",
"chars": 379,
"preview": "#pragma once\n\n#include \"Scene.h\"\n\nnamespace Hazel {\n\n\tclass SceneSerializer\n\t{\n\tpublic:\n\t\tSceneSerializer(const Ref<Scen"
},
{
"path": "Hazel/src/Hazel/Scene/ScriptableEntity.h",
"chars": 383,
"preview": "#pragma once\n\n#include \"Entity.h\"\n\nnamespace Hazel {\n\n\tclass ScriptableEntity\n\t{\n\tpublic:\n\t\tvirtual ~ScriptableEntity() "
},
{
"path": "Hazel/src/Hazel/Scripting/ScriptEngine.cpp",
"chars": 15482,
"preview": "#include \"hzpch.h\"\n#include \"ScriptEngine.h\"\n\n#include \"ScriptGlue.h\"\n\n#include \"mono/jit/jit.h\"\n#include \"mono/metadata"
},
{
"path": "Hazel/src/Hazel/Scripting/ScriptEngine.h",
"chars": 6677,
"preview": "#pragma once\n\n#include \"Hazel/Scene/Scene.h\"\n#include \"Hazel/Scene/Entity.h\"\n\n#include <filesystem>\n#include <string>\n#i"
},
{
"path": "Hazel/src/Hazel/Scripting/ScriptGlue.cpp",
"chars": 10199,
"preview": "#include \"hzpch.h\"\n#include \"ScriptGlue.h\"\n#include \"ScriptEngine.h\"\n\n#include \"Hazel/Core/UUID.h\"\n#include \"Hazel/Core/"
},
{
"path": "Hazel/src/Hazel/Scripting/ScriptGlue.h",
"chars": 141,
"preview": "#pragma once\n\nnamespace Hazel {\n\n\tclass ScriptGlue\n\t{\n\tpublic:\n\t\tstatic void RegisterComponents();\n\t\tstatic void Registe"
},
{
"path": "Hazel/src/Hazel/UI/UI.h",
"chars": 551,
"preview": "#pragma once\n\n#include <imgui/imgui.h>\n\nnamespace Hazel::UI {\n\n\tstruct ScopedStyleColor\n\t{\n\t\tScopedStyleColor() = defaul"
},
{
"path": "Hazel/src/Hazel/Utils/PlatformUtils.h",
"chars": 292,
"preview": "#pragma once\n\n#include <string>\n\nnamespace Hazel {\n\n\tclass FileDialogs\n\t{\n\tpublic:\n\t\t// These return empty strings if ca"
},
{
"path": "Hazel/src/Hazel.h",
"chars": 1040,
"preview": "#pragma once\n\n// For use by Hazel applications\n\n#include \"Hazel/Core/Base.h\"\n\n#include \"Hazel/Core/Application.h\"\n#inclu"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLBuffer.cpp",
"chars": 2399,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLBuffer.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\n\t//////////////"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLBuffer.h",
"chars": 955,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Buffer.h\"\n\nnamespace Hazel {\n\n\tclass OpenGLVertexBuffer : public VertexBuffer\n\t{\n"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLContext.cpp",
"chars": 961,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLContext.h\"\n\n#include <GLFW/glfw3.h>\n#include <glad/glad.h>\n\nnamespace"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLContext.h",
"chars": 317,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/GraphicsContext.h\"\n\nstruct GLFWwindow;\n\nnamespace Hazel {\n\n\tclass OpenGLContext :"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLFramebuffer.cpp",
"chars": 6951,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLFramebuffer.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\n\tstatic co"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLFramebuffer.h",
"chars": 1158,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Framebuffer.h\"\n\nnamespace Hazel {\n\n\tclass OpenGLFramebuffer : public Framebuffer\n"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLRendererAPI.cpp",
"chars": 1989,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLRendererAPI.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\t\n\tvoid Ope"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLRendererAPI.h",
"chars": 611,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/RendererAPI.h\"\n\nnamespace Hazel {\n\n\tclass OpenGLRendererAPI : public RendererAPI\n"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLShader.cpp",
"chars": 13796,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLShader.h\"\n#include \"Hazel/Core/Timer.h\"\n\n#include <fstream>\n#include "
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLShader.h",
"chars": 2339,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Shader.h\"\n#include <glm/glm.hpp>\n\n// TODO: REMOVE!\ntypedef unsigned int GLenum;\n\n"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLTexture.cpp",
"chars": 3322,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLTexture.h\"\n\n#include <stb_image.h>\n\nnamespace Hazel {\n\n\tnamespace Uti"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLTexture.h",
"chars": 1176,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/Texture.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\n\tclass OpenGLTexture2D : p"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLUniformBuffer.cpp",
"chars": 618,
"preview": "#include \"hzpch.h\"\n#include \"OpenGLUniformBuffer.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\n\tOpenGLUniformBuffer::Op"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLUniformBuffer.h",
"chars": 361,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/UniformBuffer.h\"\n\nnamespace Hazel {\n\n\tclass OpenGLUniformBuffer : public UniformB"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLVertexArray.cpp",
"chars": 3497,
"preview": "#include \"hzpch.h\"\n#include \"Platform/OpenGL/OpenGLVertexArray.h\"\n\n#include <glad/glad.h>\n\nnamespace Hazel {\n\n\tstatic GL"
},
{
"path": "Hazel/src/Platform/OpenGL/OpenGLVertexArray.h",
"chars": 771,
"preview": "#pragma once\n\n#include \"Hazel/Renderer/VertexArray.h\"\n\nnamespace Hazel {\n\n\tclass OpenGLVertexArray : public VertexArray\n"
},
{
"path": "Hazel/src/Platform/Windows/WindowsInput.cpp",
"chars": 997,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Core/Input.h\"\n\n#include \"Hazel/Core/Application.h\"\n#include <GLFW/glfw3.h>\n\nnamespace"
},
{
"path": "Hazel/src/Platform/Windows/WindowsPlatformUtils.cpp",
"chars": 1759,
"preview": "#include \"hzpch.h\"\n#include \"Hazel/Utils/PlatformUtils.h\"\n#include \"Hazel/Core/Application.h\"\n\n#include <commdlg.h>\n#inc"
},
{
"path": "Hazel/src/Platform/Windows/WindowsWindow.cpp",
"chars": 4394,
"preview": "#include \"hzpch.h\"\n#include \"Platform/Windows/WindowsWindow.h\"\n\n#include \"Hazel/Core/Input.h\"\n\n#include \"Hazel/Events/Ap"
},
{
"path": "Hazel/src/Platform/Windows/WindowsWindow.h",
"chars": 995,
"preview": "#pragma once\n\n#include \"Hazel/Core/Window.h\"\n#include \"Hazel/Renderer/GraphicsContext.h\"\n\n#include <GLFW/glfw3.h>\n\nnames"
},
{
"path": "Hazel/src/hzpch.cpp",
"chars": 18,
"preview": "#include \"hzpch.h\""
},
{
"path": "Hazel/src/hzpch.h",
"chars": 625,
"preview": "#pragma once\n\n#include \"Hazel/Core/PlatformDetection.h\"\n\n#ifdef HZ_PLATFORM_WINDOWS\n\t#ifndef NOMINMAX\n\t\t// See github.co"
},
{
"path": "Hazel/vendor/Glad/include/KHR/khrplatform.h",
"chars": 10037,
"preview": "#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2018 The Khronos Group Inc.\n**\n** Permission"
},
{
"path": "Hazel/vendor/Glad/include/glad/glad.h",
"chars": 211699,
"preview": "/*\n\n OpenGL loader generated by glad 0.1.28 on Sat Jan 5 02:36:41 2019.\n\n Language/Generator: C/C++\n Specifica"
},
{
"path": "Hazel/vendor/Glad/premake5.lua",
"chars": 579,
"preview": "project \"Glad\"\n kind \"StaticLib\"\n language \"C\"\n staticruntime \"off\"\n \n targetdir (\"bin/\" .. outputdir .. "
},
{
"path": "Hazel/vendor/Glad/src/glad.c",
"chars": 112976,
"preview": "/*\n\n OpenGL loader generated by glad 0.1.28 on Sat Jan 5 02:36:41 2019.\n\n Language/Generator: C/C++\n Specifica"
},
{
"path": "Hazel/vendor/entt/LICENSE.txt",
"chars": 1081,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2017-2020 Michele Caini\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "Hazel/vendor/entt/include/entt.hpp",
"chars": 551400,
"preview": "// #include \"core/algorithm.hpp\"\n#ifndef ENTT_CORE_ALGORITHM_HPP\n#define ENTT_CORE_ALGORITHM_HPP\n\n\n#include <vector>\n#in"
},
{
"path": "Hazel/vendor/filewatch/FileWatch.h",
"chars": 15352,
"preview": "//\tMIT License\n//\t\n//\tCopyright(c) 2017 Thomas Monkman\n//\t\n//\tPermission is hereby granted, free of charge, to any perso"
},
{
"path": "Hazel/vendor/mono/LICENSE",
"chars": 73451,
"preview": "\nIn general, the runtime and its class libraries are licensed under the\nterms of the MIT license, and some third party c"
},
{
"path": "Hazel/vendor/mono/README.md",
"chars": 21428,
"preview": "Mono is a software platform designed to allow developers to easily\ncreate cross platform applications. It is an open so"
},
{
"path": "Hazel/vendor/mono/include/mono/jit/jit.h",
"chars": 3474,
"preview": "/**\n * \\file\n * Author:\n * Dietmar Maurer (dietmar@ximian.com)\n *\n * (C) 2001, 2002, 2003 Ximian, Inc.\n */\n\n#ifndef _M"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/abi-details.h",
"chars": 2545,
"preview": "/**\n * \\file\n * Copyright 2014 Xamarin Inc\n * Licensed under the MIT license. See LICENSE file in the project root for f"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/appdomain-icalls.h",
"chars": 500,
"preview": "/**\n * \\file\n * Appdomain-related icalls.\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE fil"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/appdomain.h",
"chars": 5442,
"preview": "/**\n * \\file\n * AppDomain functions\n *\n * Author:\n *\tDietmar Maurer (dietmar@ximian.com)\n *\n * (C) 2001 Ximian, Inc.\n */"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/assembly-internals.h",
"chars": 6213,
"preview": "/**\n * \\file\n * Copyright 2015 Xamarin Inc\n * Licensed under the MIT license. See LICENSE file in the project root for f"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/assembly.h",
"chars": 6376,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONONET_METADATA_ASSEMBLY_H_ \n#define _MONONET_METADATA_ASSEMBLY_H_\n\n#include <mono/utils/mon"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/attach.h",
"chars": 323,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_ATTACH_H__\n#define __MONO_ATTACH_H__\n\n#include <glib.h>\n#include <mono/utils/mono-compi"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/attrdefs.h",
"chars": 8588,
"preview": "/**\n * \\file\n * This file contains the various definitions for constants\n * found on the metadata tables\n *\n * Author:\n "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/blob.h",
"chars": 3600,
"preview": "/**\n * \\file\n * Definitions used to pull information out of the Blob\n *\n */\n#ifndef _MONO_METADATA_BLOB_H_\n#define _MONO"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/callspec.h",
"chars": 1030,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_CALLSPEC_H__\n#define __MONO_CALLSPEC_H__\n#include <glib.h>\n#include <mono/utils/mono-co"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/cil-coff.h",
"chars": 9246,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_CIL_COFF_H__\n#define __MONO_CIL_COFF_H__\n\n#include <mono/metadata/metadata.h>\n#include "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-abi-details.h",
"chars": 859,
"preview": "/**\n * \\file Declarations of MonoClass field offset functions\n * Copyright 2018 Microsoft\n * Licensed under the MIT lice"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-getters.h",
"chars": 8107,
"preview": "/* \n * \\file Definitions of getters for the fields of struct _MonoClass\n *\n * Copyright 2018 Microsoft\n * Licensed under"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-init.h",
"chars": 2051,
"preview": "/**\n * \\file\n * Copyright 2018 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-inlines.h",
"chars": 4185,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-internals.h",
"chars": 47778,
"preview": "/**\n * \\file\n * Copyright 2012 Xamarin Inc\n * Licensed under the MIT license. See LICENSE file in the project root for f"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class-private-definition.h",
"chars": 5554,
"preview": "/**\n * \\file Definitions of struct _MonoClass members\n *\n * NOTE: This file should NOT be included directly.\n */\n\n#if de"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/class.h",
"chars": 8444,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_CLI_CLASS_H_\n#define _MONO_CLI_CLASS_H_\n\n#include <mono/metadata/metadata.h>\n#include <m"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/cominterop-win32-internals.h",
"chars": 1454,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/cominterop.h",
"chars": 1924,
"preview": "/**\n * \\file\n * COM Interop Support\n * \n *\n * (C) 2002 Ximian, Inc. http://www.ximian.com\n *\n */\n\n#ifndef __MONO_COMINT"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/console-io.h",
"chars": 605,
"preview": "/**\n * \\file\n * Console IO internal calls\n *\n * Author:\n *\tGonzalo Paniagua Javier (gonzalo@ximian.com)\n *\n * Copyright "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/console-win32-internals.h",
"chars": 519,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/coree-internals.h",
"chars": 1047,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/coree.h",
"chars": 1397,
"preview": "/**\n * \\file\n * mscoree.dll functions\n *\n * Author:\n * Kornel Pal <http://www.kornelpal.hu/>\n *\n * Copyright (C) 2008 "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/culture-info-tables.h",
"chars": 517102,
"preview": "\n/* This is a generated file. Do not edit. See tools/locale-builder. */\n#ifndef MONO_METADATA_CULTURE_INFO_TABLES\n#defin"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/culture-info.h",
"chars": 4389,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_METADATA_CULTURE_INFO_H_\n#define _MONO_METADATA_CULTURE_INFO_H_ 1\n\n#include <glib.h>\n#in"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/custom-attrs-internals.h",
"chars": 1547,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_METADATA_CUSTOM_ATTRS_INTERNALS_H__\n#define __MONO_METADATA_CUSTOM_ATTRS_INTERNALS_H__\n"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/debug-helpers.h",
"chars": 2084,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_DEBUG_HELPERS_H__\n#define __MONO_DEBUG_HELPERS_H__\n\n#include <mono/metadata/class.h>\n\nM"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/debug-internals.h",
"chars": 2198,
"preview": "#ifndef __DEBUG_INTERNALS_H__\n#define __DEBUG_INTERNALS_H__\n\n#include <glib.h>\n#include <mono/metadata/debug-helpers.h>\n"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/debug-mono-ppdb.h",
"chars": 1298,
"preview": "/**\n * \\file\n * Support for the portable PDB symbol file format\n *\n *\n * Author:\n *\tMono Project (http://www.mono-projec"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/debug-mono-symfile.h",
"chars": 3654,
"preview": "/**\n * \\file\n * This header is only installed for use by the debugger:\n * the structures and the API declared here are n"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/domain-internals.h",
"chars": 21356,
"preview": "/**\n * \\file\n * Appdomain-related internal data structures and functions.\n * Copyright 2012 Xamarin Inc (http://www.xama"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/dynamic-image-internals.h",
"chars": 1606,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/dynamic-stream-internals.h",
"chars": 859,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/environment.h",
"chars": 445,
"preview": "/**\n * \\file\n * System.Environment support internal calls\n *\n * Author:\n *\tDick Porter (dick@ximian.com)\n *\n * (C) 2002 "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/exception-internals.h",
"chars": 3175,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_METADATA_EXCEPTION_INTERNALS_H_\n#define _MONO_METADATA_EXCEPTION_INTERNALS_H_\n\n#include "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/exception.h",
"chars": 5164,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_METADATA_EXCEPTION_H_\n#define _MONO_METADATA_EXCEPTION_H_\n\n#include <mono/metadata/objec"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/external-only.h",
"chars": 753,
"preview": "/**\n * \\file\n * Shorthand and markers for functions only used by embedders.\n * MONO_ENTER_GC_UNSAFE is also a good ind"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/fdhandle.h",
"chars": 962,
"preview": "\n#ifndef __MONO_METADATA_FDHANDLE_H__\n#define __MONO_METADATA_FDHANDLE_H__\n\n#include <config.h>\n#include <glib.h>\n\n#incl"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/file-mmap.h",
"chars": 1457,
"preview": "/**\n * \\file\n * Managed mmap wrappers.\n *\n * Authors:\n *\tRodrigo Kumpera\n *\n * Copyright 2014 Xamarin Inc (http://www.xa"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/filewatcher.h",
"chars": 857,
"preview": "/**\n * \\file\n * File System Watcher internal calls\n *\n * Authors:\n *\tGonzalo Paniagua Javier (gonzalo@ximian.com)\n *\n * "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/gc-internals.h",
"chars": 15294,
"preview": "/**\n * \\file\n * Internal GC interface\n *\n * Author: Paolo Molaro <lupus@ximian.com>\n *\n * (C) 2002 Ximian, Inc.\n * Copyr"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/handle-decl.h",
"chars": 3578,
"preview": "/**\n * \\file\n * Handle to object in native code\n *\n * Authors:\n * - Ludovic Henry <ludovic@xamarin.com>\n * - Aleksey K"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/handle.h",
"chars": 24650,
"preview": "/**\n * \\file\n * Handle to object in native code\n *\n * Authors:\n * - Ludovic Henry <ludovic@xamarin.com>\n * - Aleksey K"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-decl.h",
"chars": 18366,
"preview": "/**\n * \\file\n * Copyright 2018 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-def-netcore.h",
"chars": 50732,
"preview": "ICALL_TYPE(SAFEWAITHANDLE, \"Microsoft.Win32.SafeHandles.SafeWaitHandle\", SAFEWAITHANDLE_1) // && UNIX\nNOHANDLES(ICALL(SA"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-def.h",
"chars": 106485,
"preview": "/**\n * \\file\n * This file contains the default set of the mono internal calls.\n * Each type that has internal call metho"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-internals.h",
"chars": 3605,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-signatures.h",
"chars": 11624,
"preview": "/**\n * \\file\n * Licensed under the MIT license. See LICENSE file in the project root for full license information.\n *\n *"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-table.h",
"chars": 32760,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icall-windows-internals.h",
"chars": 587,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/icalls.h",
"chars": 417,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_METADATA_ICALLS_H__\n#define __MONO_METADATA_ICALLS_H__\n\n#include <mono/utils/mono-publi"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/image-internals.h",
"chars": 938,
"preview": "/**\n * \\file\n * Copyright 2015 Xamarin Inc\n * Licensed under the MIT license. See LICENSE file in the project root for f"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/image.h",
"chars": 4457,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONONET_METADATA_IMAGE_H_ \n#define _MONONET_METADATA_IMAGE_H_\n\n#include <stdio.h>\n#include <m"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/jit-icall-reg.h",
"chars": 16057,
"preview": "/**\n * \\file\n * Enum for JIT icalls: MonoJitICallId MONO_JIT_ICALL_mono_foo, etc.\n * Static storage for JIT icall in"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/loaded-images-internals.h",
"chars": 1617,
"preview": "/**\n* \\file\n*/\n\n#ifndef _MONO_METADATA_IMAGE_HASHES_H_\n#define _MONO_METADATA_IMAGE_HASHES_H_\n\n#include <glib.h>\n#includ"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/loader-internals.h",
"chars": 2860,
"preview": "/**\n* \\file\n*/\n\n#ifndef _MONO_METADATA_LOADER_INTERNALS_H_\n#define _MONO_METADATA_LOADER_INTERNALS_H_\n\n#include <glib.h>"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/loader.h",
"chars": 3431,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_METADATA_LOADER_H_\n#define _MONO_METADATA_LOADER_H_ 1\n\n#include <mono/utils/mono-forward"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/locales.h",
"chars": 1761,
"preview": "/**\n * \\file\n * Culture-sensitive handling\n *\n * Authors:\n *\tDick Porter (dick@ximian.com)\n *\n * (C) 2003 Ximian, Inc.\n "
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/lock-tracer.h",
"chars": 1475,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_METADATA_LOCK_TRACER_H__\n#define __MONO_METADATA_LOCK_TRACER_H__\n\n/*This is a private h"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/marshal-ilgen.h",
"chars": 268,
"preview": "/**\n * \\file\n * Copyright 2018 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/marshal-internals.h",
"chars": 1010,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/marshal-windows-internals.h",
"chars": 514,
"preview": "/**\n * \\file\n * Copyright 2016 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/marshal.h",
"chars": 23636,
"preview": "/**\n * \\file\n * Routines for marshaling complex types in P/Invoke methods.\n * \n * Author:\n * Paolo Molaro (lupus@ximia"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/mempool-internals.h",
"chars": 1811,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_MEMPOOL_INTERNALS_H_\n#define _MONO_MEMPOOL_INTERNALS_H_\n\n#include <glib.h>\n\n#include \"mo"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/mempool.h",
"chars": 1042,
"preview": "/**\n * \\file\n */\n\n#ifndef _MONO_MEMPOOL_H_\n#define _MONO_MEMPOOL_H_\n\n#include <mono/utils/mono-publib.h>\n\ntypedef struct"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/metadata-internals.h",
"chars": 38871,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_METADATA_INTERNALS_H__\n#define __MONO_METADATA_INTERNALS_H__\n\n#include \"mono/utils/mono"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/metadata.h",
"chars": 18324,
"preview": "/**\n * \\file\n */\n\n#ifndef __MONO_METADATA_H__\n#define __MONO_METADATA_H__\n\n#include <mono/utils/mono-publib.h>\n\n#include"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/method-builder-ilgen-internals.h",
"chars": 910,
"preview": "/**\n * \\file\n * Copyright 2018 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
},
{
"path": "Hazel/vendor/mono/include/mono/metadata/method-builder-ilgen.h",
"chars": 3450,
"preview": "/**\n * \\file\n * Copyright 2018 Microsoft\n * Licensed under the MIT license. See LICENSE file in the project root for ful"
}
]
// ... and 232 more files (download for full content)
About this extraction
This page contains the full source code of the TheCherno/Hazel GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 432 files (74.3 MB), approximately 897.8k tokens, and a symbol index with 2609 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.