Testing the limits of the Canvas renderer
This commit is contained in:
@ -57,6 +57,7 @@ struct RenderPassContext &ctx
|
||||
}
|
||||
flushPass();
|
||||
|
||||
std::cout << "Passes: " << passes.size() << "\n";
|
||||
return passes;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,8 @@ void Dawn::helloWorldScene(Scene &s) {
|
||||
|
||||
auto cameraItem = s.createSceneItem();
|
||||
auto camera = cameraItem->addComponent<Camera>();
|
||||
cameraItem->lookAt({ 120, 120, 120 }, { 0, 0, 0 }, { 0, 1, 0 });
|
||||
cameraItem->lookAt({ 1200, 1200, 1200 }, { 0, 0, 0 }, { 0, 1, 0 });
|
||||
camera->clipFar = 99999.99f;
|
||||
|
||||
// auto quad = s.createSceneItem();
|
||||
// auto quadMesh = std::make_shared<Mesh>();
|
||||
@ -62,7 +63,12 @@ void Dawn::helloWorldScene(Scene &s) {
|
||||
// rect2->color = COLOR_BLUE;
|
||||
// uiCanvas->components.push_back(rect2);
|
||||
|
||||
auto label = std::make_shared<UILabel>();
|
||||
label->setFont(texture);
|
||||
uiCanvas->components.push_back(label);
|
||||
for(float_t x = -20; x <= 20; x++) {
|
||||
for(float_t y = -20; y <= 20; y++) {
|
||||
auto label = std::make_shared<UILabel>();
|
||||
label->setFont(texture);
|
||||
label->position = { x * 64, y * 32 };
|
||||
uiCanvas->components.push_back(label);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@
|
||||
#include "display/shader/Shader.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
#define UI_SHADER_QUAD_COUNT 32
|
||||
#define UI_SHADER_TEXTURE_COUNT 6
|
||||
#define UI_SHADER_QUAD_COUNT 1024
|
||||
#define UI_SHADER_TEXTURE_COUNT 16
|
||||
|
||||
struct UIShaderQuad {
|
||||
glm::vec4 quad;
|
||||
|
Reference in New Issue
Block a user