mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
day-night loop, dynamic skybox, clock on debug panel
This commit is contained in:
parent
4a9a4ddd14
commit
c08c31b0ad
24 changed files with 599 additions and 48 deletions
|
|
@ -42,11 +42,16 @@ mat4 Camera::getProjection(){
|
|||
return glm::ortho(0.0f, fov*aspect, 0.0f, fov);
|
||||
}
|
||||
|
||||
mat4 Camera::getView(){
|
||||
if (perspective)
|
||||
mat4 Camera::getView(bool pos){
|
||||
vec3 position = this->position;
|
||||
if (!pos) {
|
||||
position = vec3(0.0f);
|
||||
}
|
||||
if (perspective) {
|
||||
return glm::lookAt(position, position+front, up);
|
||||
else
|
||||
} else {
|
||||
return glm::translate(glm::mat4(1.0f), position);
|
||||
}
|
||||
}
|
||||
|
||||
mat4 Camera::getProjView(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue