mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
samples: fix read from negative GeomVertexData row in fractal-plants
This commit is contained in:
parent
55ac585745
commit
2807d1d166
@ -141,11 +141,14 @@ def drawBody(nodePath, vdata, pos, vecList, radius=1, keepDrawing=True, numVerti
|
|||||||
drawReWriter.addData1f(keepDrawing)
|
drawReWriter.addData1f(keepDrawing)
|
||||||
currAngle += angleSlice
|
currAngle += angleSlice
|
||||||
|
|
||||||
|
if startRow == 0:
|
||||||
|
return
|
||||||
|
|
||||||
drawReader = GeomVertexReader(vdata, "drawFlag")
|
drawReader = GeomVertexReader(vdata, "drawFlag")
|
||||||
drawReader.setRow(startRow - numVertices)
|
drawReader.setRow(startRow - numVertices)
|
||||||
|
|
||||||
# we cant draw quads directly so we use Tristrips
|
# we cant draw quads directly so we use Tristrips
|
||||||
if (startRow != 0) & (drawReader.getData1f() != False):
|
if drawReader.getData1i() != 0:
|
||||||
lines = GeomTristrips(Geom.UHStatic)
|
lines = GeomTristrips(Geom.UHStatic)
|
||||||
half = int(numVertices * 0.5)
|
half = int(numVertices * 0.5)
|
||||||
for i in range(numVertices):
|
for i in range(numVertices):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user