GPU buffer materials:

Separate and reuse some shared code.

Also avoid counting for information we already know,
such as total loop triangles etc.
This commit is contained in:
2015-07-25 13:17:37 +02:00
parent 38e19536bf
commit 50a46a5973
4 changed files with 51 additions and 79 deletions

View File

@@ -48,6 +48,7 @@ struct DMFlagMat;
struct DerivedMesh;
struct GSet;
struct GPUVertPointLink;
struct GPUDrawObject;
struct PBVH;
struct MVert;
@@ -71,6 +72,8 @@ typedef struct GPUBufferMaterial {
short mat_nr;
} GPUBufferMaterial;
void GPU_buffer_material_finalize(struct GPUDrawObject *gdo, GPUBufferMaterial *matinfo, int totmat);
/* meshes are split up by material since changing materials requires
* GL state changes that can't occur in the middle of drawing an
* array.