Added Scene::GetActiveCamera()
Also fixed a warning when instancing is used without lighting Former-commit-id: 5326e95f99a58ffcc91d7942ec2991482d7e58bd
This commit is contained in:
parent
5dd2d0d6a7
commit
56feddb100
|
|
@ -34,6 +34,7 @@ class NAZARA_API NzScene
|
||||||
void Cull();
|
void Cull();
|
||||||
void Draw();
|
void Draw();
|
||||||
|
|
||||||
|
const NzCamera* GetActiveCamera() const;
|
||||||
NzBackground* GetBackground() const;
|
NzBackground* GetBackground() const;
|
||||||
NzSceneNode& GetRoot() const;
|
NzSceneNode& GetRoot() const;
|
||||||
float GetUpdateTime() const;
|
float GetUpdateTime() const;
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,8 @@ void NzScene::Draw()
|
||||||
|
|
||||||
if (instancing)
|
if (instancing)
|
||||||
{
|
{
|
||||||
shader->SendInteger(lightCountLocation, lightIndex);
|
if (lightCountLocation != -1)
|
||||||
|
shader->SendInteger(lightCountLocation, lightIndex);
|
||||||
|
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
for (const NzMatrix4f& matrix : subMeshIt.second)
|
for (const NzMatrix4f& matrix : subMeshIt.second)
|
||||||
|
|
@ -322,6 +323,11 @@ void NzScene::Draw()
|
||||||
drawable->Draw();
|
drawable->Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const NzCamera* NzScene::GetActiveCamera() const
|
||||||
|
{
|
||||||
|
return m_impl->camera;
|
||||||
|
}
|
||||||
|
|
||||||
NzBackground* NzScene::GetBackground() const
|
NzBackground* NzScene::GetBackground() const
|
||||||
{
|
{
|
||||||
return m_impl->background.get();
|
return m_impl->background.get();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue