Removed Legacy Camera resize
This commit is contained in:
@ -81,13 +81,11 @@ void Camera::onStart() {
|
||||
auto rt = this->getRenderTarget();
|
||||
this->projectionNeedsUpdating = true;
|
||||
this->eventRenderTargetResized.invoke(rt->getWidth(), rt->getHeight());
|
||||
this->event2RenderTargetResized.invoke(rt->getWidth(), rt->getHeight());
|
||||
|
||||
// Subscribe to new render target resized.
|
||||
return evtResized = useEventLegacy([&](RenderTarget *rt, float_t w, float_t h){
|
||||
this->projectionNeedsUpdating = true;
|
||||
this->eventRenderTargetResized.invoke(w, h);
|
||||
this->event2RenderTargetResized.invoke(w, h);
|
||||
}, rt->eventRenderTargetResized);
|
||||
}, renderTarget);
|
||||
|
||||
@ -105,6 +103,5 @@ void Camera::onStart() {
|
||||
evtResized = useEventLegacy([&](RenderTarget *rt, float_t w, float_t h){
|
||||
this->projectionNeedsUpdating = true;
|
||||
this->eventRenderTargetResized.invoke(w, h);
|
||||
this->event2RenderTargetResized.invoke(w, h);
|
||||
}, getRenderTarget()->eventRenderTargetResized);
|
||||
}
|
@ -40,8 +40,7 @@ namespace Dawn {
|
||||
StateProperty<float_t> clipNear;
|
||||
StateProperty<float_t> clipFar;
|
||||
|
||||
Event<float_t, float_t> eventRenderTargetResized;
|
||||
StateEvent<float_t, float_t> event2RenderTargetResized;
|
||||
StateEvent<float_t, float_t> eventRenderTargetResized;
|
||||
|
||||
/**
|
||||
* Create a new Camera Component.
|
||||
|
@ -57,7 +57,7 @@ void PixelPerfectCamera::onStart() {
|
||||
|
||||
useEvent([&](float_t w, float_t h){
|
||||
this->updateDimensions();
|
||||
}, this->camera->event2RenderTargetResized);
|
||||
}, this->camera->eventRenderTargetResized);
|
||||
|
||||
useEffect([&]{
|
||||
this->updateDimensions();
|
||||
|
@ -50,7 +50,7 @@ void SubSceneCameraAlign::onStart() {
|
||||
|
||||
return evtCameraResized = useEvent([&](float_t w, float_t h){
|
||||
this->realign();
|
||||
}, this->camera->event2RenderTargetResized);
|
||||
}, this->camera->eventRenderTargetResized);
|
||||
}, this->camera);
|
||||
|
||||
auto renderEffect = useEffectWithTeardown([&]{
|
||||
|
@ -55,7 +55,7 @@ void UICanvas::onStart() {
|
||||
(*it)->updatePositions();
|
||||
++it;
|
||||
}
|
||||
}, camera->event2RenderTargetResized);
|
||||
}, camera->eventRenderTargetResized);
|
||||
}, camera);
|
||||
|
||||
useEffectWithTeardown([&]{
|
||||
|
Reference in New Issue
Block a user