renaming shaderDrawable to shaderDrawable 2d

This commit is contained in:
Clément Le Bihan
2021-06-08 16:10:20 +02:00
parent 7bff82a5c9
commit 3e9037ed92
4 changed files with 27 additions and 22 deletions
+10 -6
View File
@@ -8,6 +8,7 @@
#include "System/Renderer/RenderSystem.hpp"
#include <Model/Model.hpp>
#include <Drawables/3D/Cube.hpp>
#include <Drawables/2D/Rectangle.hpp>
#include <TraceLog.hpp>
#include <System/Keyboard/KeyboardSystem.hpp>
#include <System/Controllable/ControllableSystem.hpp>
@@ -24,12 +25,14 @@
#include <Model/ModelAnimations.hpp>
#include <Component/Animator/AnimatorComponent.hpp>
#include <System/Animator/AnimatorSystem.hpp>
#include <Component/Renderer/Drawable2DComponent.hpp>
#include "Component/Animation/AnimationsComponent.hpp"
#include "System/Animation/AnimationsSystem.hpp"
#include "Component/Shaders/ShaderComponent.hpp"
#include "Map/Map.hpp"
namespace RAY3D = RAY::Drawables::Drawables3D;
namespace RAY2D = RAY::Drawables::Drawables2D;
namespace BBM
{
@@ -70,7 +73,7 @@ namespace BBM
.addComponent<ControllableComponent>()
.addComponent<AnimatorComponent>()
.addComponent<KeyboardComponent>()
.addComponent<ShaderComponentModel>("assets/shaders/glsl330/grayscale.fs")
.addComponent<ShaderComponentModel>("assets/shaders/glsl330/predator.fs")
.addComponent<AnimationsComponent>(RAY::ModelAnimations("assets/player/player.iqm"), 3)
.addComponent<CollisionComponent>(1)
.addComponent<MovableComponent>()
@@ -81,15 +84,16 @@ namespace BBM
scene->addEntity("camera")
.addComponent<PositionComponent>(8, 20, 7)
.addComponent<CameraComponent>(Vector3f(8, 0, 8));
scene->addEntity("cube")
/*scene->addEntity("cube")
.addComponent<PositionComponent>(5, 0, 5)
.addComponent<ShaderComponentDrawable>("assets/shaders/glsl330/grayscale.fs")
.addComponent<Drawable3DComponent, RAY3D::Cube>(Vector3f(-5, 0, -5), Vector3f(3, 3, 3), RED)
.addComponent<ShaderComponentDrawable2D>("assets/shaders/glsl330/grayscale.fs")
//.addComponent<Drawable3DComponent, RAY3D::Cube>(Vector3f(-5, 0, -5), Vector3f(3, 3, 3), RED)
.addComponent<Drawable2DComponent, RAY2D::Rectangle>(BBM::Vector2f{200,200}, BBM::Vector2f{200, 200}, RED)
.addComponent<ControllableComponent>()
.addComponent<KeyboardComponent>()
.addComponent<CollisionComponent>(WAL::Callback<WAL::Entity &, const WAL::Entity &>(), &MapGenerator::wallCollide, 3);
.addComponent<CollisionComponent>(WAL::Callback<WAL::Entity &, const WAL::Entity &>(), &MapGenerator::wallCollide, 3); */
std::srand(std::time(nullptr));
//MapGenerator::loadMap(16, 16, MapGenerator::createMap(16, 16), scene);
MapGenerator::loadMap(16, 16, MapGenerator::createMap(16, 16), scene);
return scene;
}