text
stringlengths
1
24.5M
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class EditorRenderer : public Renderer { public: EditorRenderer(); void Start() override; void Update() override; }; }
#include <Engine/Engine.hpp> #include <Files/Files.hpp> #include <Graphics/Graphics.hpp> #include "EditorRenderer.hpp" #include "Plugins.hpp" using namespace acid; using namespace test; int main(int argc, char **argv) { // Creates the engine. auto engine = std::make_unique<Engine>(argv[0]); // Registers file sea...
#include "Plugins.hpp" #define CR_HOST CR_SAFE #include <cr.h> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> #include <Uis/Uis.hpp> namespace test { Plugins::Plugins() : loadedPath(std::filesystem::current_path() / CR_PLUGIN("EditorTest")), fileObserver(loadedPath, 0.5s), plugin(std::make_unique<c...
#pragma once #include <Engine/Engine.hpp> #include <Files/FileObserver.hpp> #include <Files/Files.hpp> #include <Inputs/Buttons/KeyboardInputButton.hpp> #include "Uis/Panels.hpp" using namespace acid; struct cr_plugin; namespace test { /** * Module used for managing the world. */ class Plugins : public Module::Re...
#include "Hierarchy.hpp" #include <Uis/Drivers/ConstantDriver.hpp> namespace test { int32_t GetNextY() { static uint32_t i = 0; return i++ * (UiButtonInput::Size.y + 6); } Hierarchy::Hierarchy() { //section1.SetTransform({{0.08f, 0.05f}, UiAnchor::LeftTop}); section1.SetTitle("Section Left"); UiPanel::AddChild(...
#pragma once #include <Uis/Inputs/UiButtonInput.hpp> #include <Uis/Inputs/UiGrabberInput.hpp> #include <Uis/Inputs/UiSliderInput.hpp> #include <Uis/Inputs/UiTextInput.hpp> //#include <Uis/Inputs/UiColourWheel.hpp> #include <Uis/UiSection.hpp> #include <Uis/UiPanel.hpp> #include <Guis/Gui.hpp> using namespace acid; n...
#include "Inspector.hpp" #include <Audio/Audio.hpp> namespace test { Inspector::Inspector() { //section1.SetTransform({{0.08f, 0.05f}, UiAnchor::LeftTop}); section1.SetTitle("Section Right"); UiPanel::AddChild(&section1); //button1.SetTransform({{0.0f, 0.0f}, UiAnchor::LeftTop}); button1.SetTitle("Button #2"); ...
#pragma once #include <Uis/Inputs/UiButtonInput.hpp> #include <Uis/Inputs/UiGrabberInput.hpp> #include <Uis/Inputs/UiSliderInput.hpp> //#include <Uis/Inputs/UiRadioInput.hpp> #include <Uis/Inputs/UiTextInput.hpp> #include <Uis/UiSection.hpp> #include <Uis/UiPanel.hpp> #include <Guis/Gui.hpp> using namespace acid; na...
#include "Panels.hpp" namespace test { Panels::Panels() { //hierarchy.SetTransform({{400, 500}, UiAnchor::LeftTop}); AddChild(&hierarchy); //inspector.SetTransform({{1.0f, 0.0f}, UiAnchor::RightTop, {0.3f, 1.0f}}); AddChild(&inspector); } void Panels::UpdateObject() { } }
#pragma once #include "Hierarchy.hpp" #include "Inspector.hpp" using namespace acid; namespace test { class Panels : public UiObject { public: Panels(); void UpdateObject() override; private: Hierarchy hierarchy; Inspector inspector; }; }
#include "MainApp.hpp" #ifdef ACID_RELOAD #include <cr.h> #include <Inputs/Inputs.hpp> #include <Files/Files.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> #include <Uis/Uis.hpp> #include "MainRenderer.hpp" #include "Scenes/Scene1.hpp" #include "Resources/Resources.hpp" CR_EXPORT int cr_main(stru...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Fonts/FontsSubrender.hpp> #include <Gizmos/GizmosSubrender.hpp> #include <Guis/GuisSubrender.hpp> #include <Meshes/MeshesSubrender.hpp> #include <Models/Shapes/SphereModel.hpp> #include <Particles/ParticlesSubrender.hpp> #include <Post/Deferred/DeferredSubrender.hpp> #include <Pos...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "FpsCamera.hpp" #include <Inputs/Inputs.hpp> #include <Scenes/Scenes.hpp> #include <Scenes/Entity.hpp> #include <Maths/Maths.hpp> #include <Graphics/Graphics.hpp> #include "FpsPlayer.hpp" namespace test { constexpr static Vector3f ViewOffset(0.0f, 1.8f, 0.0f); FpsCamera::FpsCamera() { nearPlane = 0.1f; fa...
#pragma once #include <Scenes/Camera.hpp> using namespace acid; namespace test { class FpsCamera : public Camera { public: FpsCamera(); void Start() override; void Update() override; }; }
#include "FpsPlayer.hpp" #include <Uis/Uis.hpp> #include <Scenes/Scenes.hpp> #include <Inputs/Inputs.hpp> #include <Physics/KinematicCharacter.hpp> #include <Physics/Physics.hpp> namespace test { constexpr float WALK_SPEED = 3.1f; constexpr float RUN_SPEED = 5.7f; constexpr float CROUCH_SPEED = 1.2f; constexpr float ...
#pragma once #include <Scenes/Component.hpp> using namespace acid; namespace test { class FpsPlayer : public Component::Registrar<FpsPlayer> { inline static const bool Registered = Register("fpsPlayer"); public: FpsPlayer(); void Start() override; void Update() override; friend const Node &operator>>(const No...
#include "Scene1.hpp" #include <Files/File.hpp> #include <Files/Json/Json.hpp> #include <Gizmos/Gizmos.hpp> #include <Graphics/Graphics.hpp> #include <Inputs/Inputs.hpp> #include <Lights/Light.hpp> #include <Materials/DefaultMaterial.hpp> #include <Meshes/Mesh.hpp> #include <Models/Obj/ObjModel.hpp> #include <Models/S...
#pragma once #include <Audio/Sound.hpp> #include <Scenes/Scene.hpp> #include <Uis/UiStartLogo.hpp> #include "Uis/OverlayDebug.hpp" using namespace acid; namespace test { class Scene1 : public Scene { public: Scene1(); void Start() override; void Update() override; bool IsPaused() const override; private: Soun...
#include "OverlayDebug.hpp" #include <Uis/Constraints/PixelConstraint.hpp> #include <Uis/Constraints/RelativeConstraint.hpp> #include <Scenes/Scenes.hpp> #include <Guis/Gui.hpp> namespace test { OverlayDebug::OverlayDebug() { auto createText = [this](int32_t i, Text &object) { //object.SetTransform({{100, 12}, ...
#pragma once #include <Uis/UiObject.hpp> #include <Fonts/Text.hpp> using namespace acid; namespace test { class OverlayDebug : public UiObject { public: OverlayDebug(); void UpdateObject() override; private: Text textFrameTime; Text textFps; Text textUps; }; }
#include "MainApp.hpp" #include <Inputs/Inputs.hpp> #include <Files/Files.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" #include "Scenes/Scene1.hpp" #include "Resources/Resources.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. au...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Fonts/FontsSubrender.hpp> #include <Guis/GuisSubrender.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> namespace test { MainRenderer::MainRenderer() { std::vector<Attachment> renderpassAttachments0 = { {0, "depth", Attachment::Type::Depth}, {1, "swapchain"...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "Scene1.hpp" #include <Uis/Uis.hpp> namespace test { Scene1::Scene1() : Scene(std::make_unique<Camera>()) { //pannable.SetTransform({UiMargins::All}); Uis::Get()->GetCanvas().AddChild(&pannable); } void Scene1::Start() { } void Scene1::Update() { Scene::Update(); } bool Scene1::IsPaused() const { ret...
#pragma once #include <Scenes/Scene.hpp> #include "Uis/Pannable.hpp" using namespace acid; namespace test { class Scene1 : public Scene { public: Scene1(); void Start() override; void Update() override; bool IsPaused() const override; private: Pannable pannable; }; }
#include "Pannable.hpp" #include <Audio/Audio.hpp> #include <Inputs/Inputs.hpp> #include <Uis/Drivers/ConstantDriver.hpp> #include <Uis/Inputs/UiButtonInput.hpp> #include <Graphics/Graphics.hpp> #include <Uis/Uis.hpp> namespace test { Pannable::Pannable(){ //content.SetTransform({{1000, 1000}, UiAnchor::LeftTop, {0....
#pragma once #include <Uis/UiObject.hpp> #include <Fonts/Text.hpp> #include <Guis/Gui.hpp> #include <Uis/Inputs/UiBooleanInput.hpp> #include <Uis/Inputs/UiSliderInput.hpp> #include <Uis/UiPanel.hpp> using namespace acid; namespace test { class Pannable : public UiObject { public: Pannable(); void UpdateObject(...
#include "MainApp.hpp" #include <Inputs/Inputs.hpp> #include <Files/Files.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" #include "Scenes/Scene1.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. au...
#pragma once #include <Engine/App.hpp> #include <Files/FileObserver.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; private: FileObserver fileObserver; }; }
#include "MainRenderer.hpp" #include <Fonts/FontsSubrender.hpp> #include <Guis/GuisSubrender.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> namespace test { MainRenderer::MainRenderer() { std::vector<Attachment> renderpassAttachments0 = { {0, "depth", Attachment::Type::Depth}, {1, "swapchain"...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "Scene1.hpp" #include <Inputs/Inputs.hpp> #include <Uis/Constraints/PixelConstraint.hpp> #include <Uis/Constraints/RelativeConstraint.hpp> #include <Uis/Drivers/ConstantDriver.hpp> #include <Uis/Drivers/SlideDriver.hpp> #include <Uis/Uis.hpp> namespace test { constexpr Time UI_SLIDE_TIME = 0.2s; Scene1::Sce...
#pragma once #include <Scenes/Scene.hpp> #include <Uis/UiStartLogo.hpp> #include "Uis/Panels.hpp" #include "Uis/OverlayDebug.hpp" using namespace acid; namespace test { class Scene1 : public Scene { public: Scene1(); void Start() override; void Update() override; bool IsPaused() const override; void TogglePau...
#include "OverlayDebug.hpp" #include <Scenes/Scenes.hpp> #include <Uis/Constraints/PixelConstraint.hpp> #include <Uis/Constraints/RelativeConstraint.hpp> #include <Guis/Gui.hpp> namespace test { OverlayDebug::OverlayDebug() { /*//slices.SetTransform({{300, 300}, UiAnchor::Centre}); slices.GetConstraints().SetWidth<...
#pragma once #include <Uis/UiObject.hpp> #include <Fonts/Text.hpp> #include <Guis/Gui.hpp> using namespace acid; namespace test { class OverlayDebug : public UiObject { public: OverlayDebug(); void UpdateObject() override; private: //Gui slices; Text textFrameTime; Text textFps; Text textUps; }; }
#include "Panels.hpp" namespace test { int32_t GetNextY(uint32_t inc = 1) { static int32_t i = -1; i += inc; return i * (UiButtonInput::Size.y + 6); } constexpr uint32_t SIZE3_GAP = 2; constexpr auto SIZE3 = (UiButtonInput::Size - Vector2f(2 * SIZE3_GAP, 0)) * Vector2f((1.0f / 3.0f), 1.0f); Panels::Panels() { ...
#pragma once #include <Guis/Gui.hpp> #include <Uis/Inputs/UiBooleanInput.hpp> #include <Uis/Inputs/UiButtonInput.hpp> #include <Uis/Inputs/UiDropdownInput.hpp> #include <Uis/Inputs/UiGrabberInput.hpp> #include <Uis/Inputs/UiRadioInput.hpp> #include <Uis/Inputs/UiSliderInput.hpp> #include <Uis/Inputs/UiTextInput.hpp> #...
#include <Engine/Log.hpp> #include <Maths/Time.hpp> #include <Maths/Colour.hpp> #include <Maths/Matrix2.hpp> #include <Maths/Matrix3.hpp> #include <Maths/Matrix4.hpp> #include <Maths/Quaternion.hpp> #include <Maths/Vector2.hpp> #include <Maths/Vector3.hpp> #include <Maths/Vector4.hpp> #include <Maths/Transform.hpp> us...
#include <thread> #include <Engine/Log.hpp> #include <Network/Ftp/Ftp.hpp> #include <Network/Http/Http.hpp> #include <Network/Udp/UdpSocket.hpp> #include <Network/Packet.hpp> using namespace acid; int main(int argc, char **argv) { // TODO: Download a ZIP from Google Drive. /*{ Http http("http://drive.google.com/"...
#include <Zippy.hpp> #include <Engine/Log.hpp> #include "Config.hpp" std::filesystem::path PATH = acid::ACID_RESOURCES_DEV; std::unique_ptr<Zippy::ZipArchive> NewArchive(int index) { auto zipFilepath = std::filesystem::current_path() / ("data-" + std::to_string(index) + ".zip"); acid::Log::Out("New zip archive: ",...
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "Scenes/Scene1.hpp" #include "MainRenderer.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. au...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Fonts/FontsSubrender.hpp> #include <Guis/GuisSubrender.hpp> #include <Meshes/MeshesSubrender.hpp> #include <Particles/ParticlesSubrender.hpp> #include <Post/Deferred/DeferredSubrender.hpp> #include <Post/Filters/DefaultFilter.hpp> #include <Graphics/Graphics.hpp> #include <Shadows...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "FreeCamera.hpp" #include <Inputs/Inputs.hpp> #include <Maths/Maths.hpp> #include <Scenes/Scenes.hpp> namespace test { constexpr float WALK_SPEED = 3.0f; constexpr float RUN_SPEED = 7.0f; constexpr Vector3f DAMP(20.0f, 20.0f, 20.0f); FreeCamera::FreeCamera() { nearPlane = 0.1f; farPlane = 4098.0f; fieldO...
#pragma once #include <Scenes/Camera.hpp> using namespace acid; namespace test { class FreeCamera : public Camera { public: FreeCamera(); void Start() override; void Update() override; }; }
#include "Scene1.hpp" #include <Inputs/Inputs.hpp> #include <Lights/Light.hpp> #include <Materials/DefaultMaterial.hpp> #include <Gizmos/Gizmos.hpp> #include <Meshes/Mesh.hpp> #include <Models/Obj/ObjModel.hpp> #include <Models/Shapes/CubeModel.hpp> #include <Models/Shapes/SphereModel.hpp> #include <Physics/Physics.hp...
#pragma once #include <Scenes/Scene.hpp> #include "Uis/OverlayDebug.hpp" using namespace acid; namespace test { class Scene1 : public Scene { public: Scene1(); void Start() override; void Update() override; bool IsPaused() const override; private: OverlayDebug overlayDebug; }; }
#include "OverlayDebug.hpp" #include <Scenes/Scenes.hpp> #include <Uis/Constraints/PixelConstraint.hpp> #include <Uis/Constraints/RelativeConstraint.hpp> namespace test { OverlayDebug::OverlayDebug() { auto createText = [this](int32_t i, Text &object) { //object.SetTransform({{100, 12}, UiAnchor::LeftBottom, {2, -...
#pragma once #include <Uis/UiObject.hpp> #include <Fonts/Text.hpp> #include <Guis/Gui.hpp> using namespace acid; namespace test { class OverlayDebug : public UiObject { public: OverlayDebug(); void UpdateObject() override; private: Text textFrameTime; Text textFps; Text textUps; }; }
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> #include <Timers/Timers.hpp> #include "MainRenderer.hpp" #include "Scenes/Scene1.hpp" #include "World/World.hpp" #include "Resources/Resources.hpp" int main(int argc, char **arg...
#pragma once #include <Devices/Cursor.hpp> #include <Engine/App.hpp> #include "Configs/ConfigManager.hpp" using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; private: ConfigManager configManager; Cursor cursor; }; }...
#include "MainRenderer.hpp" #include <Fonts/FontsSubrender.hpp> #include <Gizmos/GizmosSubrender.hpp> #include <Graphics/Graphics.hpp> #include <Guis/GuisSubrender.hpp> #include <Meshes/MeshesSubrender.hpp> #include <Models/Shapes/SphereModel.hpp> #include <Particles/ParticlesSubrender.hpp> #include <Post/Deferred/Def...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "HeightDespawn.hpp" #include <Maths/Transform.hpp> #include <Scenes/Entity.hpp> namespace test { HeightDespawn::HeightDespawn(float removeHeight) : removeHeight(removeHeight) { } void HeightDespawn::Start() { } void HeightDespawn::Update() { if (auto transform = GetEntity()->GetComponent<Transform>(); ...
#pragma once #include <Scenes/Component.hpp> #include <Files/Node.hpp> using namespace acid; namespace test { class HeightDespawn : public Component::Registrar<HeightDespawn> { inline static const bool Registered = Register("heightDespawn"); public: explicit HeightDespawn(float removeHeight = -100.0f); void Star...
#include "NameTag.hpp" #include <Scenes/Entity.hpp> #include <Scenes/Scenes.hpp> #include <Uis/Uis.hpp> #include <Uis/Drivers/ConstantDriver.hpp> namespace test { static const float TEXT_SIZE = 8.0f; static const float VIEW_DISTANCE = 16.0f; NameTag::NameTag(const std::string &name, float heightOffset) : name(name)...
#pragma once #include <Scenes/Component.hpp> #include <Fonts/Text.hpp> using namespace acid; namespace test { class NameTag : public Component::Registrar<NameTag> { inline static const bool Registered = Register("heightDespawn"); public: explicit NameTag(const std::string &name = "", float heightOffset = 0.0f); ...
#include "Rotate.hpp" //#include <bullet/LinearMath/btTransform.h> #include <Scenes/Entity.hpp> #include <Engine/Engine.hpp> #include <Physics/Colliders/Collider.hpp> #include <Maths/Maths.hpp> namespace test { Rotate::Rotate(const Vector3f &direction, const int &test) : direction(direction), test(test) { } void R...
#pragma once #include <Scenes/Component.hpp> #include <Maths/Vector3.hpp> using namespace acid; namespace test { class Rotate : public Component::Registrar<Rotate> { inline static const bool Registered = Register("rotate"); public: explicit Rotate(const Vector3f &direction = Vector3f(), const int &test = 0); voi...
#include "ConfigManager.hpp" #include <Audio/Audio.hpp> #include <Devices/Windows.hpp> #include <Graphics/Graphics.hpp> #include <Files/Json/Json.hpp> #include <Timers/Timers.hpp> namespace test { ConfigManager::ConfigManager() : audio("Configs/Audio.json", std::make_unique<Json>()), graphics("Configs/Graphics.json...
#pragma once #include <rocket.hpp> #include <Files/File.hpp> using namespace acid; namespace test { class ConfigManager : public virtual rocket::trackable { public: ConfigManager(); void Load(); void Save(); private: File audio; File graphics; }; }
#include "FpsCamera.hpp" #include <Inputs/Inputs.hpp> #include <Scenes/Scenes.hpp> #include <Maths/Maths.hpp> #include <Graphics/Graphics.hpp> #include "FpsPlayer.hpp" namespace test { constexpr static Vector3f ViewOffset(0.0f, 1.8f, 0.0f); FpsCamera::FpsCamera() { nearPlane = 0.1f; farPlane = 4098.0f; fieldOfVie...
#pragma once #include <Scenes/Camera.hpp> using namespace acid; namespace test { class FpsCamera : public Camera { public: FpsCamera(); void Start() override; void Update() override; }; }
#include "FpsPlayer.hpp" #include <Inputs/Inputs.hpp> #include <Scenes/Scenes.hpp> #include <Scenes/Entity.hpp> #include <Physics/KinematicCharacter.hpp> #include <Physics/Physics.hpp> #include <Uis/Uis.hpp> namespace test { constexpr float WALK_SPEED = 3.1f; constexpr float RUN_SPEED = 5.7f; constexpr float CROUCH_S...
#pragma once #include <Scenes/Component.hpp> using namespace acid; namespace test { class FpsPlayer : public Component::Registrar<FpsPlayer> { inline static const bool Registered = Register("fpsPlayer"); public: FpsPlayer(); void Start() override; void Update() override; friend const Node &operator>>(const No...
#include "Scene1.hpp" #include <Animations/AnimatedMesh.hpp> #include <Audio/Sound.hpp> #include <Files/File.hpp> #include <Files/File.hpp> #include <Files/Json/Json.hpp> #include <Gizmos/Gizmos.hpp> #include <Graphics/Graphics.hpp> #include <Inputs/Inputs.hpp> #include <Lights/Light.hpp> #include <Materials/DefaultMa...
#pragma once #include <Scenes/Scene.hpp> #include <Uis/UiStartLogo.hpp> #include "Uis/OverlayDebug.hpp" using namespace acid; namespace test { class Scene1 : public Scene { public: Scene1(); void Start() override; void Update() override; bool IsPaused() const override; private: UiStartLogo uiStartLogo; Overl...
#include "CelestialBody.hpp" #include <Post/Filters/LensflareFilter.hpp> #include <Lights/Light.hpp> #include <Graphics/Graphics.hpp> #include "World/World.hpp" #include "Maths/Transform.hpp" namespace test { constexpr static Colour SUN_COLOUR_SUNRISE(0xEE9A90); constexpr static Colour SUN_COLOUR_NIGHT(0x0D0D1A); con...
#pragma once #include <Scenes/Component.hpp> #include <Scenes/Entity.hpp> #include <Files/Node.hpp> using namespace acid; namespace test { class CelestialBody : public Component::Registrar<CelestialBody> { inline static const bool Registered = Register("celestialBody"); public: enum class Type { Sun, Moon };...
#include "SkyboxCycle.hpp" #include <Skyboxes/SkyboxMaterial.hpp> #include <Maths/Colour.hpp> #include <Maths/Transform.hpp> #include "World/World.hpp" namespace test { static const Colour SKYBOX_COLOUR_DAY(0x003C8A); SkyboxCycle::SkyboxCycle(bool enableFog, bool enableRotation) : enableFog(enableFog), enableRotat...
#pragma once #include <Scenes/Component.hpp> #include <Scenes/Entity.hpp> #include <Files/Node.hpp> using namespace acid; namespace test { class SkyboxCycle : public Component::Registrar<SkyboxCycle> { inline static const bool Registered = Register("skyboxCycle"); public: explicit SkyboxCycle(bool enableFog = true...
#include "MeshTerrain.hpp" namespace test { MeshTerrain::MeshTerrain(const std::vector<float> &heightmap, float sideLength, float squareSize, uint32_t vertexCount, float textureScale) : SimpleMesh(sideLength, squareSize, vertexCount, textureScale), heightmap(heightmap) { GenerateMesh(); } Vertex3d MeshTerrain::Get...
#pragma once #include <Maths/Colour.hpp> #include <Models/Shapes/SimpleMesh.hpp> #include <Maths/Maths.hpp> using namespace acid; namespace test { class MeshTerrain : public SimpleMesh { public: MeshTerrain(const std::vector<float> &heightmap, float sideLength, float squareSize, uint32_t vertexCount, float textureS...
#include "Terrain.hpp" #include <Meshes/Mesh.hpp> #include <Physics/Colliders/HeightfieldCollider.hpp> #include <Physics/Rigidbody.hpp> namespace test { Terrain::Terrain(float sideLength, float squareSize) : noise(25653345), sideLength(sideLength), squareSize(squareSize), minHeight(+std::numeric_limits<float>::in...
#pragma once #include <FastNoiseLite.h> #include <Scenes/Component.hpp> #include <Scenes/Entity.hpp> #include <Models/Model.hpp> #include "MeshTerrain.hpp" using namespace acid; namespace test { class Terrain : public Component::Registrar<Terrain> { inline static const bool Registered = Register("terrain"); public...
#include "TerrainMaterial.hpp" #include <Maths/Transform.hpp> namespace test { TerrainMaterial::TerrainMaterial(std::shared_ptr<Image2d> imageR, std::shared_ptr<Image2d> imageG) : imageR(std::move(imageR)), imageG(std::move(imageG)) { } void TerrainMaterial::CreatePipeline(const Shader::VertexInput &vertexInput, b...
#pragma once #include <Materials/Material.hpp> #include <Graphics/Images/Image2d.hpp> using namespace acid; namespace test { class TerrainMaterial : public Material::Registrar<TerrainMaterial> { inline static const bool Registered = Register("terrain"); public: explicit TerrainMaterial(std::shared_ptr<Image2d> ima...
#include "OverlayDebug.hpp" #include <Scenes/Scenes.hpp> #include <Guis/Gui.hpp> #include <Uis/Constraints/PixelConstraint.hpp> #include <Uis/Constraints/RelativeConstraint.hpp> #include "World/World.hpp" namespace test { OverlayDebug::OverlayDebug() { auto createText = [this](int32_t i, Text &object) { //object.S...
#pragma once #include <Uis/UiObject.hpp> #include <Fonts/Text.hpp> using namespace acid; namespace test { class OverlayDebug : public UiObject { public: OverlayDebug(); void UpdateObject() override; private: Text textFrameTime; Text textFps; Text textUps; Text textTime; }; }
#include "World.hpp" #include <Post/Deferred/DeferredSubrender.hpp> #include <Post/Filters/LensflareFilter.hpp> #include <Graphics/Graphics.hpp> #include <Scenes/Scenes.hpp> #include <Shadows/Shadows.hpp> namespace test { constexpr static Colour FOG_COLOUR_SUNRISE = 0xEE9A90; constexpr static Colour FOG_COLOUR_NIGHT ...
#pragma once #include <Uis/Drivers/LinearDriver.hpp> #include <Scenes/Scenes.hpp> #include <Maths/Vector3.hpp> #include <Lights/Fog.hpp> using namespace acid; namespace test { class World : public System { public: World(); void Update() override; float GetDayFactor() const; float GetSunriseFactor() const; flo...
#include <bitmask.hpp> #include <Files/File.hpp> #include <Files/Files.hpp> #include <Maths/Matrix4.hpp> #include <Maths/Vector2.hpp> #include <Files/Node.hpp> #include <Files/Json/Json.hpp> #include <Files/Xml/Xml.hpp> //#include <Files/Yaml/Yaml.hpp> using namespace acid; namespace test { enum class ExampleType { ...
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. auto engine = std::make_unique<...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Graphics/Graphics.hpp> #include <Graphics/Pipelines/PipelineGraphics.hpp> namespace test { /* * Create something to render * It will have a pipeline graphics and shaders * The vertices are hardcoded into the shader for the first test * We disable Depth tests */ class Tutoria...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. auto engine = std::make_unique<...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Graphics/Graphics.hpp> #include "Graphics/Pipelines/PipelineGraphics.hpp" #include "Maths/Vector3.hpp" #include "Models/Model.hpp" namespace test { class TutorialVertex2 { public: /* * We need to describe how these are input to the shader * * from the shader: * layout(loc...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. auto engine = std::make_unique<...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }
#include "MainRenderer.hpp" #include <Graphics/Graphics.hpp> #include "Graphics/Pipelines/PipelineGraphics.hpp" #include "Maths/Vector3.hpp" #include "Models/Model.hpp" namespace test { class TutorialVertex3 { public: /* * We need to describe how these are input to the shader * * from the shader: * layout(loc...
#pragma once #include <Graphics/Renderer.hpp> using namespace acid; namespace test { class MainRenderer : public Renderer { public: MainRenderer(); void Start() override; void Update() override; }; }
#include "MainApp.hpp" #include <Files/Files.hpp> #include <Inputs/Inputs.hpp> #include <Graphics/Graphics.hpp> #include <Resources/Resources.hpp> #include <Scenes/Scenes.hpp> #include "MainRenderer.hpp" int main(int argc, char **argv) { using namespace test; // Creates the engine. auto engine = std::make_unique<...
#pragma once #include <Engine/App.hpp> using namespace acid; namespace test { class MainApp : public App { public: MainApp(); ~MainApp(); void Start() override; void Update() override; }; }