[core] No need for optional in map of VertexArrays
This commit is contained in:
@@ -67,10 +67,10 @@ public:
|
||||
.concat(paintPropertyBinders.attributeBindings(currentProperties));
|
||||
|
||||
for (auto& segment : segments) {
|
||||
optional<gl::VertexArray>& vertexArray = segment.vertexArrays[layerID];
|
||||
auto vertexArrayIt = segment.vertexArrays.find(layerID);
|
||||
|
||||
if (!vertexArray) {
|
||||
vertexArray = context.createVertexArray();
|
||||
if (vertexArrayIt == segment.vertexArrays.end()) {
|
||||
vertexArrayIt = segment.vertexArrays.emplace(layerID, context.createVertexArray()).first;
|
||||
}
|
||||
|
||||
program.draw(
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
std::move(stencilMode),
|
||||
std::move(colorMode),
|
||||
allUniformValues,
|
||||
*vertexArray,
|
||||
vertexArrayIt->second,
|
||||
Attributes::offsetBindings(allAttributeBindings, segment.vertexOffset),
|
||||
indexBuffer,
|
||||
segment.indexOffset,
|
||||
|
||||
Reference in New Issue
Block a user