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:
Diffstat (limited to 'source/blender/gpu/GPU_vertex_buffer.h')
-rw-r--r--source/blender/gpu/GPU_vertex_buffer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
index 722ef878271..d3c1bd8145d 100644
--- a/source/blender/gpu/GPU_vertex_buffer.h
+++ b/source/blender/gpu/GPU_vertex_buffer.h
@@ -40,12 +40,20 @@ extern "C" {
typedef enum {
/* can be extended to support more types */
- GPU_USAGE_STREAM,
- GPU_USAGE_STATIC, /* do not keep data in memory */
- GPU_USAGE_DYNAMIC,
- GPU_USAGE_DEVICE_ONLY, /* Do not do host->device data transfers. */
+ GPU_USAGE_STREAM = 0,
+ GPU_USAGE_STATIC = 1, /* do not keep data in memory */
+ GPU_USAGE_DYNAMIC = 2,
+ GPU_USAGE_DEVICE_ONLY = 3, /* Do not do host->device data transfers. */
+
+ /** Extended usage flags. */
+ /* Flag for vertex buffers used for textures. Skips additional padding/compaction to ensure
+ * format matches the texture exactly. Can be masked with other properties, and is stripped
+ * during VertBuf::init. */
+ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY = 1 << 3,
} GPUUsageType;
+ENUM_OPERATORS(GPUUsageType, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY);
+
/** Opaque type hiding blender::gpu::VertBuf. */
typedef struct GPUVertBuf GPUVertBuf;