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:
authorClément Foucault <foucault.clem@gmail.com>2018-07-18 01:12:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-18 12:49:15 +0300
commit8cd7828792419fb4eac9a2a477968535b4c71535 (patch)
tree8fc733149fe07b7d9edd4b8b1e709519b4481887 /source/blender/gpu/intern/gpu_primitive.c
parent247ad2034de2c33a6d9cb7d3b6f1ef7ffa5b859d (diff)
GWN: Port to GPU module: Replace GWN prefix by GPU
Diffstat (limited to 'source/blender/gpu/intern/gpu_primitive.c')
-rw-r--r--source/blender/gpu/intern/gpu_primitive.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/gpu/intern/gpu_primitive.c b/source/blender/gpu/intern/gpu_primitive.c
index 0f0c28c05dc..189d17f2dd2 100644
--- a/source/blender/gpu/intern/gpu_primitive.c
+++ b/source/blender/gpu/intern/gpu_primitive.c
@@ -23,61 +23,61 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/gpu/intern/gwn_primitive.c
+/** \file blender/gpu/intern/gpu_primitive.c
* \ingroup gpu
*
- * Gawain geometric primitives
+ * GPU geometric primitives
*/
#include "GPU_primitive.h"
#include "gpu_primitive_private.h"
-Gwn_PrimClass GWN_primtype_class(Gwn_PrimType prim_type)
+GPUPrimClass GPU_primtype_class(GPUPrimType prim_type)
{
- static const Gwn_PrimClass classes[] = {
- [GWN_PRIM_POINTS] = GWN_PRIM_CLASS_POINT,
- [GWN_PRIM_LINES] = GWN_PRIM_CLASS_LINE,
- [GWN_PRIM_LINE_STRIP] = GWN_PRIM_CLASS_LINE,
- [GWN_PRIM_LINE_LOOP] = GWN_PRIM_CLASS_LINE,
- [GWN_PRIM_TRIS] = GWN_PRIM_CLASS_SURFACE,
- [GWN_PRIM_TRI_STRIP] = GWN_PRIM_CLASS_SURFACE,
- [GWN_PRIM_TRI_FAN] = GWN_PRIM_CLASS_SURFACE,
+ static const GPUPrimClass classes[] = {
+ [GPU_PRIM_POINTS] = GPU_PRIM_CLASS_POINT,
+ [GPU_PRIM_LINES] = GPU_PRIM_CLASS_LINE,
+ [GPU_PRIM_LINE_STRIP] = GPU_PRIM_CLASS_LINE,
+ [GPU_PRIM_LINE_LOOP] = GPU_PRIM_CLASS_LINE,
+ [GPU_PRIM_TRIS] = GPU_PRIM_CLASS_SURFACE,
+ [GPU_PRIM_TRI_STRIP] = GPU_PRIM_CLASS_SURFACE,
+ [GPU_PRIM_TRI_FAN] = GPU_PRIM_CLASS_SURFACE,
- [GWN_PRIM_LINES_ADJ] = GWN_PRIM_CLASS_LINE,
- [GWN_PRIM_LINE_STRIP_ADJ] = GWN_PRIM_CLASS_LINE,
- [GWN_PRIM_TRIS_ADJ] = GWN_PRIM_CLASS_SURFACE,
+ [GPU_PRIM_LINES_ADJ] = GPU_PRIM_CLASS_LINE,
+ [GPU_PRIM_LINE_STRIP_ADJ] = GPU_PRIM_CLASS_LINE,
+ [GPU_PRIM_TRIS_ADJ] = GPU_PRIM_CLASS_SURFACE,
- [GWN_PRIM_NONE] = GWN_PRIM_CLASS_NONE
+ [GPU_PRIM_NONE] = GPU_PRIM_CLASS_NONE
};
return classes[prim_type];
}
-bool GWN_primtype_belongs_to_class(Gwn_PrimType prim_type, Gwn_PrimClass prim_class)
+bool GPU_primtype_belongs_to_class(GPUPrimType prim_type, GPUPrimClass prim_class)
{
- if (prim_class == GWN_PRIM_CLASS_NONE && prim_type == GWN_PRIM_NONE) {
+ if (prim_class == GPU_PRIM_CLASS_NONE && prim_type == GPU_PRIM_NONE) {
return true;
}
- return prim_class & GWN_primtype_class(prim_type);
+ return prim_class & GPU_primtype_class(prim_type);
}
-GLenum convert_prim_type_to_gl(Gwn_PrimType prim_type)
+GLenum convert_prim_type_to_gl(GPUPrimType prim_type)
{
#if TRUST_NO_ONE
- assert(prim_type != GWN_PRIM_NONE);
+ assert(prim_type != GPU_PRIM_NONE);
#endif
static const GLenum table[] = {
- [GWN_PRIM_POINTS] = GL_POINTS,
- [GWN_PRIM_LINES] = GL_LINES,
- [GWN_PRIM_LINE_STRIP] = GL_LINE_STRIP,
- [GWN_PRIM_LINE_LOOP] = GL_LINE_LOOP,
- [GWN_PRIM_TRIS] = GL_TRIANGLES,
- [GWN_PRIM_TRI_STRIP] = GL_TRIANGLE_STRIP,
- [GWN_PRIM_TRI_FAN] = GL_TRIANGLE_FAN,
+ [GPU_PRIM_POINTS] = GL_POINTS,
+ [GPU_PRIM_LINES] = GL_LINES,
+ [GPU_PRIM_LINE_STRIP] = GL_LINE_STRIP,
+ [GPU_PRIM_LINE_LOOP] = GL_LINE_LOOP,
+ [GPU_PRIM_TRIS] = GL_TRIANGLES,
+ [GPU_PRIM_TRI_STRIP] = GL_TRIANGLE_STRIP,
+ [GPU_PRIM_TRI_FAN] = GL_TRIANGLE_FAN,
- [GWN_PRIM_LINES_ADJ] = GL_LINES_ADJACENCY,
- [GWN_PRIM_LINE_STRIP_ADJ] = GL_LINE_STRIP_ADJACENCY,
- [GWN_PRIM_TRIS_ADJ] = GL_TRIANGLES_ADJACENCY,
+ [GPU_PRIM_LINES_ADJ] = GL_LINES_ADJACENCY,
+ [GPU_PRIM_LINE_STRIP_ADJ] = GL_LINE_STRIP_ADJACENCY,
+ [GPU_PRIM_TRIS_ADJ] = GL_TRIANGLES_ADJACENCY,
};
return table[prim_type];