Compare commits
No commits in common. "b8b511dd27d97df0d2350ab086a8c0f7d06820fe" and "0e4c8865f11e5057085833add1dbccf2afd85004" have entirely different histories.
b8b511dd27
...
0e4c8865f1
@ -55,11 +55,10 @@ def draw(size, mode, **data):
|
||||
assert size == len(array) // attribute.count, 'Data for %s is incorrect length' % fmt
|
||||
|
||||
buffer = BufferObject(size * attribute.stride)
|
||||
data = (attribute.c_type * len(array))(*array)
|
||||
buffer.set_data(data)
|
||||
|
||||
attribute.set_region(buffer, 0, size, array)
|
||||
attribute.enable()
|
||||
attribute.set_pointer(buffer.ptr)
|
||||
|
||||
buffers.append(buffer) # Don't garbage collect it.
|
||||
|
||||
glDrawArrays(mode, 0, size)
|
||||
@ -109,12 +108,10 @@ def draw_indexed(size, mode, indices, **data):
|
||||
assert size == len(array) // attribute.count, 'Data for %s is incorrect length' % fmt
|
||||
|
||||
buffer = BufferObject(size * attribute.stride)
|
||||
data = (attribute.c_type * len(array))(*array)
|
||||
buffer.set_data(data)
|
||||
|
||||
attribute.set_region(buffer, 0, size, array)
|
||||
attribute.enable()
|
||||
attribute.set_pointer(buffer.ptr)
|
||||
buffers.append(buffer) # Don't garbage collect it.
|
||||
buffers.append(buffer)
|
||||
|
||||
if size <= 0xff:
|
||||
index_type = GL_UNSIGNED_BYTE
|
||||
|
@ -55,10 +55,6 @@ if __name__ == '__main__':
|
||||
compiler.output_path = Path(out_path)
|
||||
sys.argv.remove('--output')
|
||||
sys.argv.remove(out_path)
|
||||
|
||||
if '--lto=yes' in sys.argv:
|
||||
compiler.use_lto = True
|
||||
sys.argv.remove('--lto=yes')
|
||||
|
||||
# 检测 --no-pyglet-opt 参数
|
||||
pyglet_optimizations = True
|
||||
|
Loading…
Reference in New Issue
Block a user