Remote TextPass, merged with UIPass

This commit is contained in:
Dynamitos committed 2026-10-20 22:01:51 +02:00
1 parent 332c47fc9d
commit 17dc1e4d88
11 files changed
+191 -179

No files matched your search

+1 -27
View File
@@ -1,7 +1,6 @@
#pragma once
#include "Graphics/Shader.h"
#include "RenderPass.h"
#include "Asset/FontAsset.h"
#include "UI/System.h"
namespace Seele {
@@ -28,20 +27,6 @@ class UIPass : public RenderPass {
void key(KeyCode code, InputAction action, KeyModifierFlags modifier, char text = 0) { system->key(code, action, (KeyModifier)modifier, text); }
private:
struct GlyphData {
Vector2 bearing;
Vector2 size;
uint32 advance;
};
struct GlyphInstanceData {
float x;
float y;
float z;
float width;
float height;
uint32 glyphIndex;
};
struct RenderElementStyle {
float x;
float y;
@@ -59,14 +44,6 @@ class UIPass : public RenderPass {
Gfx::RenderTargetAttachment depthAttachment;
Gfx::OTexture2D depthBuffer;
Gfx::ODescriptorLayout textDescriptorLayout;
Gfx::ODescriptorSet textDescriptorSet;
Gfx::OVertexShader textVertexShader;
Gfx::OFragmentShader textFragmentShader;
Gfx::OPipelineLayout textPipelineLayout;
Gfx::PGraphicsPipeline textPipeline;
Gfx::ODescriptorLayout uiDescriptorLayout;
Gfx::ODescriptorSet uiDescriptorSet;
@@ -79,13 +56,10 @@ class UIPass : public RenderPass {
UI::PSystem system;
Array<UI::UIRender> renderElements;
Array<GlyphInstanceData> glyphs;
Array<RenderElementStyle> elements;
Gfx::OShaderBuffer glyphInstanceBuffer;
constexpr static const char* GLYPHINSTANCE_NAME = "glyphData";
Gfx::OShaderBuffer elementBuffer;
constexpr static const char* ELEMENT_NAME = "elements";
Gfx::OSampler glyphSampler;
Gfx::OSampler uiSampler;
constexpr static const char* GLYPHSAMPLER_NAME = "glyphSampler";
Array<Gfx::PTexture2D> usedTextures;
constexpr static const char* TEXTURES_NAME = "textures";