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 'intern/gawain/gawain/gwn_element.h')
-rw-r--r--intern/gawain/gawain/gwn_element.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/intern/gawain/gawain/gwn_element.h b/intern/gawain/gawain/gwn_element.h
deleted file mode 100644
index 53a54cdfd76..00000000000
--- a/intern/gawain/gawain/gwn_element.h
+++ /dev/null
@@ -1,79 +0,0 @@
-
-// Gawain element list (AKA index buffer)
-//
-// This code is part of the Gawain library, with modifications
-// specific to integration with Blender.
-//
-// Copyright 2016 Mike Erwin
-//
-// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
-// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-#pragma once
-
-#include "gwn_primitive.h"
-
-#define GWN_TRACK_INDEX_RANGE 1
-
-#define GWN_PRIM_RESTART 0xFFFFFFFF
-
-typedef enum {
- GWN_INDEX_U8, // GL has this, Vulkan does not
- GWN_INDEX_U16,
- GWN_INDEX_U32
-} Gwn_IndexBufType;
-
-typedef struct Gwn_IndexBuf {
- unsigned index_len;
-#if GWN_TRACK_INDEX_RANGE
- Gwn_IndexBufType index_type;
- uint32_t gl_index_type;
- unsigned min_index;
- unsigned max_index;
- unsigned base_index;
-#endif
- uint32_t vbo_id; // 0 indicates not yet sent to VRAM
- bool use_prim_restart;
-} Gwn_IndexBuf;
-
-void GWN_indexbuf_use(Gwn_IndexBuf*);
-unsigned GWN_indexbuf_size_get(const Gwn_IndexBuf*);
-
-typedef struct Gwn_IndexBufBuilder {
- unsigned max_allowed_index;
- unsigned max_index_len;
- unsigned index_len;
- Gwn_PrimType prim_type;
- unsigned* data;
- bool use_prim_restart;
-} Gwn_IndexBufBuilder;
-
-
-// supports all primitive types.
-void GWN_indexbuf_init_ex(Gwn_IndexBufBuilder*, Gwn_PrimType, unsigned index_len, unsigned vertex_len, bool use_prim_restart);
-
-// supports only GWN_PRIM_POINTS, GWN_PRIM_LINES and GWN_PRIM_TRIS.
-void GWN_indexbuf_init(Gwn_IndexBufBuilder*, Gwn_PrimType, unsigned prim_len, unsigned vertex_len);
-
-void GWN_indexbuf_add_generic_vert(Gwn_IndexBufBuilder*, unsigned v);
-void GWN_indexbuf_add_primitive_restart(Gwn_IndexBufBuilder*);
-
-void GWN_indexbuf_add_point_vert(Gwn_IndexBufBuilder*, unsigned v);
-void GWN_indexbuf_add_line_verts(Gwn_IndexBufBuilder*, unsigned v1, unsigned v2);
-void GWN_indexbuf_add_tri_verts(Gwn_IndexBufBuilder*, unsigned v1, unsigned v2, unsigned v3);
-void GWN_indexbuf_add_line_adj_verts(Gwn_IndexBufBuilder*, unsigned v1, unsigned v2, unsigned v3, unsigned v4);
-
-Gwn_IndexBuf* GWN_indexbuf_build(Gwn_IndexBufBuilder*);
-void GWN_indexbuf_build_in_place(Gwn_IndexBufBuilder*, Gwn_IndexBuf*);
-
-void GWN_indexbuf_discard(Gwn_IndexBuf*);
-
-
-/* Macros */
-
-#define GWN_INDEXBUF_DISCARD_SAFE(elem) do { \
- if (elem != NULL) { \
- GWN_indexbuf_discard(elem); \
- elem = NULL; \
- } \
-} while (0)