@@ -103,18 +103,20 @@ open class Path @JvmOverloads constructor(
103
103
// Assemble the drawable's OpenGL vertex buffer object.
104
104
drawState.tmpVertexBuffer = rc.getGLBufferObject(vertexBufferKey) {
105
105
GLBufferObject (GL_ARRAY_BUFFER , 0 )
106
- }.also { if (reassembleGeometry) rc.offerBufferUpload(it, NumericArray .Floats (vertexArray)) }
106
+ }
107
+ if (reassembleGeometry) { rc.offerGLBufferUpload(vertexBufferKey, NumericArray .Floats (vertexArray)) }
107
108
108
109
// Assemble the drawable's OpenGL element buffer object.
109
110
drawState.tmpElementBuffer = rc.getGLBufferObject(elementBufferKey) {
110
111
GLBufferObject (GL_ELEMENT_ARRAY_BUFFER , 0 )
111
- }.also { if (reassembleGeometry) {
112
+ }
113
+ if (reassembleGeometry) {
112
114
val array = IntArray (outlineElements.size + verticalElements.size)
113
115
var index = 0
114
116
for (element in outlineElements) array[index++ ] = element
115
117
for (element in verticalElements) array[index++ ] = element
116
- rc.offerBufferUpload(it , NumericArray .Ints (array))
117
- } }
118
+ rc.offerGLBufferUpload(elementBufferKey , NumericArray .Ints (array))
119
+ }
118
120
119
121
// Configure the drawable to use the outline texture when drawing the outline.
120
122
if (activeAttributes.isDrawOutline) {
@@ -178,17 +180,19 @@ open class Path @JvmOverloads constructor(
178
180
// Assemble the drawable's OpenGL vertex buffer object.
179
181
drawStateExtrusion.tmpVertexBuffer = rc.getGLBufferObject(extrudeVertexBufferKey) {
180
182
GLBufferObject (GL_ARRAY_BUFFER , 0 )
181
- }.also { if (reassembleGeometry) rc.offerBufferUpload(it, NumericArray .Floats (extrudeVertexArray)) }
183
+ }
184
+ if (reassembleGeometry) { rc.offerGLBufferUpload(extrudeVertexBufferKey, NumericArray .Floats (extrudeVertexArray)) }
182
185
183
186
// Assemble the drawable's OpenGL element buffer object.
184
187
drawStateExtrusion.tmpElementBuffer = rc.getGLBufferObject(extrudeElementBufferKey) {
185
188
GLBufferObject (GL_ELEMENT_ARRAY_BUFFER , 0 )
186
- }.also { if (reassembleGeometry) {
189
+ }
190
+ if (reassembleGeometry) {
187
191
val array = IntArray (interiorElements.size)
188
192
var index = 0
189
193
for (element in interiorElements) array[index++ ] = element
190
- rc.offerBufferUpload(it , NumericArray .Ints (array))
191
- } }
194
+ rc.offerGLBufferUpload(extrudeElementBufferKey , NumericArray .Ints (array))
195
+ }
192
196
193
197
drawStateExtrusion.color(if (rc.isPickMode) pickColor else activeAttributes.interiorColor)
194
198
drawStateExtrusion.opacity(if (rc.isPickMode) 1f else rc.currentLayer.opacity)
0 commit comments