mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 13:22:23 +08:00
~ use clearcolor from scene instead of using black
~ camera should use it's own getters, not access the m_camera object directly Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
d13ad3fdca
commit
e285b313e0
4
main.cpp
4
main.cpp
@ -319,14 +319,14 @@ int main (int argc, char* argv[])
|
||||
// change viewport to render to the correct portion of the display
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->setViewPort (*cur);
|
||||
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->beginScene (false, true, irr::video::SColor(0, 0, 0, 0));
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->beginScene (false, true, sceneRender->getScene ()->getClearColor ().toSColor());
|
||||
IrrlichtContext->getDevice ()->getSceneManager ()->drawAll ();
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->endScene ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->beginScene (true, true, irr::video::SColor(0, 0, 0, 0));
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->beginScene (true, true, sceneRender->getScene ()->getClearColor ().toSColor());
|
||||
IrrlichtContext->getDevice ()->getSceneManager ()->drawAll ();
|
||||
IrrlichtContext->getDevice ()->getVideoDriver ()->endScene ();
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ CCamera::CCamera (CScene* scene, Core::Scenes::CCamera* camera) :
|
||||
m_scene (scene)
|
||||
{
|
||||
this->m_sceneCamera = scene->getContext ()->getDevice ()->getSceneManager ()->addCameraSceneNode (
|
||||
scene, *this->m_camera->getCenter (), *this->m_camera->getEye (), scene->nextId ()
|
||||
scene, *this->getCenter (), *this->getEye (), scene->nextId ()
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,8 +37,8 @@ void CCamera::setOrthogonalProjection (irr::f32 width, irr::f32 height)
|
||||
irr::core::matrix4 identity; identity.makeIdentity ();
|
||||
irr::core::matrix4 orthogonalProjection; orthogonalProjection.buildProjectionMatrixOrthoLH (
|
||||
width, height,
|
||||
0.0f,
|
||||
this->m_camera->getUp ()->Y
|
||||
this->getEye ()->Z,
|
||||
this->getCenter ()->Z
|
||||
);
|
||||
|
||||
this->m_sceneCamera->setProjectionMatrix (orthogonalProjection);
|
||||
|
Loading…
Reference in New Issue
Block a user