Basic transform stuff

This commit is contained in:
2022-10-21 22:01:37 -07:00
parent 043873cc2d
commit be529b70c1
18 changed files with 363 additions and 38 deletions

View File

@ -41,14 +41,6 @@ void Camera::updateProjection() {
}
}
void Camera::lookAt(glm::vec3 pos, glm::vec3 look) {
this->lookAt(pos, look, glm::vec3(0, 1, 0));
}
void Camera::lookAt(glm::vec3 pos, glm::vec3 look, glm::vec3 up) {
this->item.transform = glm::lookAt(pos, look, up);
}
RenderTarget & Camera::getRenderTarget() {
if(this->target == nullptr) {
return this->getGame().renderManager.getBackBuffer();

View File

@ -48,9 +48,6 @@ namespace Dawn {
*/
void updateProjection();
void lookAt(glm::vec3 position, glm::vec3 look);
void lookAt(glm::vec3 position, glm::vec3 look, glm::vec3 up);
/**
* Returns the intended render target for this camera to render to, will
* automatically revert to the back buffer if no frame buffer is provided.