refactor: split GLRenderer so the class is not tangled with GL macros

This commit is contained in:
MatthewBeshay 2026-04-08 20:16:28 +10:00
parent ece6582e28
commit c29d871fc9
110 changed files with 710 additions and 570 deletions

View file

@ -1,4 +1,5 @@
#include "Lighting.h" #include "Lighting.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "MemoryTracker.h" #include "MemoryTracker.h"
#include "platform/stubs.h"
#include <utility> #include <utility>
#include <vector> #include <vector>

View file

@ -1,4 +1,5 @@
#include "Minecraft.h" #include "Minecraft.h"
#include "platform/stubs.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,5 @@
#include "Button.h" #include "Button.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "minecraft/client/Minecraft.h" #include "minecraft/client/Minecraft.h"

View file

@ -1,4 +1,5 @@
#include "DeathScreen.h" #include "DeathScreen.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "Font.h" #include "Font.h"
#include "platform/stubs.h"
#include <string.h> #include <string.h>

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "Gui.h" #include "Gui.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "GuiComponent.h" #include "GuiComponent.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "Minimap.h" #include "Minimap.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "SlideButton.h" #include "SlideButton.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "minecraft/client/Minecraft.h" #include "minecraft/client/Minecraft.h"

View file

@ -1,4 +1,5 @@
#include "TradeSwitchButton.h" #include "TradeSwitchButton.h"
#include "platform/stubs.h"
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "AchievementPopup.h" #include "AchievementPopup.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "AbstractBeaconButton.h" #include "AbstractBeaconButton.h"
#include "platform/stubs.h"
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "BeaconScreen.h" #include "BeaconScreen.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "BrewingStandScreen.h" #include "BrewingStandScreen.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "ContainerScreen.h" #include "ContainerScreen.h"
#include "platform/stubs.h"
#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/client/gui/inventory/AbstractContainerScreen.h"
#include "minecraft/client/Minecraft.h" #include "minecraft/client/Minecraft.h"

View file

@ -1,4 +1,5 @@
#include "CraftingScreen.h" #include "CraftingScreen.h"
#include "platform/stubs.h"
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "EnchantmentScreen.h" #include "EnchantmentScreen.h"
#include "platform/stubs.h"
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "FurnaceScreen.h" #include "FurnaceScreen.h"
#include "platform/stubs.h"
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "HopperScreen.h" #include "HopperScreen.h"
#include "platform/stubs.h"
#include "minecraft/client/gui/Font.h" #include "minecraft/client/gui/Font.h"
#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/client/gui/inventory/AbstractContainerScreen.h"

View file

@ -1,4 +1,5 @@
#include "HorseInventoryScreen.h" #include "HorseInventoryScreen.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "InventoryScreen.h" #include "InventoryScreen.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "MerchantScreen.h" #include "MerchantScreen.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "RepairScreen.h" #include "RepairScreen.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "ChestModel.h" #include "ChestModel.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/geom/ModelPart.h"

View file

@ -1,4 +1,5 @@
#include "ChickenModel.h" #include "ChickenModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "GhastModel.h" #include "GhastModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "minecraft/util/Log.h" #include "minecraft/util/Log.h"
#include "platform/stubs.h"
#include "HumanoidModel.h" #include "HumanoidModel.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "ModelHorse.h" #include "ModelHorse.h"
#include "platform/stubs.h"
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "OcelotModel.h" #include "OcelotModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "QuadrupedModel.h" #include "QuadrupedModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "WolfModel.h" #include "WolfModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "DragonModel.h" #include "DragonModel.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "EnderCrystalModel.h" #include "EnderCrystalModel.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "ModelPart.h" #include "ModelPart.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "FootstepParticle.h" #include "FootstepParticle.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "HugeExplosionParticle.h" #include "HugeExplosionParticle.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "ParticleEngine.h" #include "ParticleEngine.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "TakeAnimationParticle.h" #include "TakeAnimationParticle.h"
#include "platform/stubs.h"

View file

@ -1,4 +1,5 @@
#include "Chunk.h" #include "Chunk.h"
#include "platform/stubs.h"
#include <string.h> #include <string.h>

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "minecraft/util/Log.h" #include "minecraft/util/Log.h"
#include "ItemInHandRenderer.h" #include "ItemInHandRenderer.h"

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "minecraft/util/Log.h" #include "minecraft/util/Log.h"
#include "LevelRenderer.h" #include "LevelRenderer.h"

View file

@ -1,4 +1,5 @@
#include "OffsettedRenderList.h" #include "OffsettedRenderList.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "java/IntBuffer.h" #include "java/IntBuffer.h"

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "Textures.h" #include "Textures.h"
#include <assert.h> #include <assert.h>

View file

@ -1,4 +1,5 @@
#include "TileRenderer.h" #include "TileRenderer.h"
#include "platform/stubs.h"
#include <assert.h> #include <assert.h>

View file

@ -7,6 +7,7 @@
#include <vector> #include <vector>
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "platform/stubs.h"
#include "java/FloatBuffer.h" #include "java/FloatBuffer.h"
#include "minecraft/client/MemoryTracker.h" #include "minecraft/client/MemoryTracker.h"

View file

@ -1,4 +1,5 @@
#include "ArrowRenderer.h" #include "ArrowRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "BatRenderer.h" #include "BatRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "BoatRenderer.h" #include "BoatRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "CaveSpiderRenderer.h" #include "CaveSpiderRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "CreeperRenderer.h" #include "CreeperRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "DefaultRenderer.h" #include "DefaultRenderer.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"

View file

@ -1,4 +1,5 @@
#include "EnderCrystalRenderer.h" #include "EnderCrystalRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "EnderDragonRenderer.h" #include "EnderDragonRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "EndermanRenderer.h" #include "EndermanRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "minecraft/util/Log.h" #include "minecraft/util/Log.h"
#include "platform/stubs.h"
#include "EntityRenderDispatcher.h" #include "EntityRenderDispatcher.h"
#include <assert.h> #include <assert.h>

View file

@ -1,4 +1,5 @@
#include "EntityRenderer.h" #include "EntityRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "ExperienceOrbRenderer.h" #include "ExperienceOrbRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "FallingTileRenderer.h" #include "FallingTileRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "FireballRenderer.h" #include "FireballRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "FishingHookRenderer.h" #include "FishingHookRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "GhastRenderer.h" #include "GhastRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "GiantMobRenderer.h" #include "GiantMobRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "HorseRenderer.h" #include "HorseRenderer.h"
#include "platform/stubs.h"
#include <utility> #include <utility>

View file

@ -1,4 +1,5 @@
#include "HumanoidMobRenderer.h" #include "HumanoidMobRenderer.h"
#include "platform/stubs.h"
#include <utility> #include <utility>
#include <vector> #include <vector>

View file

@ -1,6 +1,7 @@
#include <string> #include <string>
#include "platform/stubs.h"
#include "EntityRenderDispatcher.h" #include "EntityRenderDispatcher.h"
#include "minecraft/client/renderer/TileRenderer.h" #include "minecraft/client/renderer/TileRenderer.h"

View file

@ -1,4 +1,5 @@
#include "ItemRenderer.h" #include "ItemRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "ItemSpriteRenderer.h" #include "ItemSpriteRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "LavaSlimeRenderer.h" #include "LavaSlimeRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "LeashKnotRenderer.h" #include "LeashKnotRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "LightningBoltRenderer.h" #include "LightningBoltRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "LivingEntityRenderer.h" #include "LivingEntityRenderer.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "MinecartRenderer.h" #include "MinecartRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>

View file

@ -1,4 +1,5 @@
#include "MobRenderer.h" #include "MobRenderer.h"
#include "platform/stubs.h"
#include <math.h> #include <math.h>

View file

@ -1,4 +1,5 @@
#include "MushroomCowRenderer.h" #include "MushroomCowRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "OcelotRenderer.h" #include "OcelotRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "PaintingRenderer.h" #include "PaintingRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "platform/stubs.h"
#include "PlayerRenderer.h" #include "PlayerRenderer.h"
#include <cmath> #include <cmath>

View file

@ -1,4 +1,5 @@
#include "SheepRenderer.h" #include "SheepRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "SkeletonRenderer.h" #include "SkeletonRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "SlimeRenderer.h" #include "SlimeRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "SnowManRenderer.h" #include "SnowManRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "SpiderRenderer.h" #include "SpiderRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "SquidRenderer.h" #include "SquidRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "TntMinecartRenderer.h" #include "TntMinecartRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "TntRenderer.h" #include "TntRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "VillagerGolemRenderer.h" #include "VillagerGolemRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "VillagerRenderer.h" #include "VillagerRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "WitchRenderer.h" #include "WitchRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <vector> #include <vector>

View file

@ -1,4 +1,5 @@
#include "WitherBossRenderer.h" #include "WitherBossRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "WitherSkullRenderer.h" #include "WitherSkullRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "WolfRenderer.h" #include "WolfRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "minecraft/util/Log.h" #include "minecraft/util/Log.h"
#include "platform/stubs.h"
#include "Texture.h" #include "Texture.h"
#include <string.h> #include <string.h>

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "platform/stubs.h"
#include <format> #include <format>
#include <string> #include <string>

View file

@ -1,4 +1,5 @@
#include "BeaconRenderer.h" #include "BeaconRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "ChestRenderer.h" #include "ChestRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <numbers> #include <numbers>

View file

@ -1,4 +1,5 @@
#include "EnchantTableRenderer.h" #include "EnchantTableRenderer.h"
#include "platform/stubs.h"
#include <cmath> #include <cmath>
#include <memory> #include <memory>

View file

@ -1,4 +1,5 @@
#include "EnderChestRenderer.h" #include "EnderChestRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>
#include <numbers> #include <numbers>

View file

@ -1,4 +1,5 @@
#include "MobSpawnerRenderer.h" #include "MobSpawnerRenderer.h"
#include "platform/stubs.h"
#include "platform/renderer/renderer.h" #include "platform/renderer/renderer.h"
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"

View file

@ -1,4 +1,5 @@
#include "PistonPieceRenderer.h" #include "PistonPieceRenderer.h"
#include "platform/stubs.h"
#include <memory> #include <memory>

Some files were not shown because too many files have changed in this diff Show more