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>2022-04-22 19:21:03 +0300
committerHans Goudey <h.goudey@me.com>2022-04-22 19:21:19 +0300
commite96623c19babcb4c0a59ac063c22d5b4deb39327 (patch)
treee4b2c02e26906801fb55fe1f3812eb6cf3341e94 /source/blender/draw/intern
parentb38491b40776e84d27d5f63ecb535e4527f9180f (diff)
Fix: Build error on macOS after previous commit
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r--source/blender/draw/intern/draw_curves.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_curves.cc b/source/blender/draw/intern/draw_curves.cc
index 139efdf4f8c..b3595ccf5fb 100644
--- a/source/blender/draw/intern/draw_curves.cc
+++ b/source/blender/draw/intern/draw_curves.cc
@@ -44,12 +44,12 @@ BLI_INLINE eParticleRefineShaderType drw_curves_shader_type_get()
}
#ifndef USE_TRANSFORM_FEEDBACK
-typedef struct CurvesEvalCall {
+struct CurvesEvalCall {
struct CurvesEvalCall *next;
GPUVertBuf *vbo;
DRWShadingGroup *shgrp;
uint vert_len;
-} CurvesEvalCall;
+};
static CurvesEvalCall *g_tf_calls = nullptr;
static int g_tf_id_offset;
@@ -138,7 +138,7 @@ static void drw_curves_cache_update_transform_feedback(CurvesEvalCache *cache, c
#else
DRWShadingGroup *tf_shgrp = DRW_shgroup_create(tf_shader, g_tf_pass);
- CurvesEvalCall *pr_call = MEM_mallocN(sizeof(*pr_call), __func__);
+ CurvesEvalCall *pr_call = MEM_new<CurvesEvalCall>(__func__);
pr_call->next = g_tf_calls;
pr_call->vbo = cache->final[subdiv].proc_buf;
pr_call->shgrp = tf_shgrp;
@@ -265,7 +265,7 @@ void DRW_curves_update()
int width = 2048;
int height = min_ii(width, 1 + max_size / width);
GPUTexture *tex = DRW_texture_pool_query_2d(
- width, height, GPU_RGBA32F, (void *)DRW_curves_update);
+ width, height, GPU_RGBA32F, (DrawEngineType *)DRW_curves_update);
g_tf_target_height = height;
g_tf_target_width = width;
@@ -276,7 +276,8 @@ void DRW_curves_update()
GPU_ATTACHMENT_TEXTURE(tex),
});
- float *data = MEM_mallocN(sizeof(float[4]) * width * height, "tf fallback buffer");
+ float *data = static_cast<float *>(
+ MEM_mallocN(sizeof(float[4]) * width * height, "tf fallback buffer"));
GPU_framebuffer_bind(fb);
while (g_tf_calls != nullptr) {