Skip to content

Commit

Permalink
master: small mod
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgheorghecristian committed Oct 8, 2017
1 parent 2a5f18f commit 86509ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions Core/EngineCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ EngineCore::EngineCore(rapidjson::Document &gameDocument) : isRunning (false) {
scale.x = entity["Transform"]["scale"].GetArray()[0].GetFloat();
scale.y = entity["Transform"]["scale"].GetArray()[1].GetFloat();
scale.z = entity["Transform"]["scale"].GetArray()[2].GetFloat();

position.x += rand()%500;
position.y += rand()%500;
position.z += rand()%500;
}
Transform trans(position, rotation, scale);
new_entity = new Entity (trans);
Expand Down Expand Up @@ -215,7 +211,6 @@ void EngineCore::render() {
}

RenderingMaster::swapBuffers();

}

void EngineCore::update() {
Expand Down
4 changes: 2 additions & 2 deletions Rendering/RenderComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RenderComponent::RenderComponent(Mesh * mesh,

glm::mat4 viewMatrix = RenderingMaster::getCamera()->getViewMatrix();
bool result = true;
int hasTexture = 0;
bool hasTexture = false;

result &= shader->updateUniform ("projectionMatrix", (void *) &RenderingMaster::getProjectionMatrix());
result &= shader->updateUniform ("viewMatrix", (void *) &viewMatrix);
Expand All @@ -21,7 +21,7 @@ RenderComponent::RenderComponent(Mesh * mesh,

if (texture) {
result &= shader->updateUniform ("textureSampler", (void *) &texture->getTextureUnit());
hasTexture = 1;
hasTexture = true;
}

result &= shader->updateUniform ("hasTexture", (void *) &hasTexture);
Expand Down

0 comments on commit 86509ee

Please sign in to comment.