From 19175f4757df6d90c87ccf83ed5c5199bd1d4aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 30 Jul 2020 01:07:29 +0200 Subject: GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handle --- source/blender/gpu/GPU_batch.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu/GPU_batch.h') diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 5f55b512695..85d9c037b38 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -127,9 +127,8 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *, GPUVertBuf *, bool own_vbo); #define GPU_batch_vertbuf_add(batch, verts) GPU_batch_vertbuf_add_ex(batch, verts, false) -void GPU_batch_program_set_no_use(GPUBatch *, uint32_t program, const GPUShaderInterface *); -void GPU_batch_program_set(GPUBatch *, uint32_t program, const GPUShaderInterface *); -void GPU_batch_program_set_shader(GPUBatch *, GPUShader *shader); +void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader); +void GPU_batch_set_shader_no_bind(GPUBatch *batch, GPUShader *shader); void GPU_batch_program_set_imm_shader(GPUBatch *batch); void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id); void GPU_batch_program_set_builtin_with_config(GPUBatch *batch, -- cgit v1.2.3 From 91694b9b58ab953f3b313be9389cc1303e472fc2 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 7 Aug 2020 09:50:34 +0200 Subject: Code Style: use "#pragma once" in source directory This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466 --- source/blender/gpu/GPU_batch.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/gpu/GPU_batch.h') diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 5f55b512695..ca6aaa90ddc 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -24,8 +24,7 @@ * Contains VAOs + VBOs + Shader representing a drawable entity. */ -#ifndef __GPU_BATCH_H__ -#define __GPU_BATCH_H__ +#pragma once #include "GPU_element.h" #include "GPU_shader.h" @@ -248,5 +247,3 @@ void gpu_batch_exit(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_BATCH_H__ */ -- cgit v1.2.3 From 0255f1e0225d2eebfd39a9c16d9be299857b9efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 6 Aug 2020 01:00:02 +0200 Subject: GPUBatch: Use custom allocator This is needed for the new GPU abstraction. --- source/blender/gpu/GPU_batch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/GPU_batch.h') diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 71a29d0b178..855214c279c 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -102,6 +102,7 @@ enum { GPU_BATCH_OWNS_INDEX = (1u << 31u), }; +GPUBatch *GPU_batch_calloc(uint count); GPUBatch *GPU_batch_create_ex(GPUPrimType, GPUVertBuf *, GPUIndexBuf *, uint owns_flag); void GPU_batch_init_ex(GPUBatch *, GPUPrimType, GPUVertBuf *, GPUIndexBuf *, uint owns_flag); void GPU_batch_copy(GPUBatch *batch_dst, GPUBatch *batch_src); -- cgit v1.2.3