mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:57:30 +02:00
Fixing flicking in instance based objects
This commit is contained in:
parent
adcfd55cc0
commit
894d29bb29
2 changed files with 19 additions and 0 deletions
|
@ -26,6 +26,21 @@ Frame::~Frame() {
|
|||
void Frame::finish() {
|
||||
std::unordered_set<Buffer*> seenBuffers;
|
||||
for (Batch& batch : batches) {
|
||||
for (auto& namedCallData : batch._namedData) {
|
||||
for (auto& buffer : namedCallData.second.buffers) {
|
||||
if (!buffer) {
|
||||
continue;
|
||||
}
|
||||
if (!buffer->isDirty()) {
|
||||
continue;
|
||||
}
|
||||
if (seenBuffers.count(buffer.get())) {
|
||||
continue;
|
||||
}
|
||||
seenBuffers.insert(buffer.get());
|
||||
bufferUpdates.push_back({ buffer, buffer->getUpdate() });
|
||||
}
|
||||
}
|
||||
for (auto& bufferCacheItem : batch._buffers._items) {
|
||||
const BufferPointer& buffer = bufferCacheItem._data;
|
||||
if (!buffer) {
|
||||
|
|
|
@ -372,11 +372,15 @@ void GeometryCache::buildShapes() {
|
|||
extrudePolygon<6>(_shapes[Hexagon], _shapeVertices, _shapeIndices);
|
||||
//Octagon,
|
||||
extrudePolygon<8>(_shapes[Octagon], _shapeVertices, _shapeIndices);
|
||||
|
||||
//Quad,
|
||||
//Circle,
|
||||
//Torus,
|
||||
//Cone,
|
||||
//Cylinder,
|
||||
|
||||
_shapeIndices->flush();
|
||||
_shapeVertices->flush();
|
||||
}
|
||||
|
||||
gpu::Stream::FormatPointer& getSolidStreamFormat() {
|
||||
|
|
Loading…
Reference in a new issue