From: Peter Schaefer Date: Mon, 20 Jun 2016 22:01:11 +0000 (+0200) Subject: Resize Bloom Bug X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=7a6b1fe10d634ed1e81ec743ef8d45e5f8e6a6f2;p=cgue_weave.git Resize Bloom Bug --- diff --git a/Weave/Scene/EventBox.cpp b/Weave/Scene/EventBox.cpp index aa250a3..dd2b318 100644 --- a/Weave/Scene/EventBox.cpp +++ b/Weave/Scene/EventBox.cpp @@ -1,6 +1,7 @@ #include "EventBox.h" #include "Marvin.h" +#include "Lever.h" //#include "../Graphix/Graphix.h" #include "../Graphix/Shader.h" @@ -21,6 +22,9 @@ EventBox::EventBox(const mat4& _modelMat, eventBoxType _EB_TYPE) : collide_group = COL_EVENT; collide_with = COL_MARVIN; + if (eb_type == EB_LEVER) + collide_with = COL_LEVER; + collision = model; collision->bt_init(); bt_collision_object->setCollisionShape(*collision); @@ -73,5 +77,8 @@ void EventBox::collides(SceneObject* _other, btPersistentManifold* _contactManif Message::info("Spiel Gewonnen!"); Events::halt = true; break; + case EB_LEVER: + ((Lever*)_other)->trigger(); + break; } } diff --git a/Weave/Scene/EventBox.h b/Weave/Scene/EventBox.h index f0e6ca1..10faef1 100644 --- a/Weave/Scene/EventBox.h +++ b/Weave/Scene/EventBox.h @@ -6,7 +6,7 @@ enum eventBoxType { EB_WINZONE = 0, EB_LOSTZONE = 1, - EB_TRIGGER = 2 + EB_LEVER = 2 }; class EventBox : @@ -23,5 +23,4 @@ public: protected: eventBoxType eb_type; - SceneObject* trigger; }; diff --git a/Weave/Scene/Lever.cpp b/Weave/Scene/Lever.cpp index 0589345..8394384 100644 --- a/Weave/Scene/Lever.cpp +++ b/Weave/Scene/Lever.cpp @@ -4,11 +4,15 @@ Lever::Lever(const mat4& _modelMat, const vec4& _material, string _modelpath, string texturepath) : SceneObject(_modelMat, _material, _modelpath, texturepath) { recipient = nullptr; + collide_group = COL_LEVER; + collide_with = COL_EVENT; } Lever::Lever(const mat4& modelMat, const vec4& material, Model* model, string texturepath) : SceneObject(modelMat, material, model, texturepath) { recipient = nullptr; + collide_group = COL_LEVER; + collide_with = COL_EVENT; } Lever::~Lever() diff --git a/Weave/Scene/Scene.cpp b/Weave/Scene/Scene.cpp index 533c229..f9ec11a 100644 --- a/Weave/Scene/Scene.cpp +++ b/Weave/Scene/Scene.cpp @@ -517,9 +517,9 @@ void Scene::setView(unsigned int width, unsigned int height, bool updateProjecti } render->updateSize(width, height); - postRender->updateSize(width, height); + postRender->updateSize(width / 2, height / 2); for (int i = 0; i < 2; i++) - blurPingPong[i]->updateSize(width, height); + blurPingPong[i]->updateSize(width / 2, height / 2); shadowdir->updateSize(width, height); } diff --git a/Weave/Scene/SceneObject.h b/Weave/Scene/SceneObject.h index 82e9d62..156292d 100644 --- a/Weave/Scene/SceneObject.h +++ b/Weave/Scene/SceneObject.h @@ -21,7 +21,8 @@ enum collisiontypes { COL_MARVIN = BIT(1), //