PyAPI: Make GPUVertFormat() argument optional
This commit is contained in:
@@ -31,7 +31,7 @@ def draw_circle_2d(position, color, radius, segments):
|
||||
seg = 32
|
||||
mul = (1.0 / (seg - 1)) * (pi * 2)
|
||||
verts = [(sin(i * mul), cos(i * mul)) for i in range(seg)]
|
||||
fmt = GPUVertFormat(format=[])
|
||||
fmt = GPUVertFormat()
|
||||
pos_id = fmt.attr_add(id="pos", comp_type='F32', len=2, fetch_mode='FLOAT')
|
||||
vbo = GPUVertBuf(len=len(verts), format=fmt)
|
||||
vbo.attr_fill(id=pos_id, data=verts)
|
||||
|
Reference in New Issue
Block a user