Fixed UI Image

This commit is contained in:
2023-05-10 23:35:10 -07:00
parent cdf9b0a35d
commit 642f1408ff
2 changed files with 6 additions and 5 deletions

View File

@ -59,8 +59,8 @@ void UIImage::onStart() {
}, this->eventAlignmentUpdated);
QuadMesh::initQuadMesh(&mesh,
glm::vec2(0, 0), glm::vec2(0, 0),
glm::vec2(width, height), glm::vec2(1, 1),
glm::vec2(0, 0), glm::vec2(0, 1),
glm::vec2(width, height), glm::vec2(1, 0),
0.0f
);
}

View File

@ -26,13 +26,14 @@ namespace Dawn {
canvas = UICanvas::create(this);
camera = Camera::create(this);
camera->fov = 0.436332f;
camera->transform->lookAt(glm::vec3(900, 900, 900), glm::vec3(800, 800, 800));
glm::vec3 off = glm::vec3(90000, 100, 100);
camera->transform->lookAt(glm::vec3(10, 10, 10) + off, glm::vec3(0, 0, 0) + off);
camNew = Camera::create(this);
auto camTexture = camNew->item->addComponent<CameraTexture>();
camNew->fov = 0.436332f;
camNew->transform->lookAt(glm::vec3(10, 10, 10), glm::vec3(0, 0, 0));
camTexture->renderTarget.setSize(256, 256);
camTexture->renderTarget.setSize(1024, 1024);
auto cube = SimpleSpinningCubePrefab::create(this);