Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-05-22 00:28:19 +0300
committerHans Goudey <h.goudey@me.com>2021-05-22 00:28:29 +0300
commit2175cbe2ceeffc65517dd21ee94f19bc93094544 (patch)
tree9389abead58429bc9b6027c37504f35a9c79339a /source/blender/draw/intern/draw_cache_inline.h
parent2521e17a58b54b93d8ac49a50c44e40358d3076e (diff)
Cleanup: Move curve draw cache implementation to C++
I'd like to use this file to draw curves from geometry nodes, which would otherwise require implementing a C API. The changes in this commit are minimal, mostly just casts and changing to nullptr. Differential Revision: https://developer.blender.org/D11350
Diffstat (limited to 'source/blender/draw/intern/draw_cache_inline.h')
-rw-r--r--source/blender/draw/intern/draw_cache_inline.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_inline.h b/source/blender/draw/intern/draw_cache_inline.h
index ebe97b4e7c4..bfc714e5d6a 100644
--- a/source/blender/draw/intern/draw_cache_inline.h
+++ b/source/blender/draw/intern/draw_cache_inline.h
@@ -53,13 +53,13 @@ BLI_INLINE GPUBatch *DRW_batch_request(GPUBatch **batch)
return *batch;
}
-BLI_INLINE bool DRW_batch_requested(GPUBatch *batch, int prim_type)
+BLI_INLINE bool DRW_batch_requested(GPUBatch *batch, GPUPrimType prim_type)
{
/* Batch has been requested if it has been created but not initialized. */
if (batch != NULL && batch->verts[0] == NULL) {
/* HACK. We init without a valid VBO and let the first vbo binding
* fill verts[0]. */
- GPU_batch_init_ex(batch, prim_type, (GPUVertBuf *)1, NULL, 0);
+ GPU_batch_init_ex(batch, prim_type, (GPUVertBuf *)1, NULL, (eGPUBatchFlag)0);
batch->verts[0] = NULL;
return true;
}