2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2016 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2018-07-15 10:34:31 +02:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
2018-08-30 01:56:08 +10:00
|
|
|
*
|
|
|
|
|
* Batched geometry rendering is powered by the GPU library.
|
2018-07-15 10:34:31 +02:00
|
|
|
* This file contains any additions or modifications specific to Blender.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "BLI_compiler_attrs.h"
|
|
|
|
|
#include "BLI_sys_types.h"
|
|
|
|
|
|
2020-03-02 15:28:47 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `gpu_batch_presets.cc` */
|
2018-07-15 10:34:31 +02:00
|
|
|
|
2021-12-09 20:01:47 +11:00
|
|
|
/* Replacement for #gluSphere */
|
|
|
|
|
|
2018-07-18 00:12:21 +02:00
|
|
|
struct GPUBatch *GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT;
|
|
|
|
|
struct GPUBatch *GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT;
|
2022-01-07 11:38:08 +11:00
|
|
|
struct GPUBatch *GPU_batch_preset_panel_drag_widget(float pixelsize,
|
2020-04-06 16:31:22 +02:00
|
|
|
const float col_high[4],
|
|
|
|
|
const float col_dark[4],
|
2022-01-07 11:38:08 +11:00
|
|
|
float width) ATTR_WARN_UNUSED_RESULT;
|
2018-07-15 10:34:31 +02:00
|
|
|
|
2021-12-09 20:01:47 +11:00
|
|
|
/**
|
|
|
|
|
* To be used with procedural placement inside shader.
|
|
|
|
|
*/
|
2020-08-31 18:39:17 +02:00
|
|
|
struct GPUBatch *GPU_batch_preset_quad(void);
|
|
|
|
|
|
2018-07-15 10:34:31 +02:00
|
|
|
void gpu_batch_presets_init(void);
|
2018-07-18 00:12:21 +02:00
|
|
|
void gpu_batch_presets_register(struct GPUBatch *preset_batch);
|
2018-09-11 13:17:30 +10:00
|
|
|
bool gpu_batch_presets_unregister(struct GPUBatch *preset_batch);
|
2018-07-15 10:34:31 +02:00
|
|
|
void gpu_batch_presets_exit(void);
|
|
|
|
|
|
2020-03-02 15:28:47 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|