Fixed UI Image
This commit is contained in:
@ -59,8 +59,8 @@ void UIImage::onStart() {
|
|||||||
}, this->eventAlignmentUpdated);
|
}, this->eventAlignmentUpdated);
|
||||||
|
|
||||||
QuadMesh::initQuadMesh(&mesh,
|
QuadMesh::initQuadMesh(&mesh,
|
||||||
glm::vec2(0, 0), glm::vec2(0, 0),
|
glm::vec2(0, 0), glm::vec2(0, 1),
|
||||||
glm::vec2(width, height), glm::vec2(1, 1),
|
glm::vec2(width, height), glm::vec2(1, 0),
|
||||||
0.0f
|
0.0f
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -26,13 +26,14 @@ namespace Dawn {
|
|||||||
canvas = UICanvas::create(this);
|
canvas = UICanvas::create(this);
|
||||||
|
|
||||||
camera = Camera::create(this);
|
camera = Camera::create(this);
|
||||||
camera->fov = 0.436332f;
|
glm::vec3 off = glm::vec3(90000, 100, 100);
|
||||||
camera->transform->lookAt(glm::vec3(900, 900, 900), glm::vec3(800, 800, 800));
|
camera->transform->lookAt(glm::vec3(10, 10, 10) + off, glm::vec3(0, 0, 0) + off);
|
||||||
|
|
||||||
camNew = Camera::create(this);
|
camNew = Camera::create(this);
|
||||||
auto camTexture = camNew->item->addComponent<CameraTexture>();
|
auto camTexture = camNew->item->addComponent<CameraTexture>();
|
||||||
|
camNew->fov = 0.436332f;
|
||||||
camNew->transform->lookAt(glm::vec3(10, 10, 10), glm::vec3(0, 0, 0));
|
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);
|
auto cube = SimpleSpinningCubePrefab::create(this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user