Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wrt Radium-Engine master #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Dummy/src/DummySystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

#include <Core/Tasks/Task.hpp>
#include <Core/Tasks/TaskQueue.hpp>
#include <Engine/Scene/Entity.hpp>
#include <Engine/FrameInfo.hpp>
#include <Engine/RadiumEngine.hpp>
#include <Engine/Rendering/RenderTechnique.hpp>
#include <Engine/Scene/Entity.hpp>

#include "DummyComponent.hpp"
#include "DummyTask.hpp"

namespace DummyPlugin {

DummySystem::DummySystem() : Ra::Engine::Scene::System() {
m_data = new DummyData;
m_data = new DummyData;
m_data->foo = 42;
m_data->bar = 1337;
}
Expand All @@ -22,25 +22,26 @@ DummySystem::~DummySystem() {
delete m_data;
}

void DummySystem::handleAssetLoading( Ra::Engine::Scene::Entity *entity, const Ra::Core::Asset::FileData *data ) {
void DummySystem::handleAssetLoading( Ra::Engine::Scene::Entity* entity,
const Ra::Core::Asset::FileData* data ) {
std::string componentName = "DummyComponent_" + entity->getName();
DummyComponent* component = new DummyComponent( componentName, entity );
registerComponent( entity, component );
}

void DummySystem::generateTasks( Ra::Core::TaskQueue* taskQueue,
const Ra::Engine::FrameInfo& /*frameInfo*/ ) {
DummyTask* task1 = new DummyTask;
DummyOtherTask* task2 = new DummyOtherTask;
auto task1 = std::make_unique<DummyTask>();
auto task2 = std::make_unique<DummyOtherTask>();

DummyParams p;
p.data = m_data;

task1->init( &p );
task2->init( &p );

auto task2Id = taskQueue->registerTask( task2 );
auto task1Id = taskQueue->registerTask( task1 );
auto task2Id = taskQueue->registerTask( std::move( task2 ) );
auto task1Id = taskQueue->registerTask( std::move( task1 ) );

taskQueue->addDependency( task1Id, task2Id );
}
Expand Down
4 changes: 2 additions & 2 deletions MeshPaint/src/MeshPaintComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using namespace Ra::Core::Utils; // log
namespace MeshPaintPlugin {

static const std::string colAttribName =
Ra::Engine::Data::Mesh::getAttribName( Ra::Engine::Data::Mesh::VERTEX_COLOR );
Ra::Core::Geometry::getAttribName( Ra::Core::Geometry::MeshAttrib::VERTEX_COLOR );

MeshPaintComponent::MeshPaintComponent( const std::string& name,
Ra::Engine::Scene::Entity* entity ) :
Expand Down Expand Up @@ -187,7 +187,7 @@ void MeshPaintComponent::paintMesh( const Ra::Engine::Rendering::Renderer::Picki
colorContainer[size_t( elt )] = color;
}
}
m_mesh->setDirty( Mesh::VERTEX_COLOR );
m_mesh->setDirty( Ra::Core::Geometry::MeshAttrib::VERTEX_COLOR );
break;
}
case Ra::Engine::Rendering::Renderer::EDGE:
Expand Down