1
1
This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Jeroen Bakker f3515ffed9 Python: Add index and instance based parameter to GPUBatch.draw.
GPUBatch.draw only supported basic drawing methods. Although all
supported platforms support drawing a subset of the index buffer and/or
drawing of multiple instances of the same set of indexes.

This patch adds parameters to the existing `GPUBatch.draw` method to add
support for these drawing methods.

For drawing a subset of the index buffer the parameters `index_start`
and `index_count` can be used.

`my_batch.draw(my_shader, index_start=10, index_count=5)`

For drawing multiple indexes the parameters `instance_start` and
`instance_count` can be used.

`my_batch.draw(my_shader, instance_start=0, instance_count=10)`

Both set of parameters can be used together.

`my_batch.draw(my_shader, index_start=10, index_count=5, instance_start=0, instance_count=10)`

For compatibility reasons the `program` isn't required to be named as
demonstrated by `my_shader`.
2022-12-12 21:53:40 +01:00
2021-10-23 10:49:51 +05:30
2022-12-08 13:46:26 +11:00
2022-11-20 08:08:26 -08:00
2021-03-26 16:15:02 +01:00
2010-10-13 14:44:22 +00:00
2022-06-28 15:56:16 +02:00

Sphinx Warnings

: WARNING: Could not obtain image size. :scale: option is ignored.

Note the preview is not accurate and warnings may not indicate real issues.

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

https://projects.blender.org/archive/blender-archive/media/branch/temp-py-gpubatch-draw-advanced/https://code.blender.org/wp-content/uploads/2018/12/springrg.jpg

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
Archive of Blender with old branches
Readme 823 MiB
Languages
C 67.4%
C++ 23.4%
Python 6.1%
CMake 1.5%
GLSL 1.1%
Other 0.4%