mirror of
https://github.com/Linloir/SceneEditor.git
synced 2026-02-04 12:23:34 +08:00
[CORE][CHG] Adapt to camera API change
This commit is contained in:
parent
1dc9959936
commit
db04a46510
@ -61,7 +61,7 @@ void ModelThumbnailWidget::paintGL() {
|
||||
_shaderProgram.bind();
|
||||
|
||||
glm::mat4 view = _camera.viewMatrix();
|
||||
glm::mat4 projection = glm::perspective(glm::radians(_camera.zoomVal()), (float)width() / (float)height(), 0.1f, 100.0f);
|
||||
glm::mat4 projection = _camera.projectionMatrix((float)width() / (float)height());
|
||||
_shaderProgram.setUniform("view", view);
|
||||
_shaderProgram.setUniform("projection", projection);
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ void SceneViewer::paintGL() {
|
||||
|
||||
// Set view and projection matrices
|
||||
glm::mat4 view = _camera.viewMatrix();
|
||||
glm::mat4 projection = glm::perspective(glm::radians(_camera.zoomVal()), (float)width() / (float)height(), 0.1f, 100.0f);
|
||||
glm::mat4 projection = _camera.projectionMatrix((float)width() / (float)height());
|
||||
_shaderProgram.setUniform("view", view);
|
||||
_shaderProgram.setUniform("projection", projection);
|
||||
_shaderProgram.setUniform("viewPos", _camera.position());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user