mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:36:30 +02:00
clening up the code
This commit is contained in:
parent
185f069441
commit
2d7118dacc
1 changed files with 1 additions and 8 deletions
|
@ -468,11 +468,6 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo
|
||||||
auto& part = mesh->getPartBuffer().get<model::Mesh::Part>(0);
|
auto& part = mesh->getPartBuffer().get<model::Mesh::Part>(0);
|
||||||
batch.drawIndexed(model::Mesh::topologyToPrimitive(part._topology), part._numIndices, part._startIndex);
|
batch.drawIndexed(model::Mesh::topologyToPrimitive(part._topology), part._numIndices, part._startIndex);
|
||||||
}
|
}
|
||||||
// keep for debug
|
|
||||||
/* {
|
|
||||||
auto& part = mesh->getPartBuffer().get<model::Mesh::Part>(1);
|
|
||||||
batch.drawIndexed(model::Mesh::topologyToPrimitive(part._topology), part._numIndices, part._startIndex);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -555,7 +550,6 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo
|
||||||
state->setDepthTest(true, false, gpu::LESS_EQUAL);
|
state->setDepthTest(true, false, gpu::LESS_EQUAL);
|
||||||
|
|
||||||
// TODO: We should use DepthClamp and avoid changing geometry for inside /outside cases
|
// TODO: We should use DepthClamp and avoid changing geometry for inside /outside cases
|
||||||
//state->setDepthClampEnable(true);
|
|
||||||
|
|
||||||
// additive blending
|
// additive blending
|
||||||
state->setBlendFunction(true, gpu::State::ONE, gpu::State::BLEND_OP_ADD, gpu::State::ONE);
|
state->setBlendFunction(true, gpu::State::ONE, gpu::State::BLEND_OP_ADD, gpu::State::ONE);
|
||||||
|
@ -665,8 +659,7 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
|
||||||
|
|
||||||
std::vector<model::Mesh::Part> parts;
|
std::vector<model::Mesh::Part> parts;
|
||||||
parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::TRIANGLES));
|
parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::TRIANGLES));
|
||||||
//DEBUG:
|
parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::LINE_STRIP)); // outline version
|
||||||
parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::LINE_STRIP));
|
|
||||||
|
|
||||||
|
|
||||||
_spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
|
_spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
|
||||||
|
|
Loading…
Reference in a new issue