[Bf-blender-cvs] [3800421d6b4] greasepencil-object: Fix merge error
Antonio Vazquez
noreply at git.blender.org
Tue Apr 11 21:34:12 CEST 2017
Commit: 3800421d6b452dd05dbccb3c49210b83d4bbe450
Author: Antonio Vazquez
Date: Tue Apr 11 21:33:32 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3800421d6b452dd05dbccb3c49210b83d4bbe450
Fix merge error
Due error during mergetool command, the merge was wrong in previous commit.
===================================================================
M source/blender/draw/intern/draw_cache.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 7e2fbbc98af..fc7dd5c8c42 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -443,7 +443,34 @@ Batch *DRW_cache_single_line_endpoints_get(void)
return SHC.drw_line_endpoints;
}
-<<<<<<< HEAD
+Batch *DRW_cache_screenspace_circle_get(void)
+{
+#define CIRCLE_RESOL 32
+ if (!SHC.drw_screenspace_circle) {
+ float v[3] = {0.0f, 0.0f, 0.0f};
+
+ /* Position Only 3D format */
+ static VertexFormat format = { 0 };
+ static unsigned int pos_id;
+ if (format.attrib_ct == 0) {
+ pos_id = VertexFormat_add_attrib(&format, "pos", COMP_F32, 3, KEEP_FLOAT);
+ }
+
+ VertexBuffer *vbo = VertexBuffer_create_with_format(&format);
+ VertexBuffer_allocate_data(vbo, CIRCLE_RESOL + 1);
+
+ for (int a = 0; a <= CIRCLE_RESOL; a++) {
+ v[0] = sinf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
+ v[1] = cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
+ VertexBuffer_set_attrib(vbo, pos_id, a, v);
+ }
+
+ SHC.drw_screenspace_circle = Batch_create(PRIM_LINE_STRIP, vbo, NULL);
+ }
+ return SHC.drw_screenspace_circle;
+#undef CIRCLE_RESOL
+}
+
/* Grease Pencil object */
Batch *DRW_cache_gpencil_axes_get(void)
{
@@ -451,7 +478,7 @@ Batch *DRW_cache_gpencil_axes_get(void)
int axis;
float v1[3] = { 0.0f, 0.0f, 0.0f };
float v2[3] = { 0.0f, 0.0f, 0.0f };
-
+
/* cube data */
const GLfloat verts[8][3] = {
{ -0.25f, -0.25f, -0.25f },
@@ -469,23 +496,11 @@ Batch *DRW_cache_gpencil_axes_get(void)
/* Position Only 3D format */
static VertexFormat format = { 0 };
static unsigned pos_id;
-=======
-Batch *DRW_cache_screenspace_circle_get(void)
-{
-#define CIRCLE_RESOL 32
- if (!SHC.drw_screenspace_circle) {
- float v[3] = {0.0f, 0.0f, 0.0f};
-
- /* Position Only 3D format */
- static VertexFormat format = { 0 };
- static unsigned int pos_id;
->>>>>>> blender2.8
if (format.attrib_ct == 0) {
pos_id = VertexFormat_add_attrib(&format, "pos", COMP_F32, 3, KEEP_FLOAT);
}
VertexBuffer *vbo = VertexBuffer_create_with_format(&format);
-<<<<<<< HEAD
VertexBuffer_allocate_data(vbo, 30);
/* draw axis */
@@ -508,20 +523,6 @@ Batch *DRW_cache_screenspace_circle_get(void)
SHC.drw_gpencil_axes = Batch_create(PRIM_LINES, vbo, NULL);
}
return SHC.drw_gpencil_axes;
-=======
- VertexBuffer_allocate_data(vbo, CIRCLE_RESOL + 1);
-
- for (int a = 0; a <= CIRCLE_RESOL; a++) {
- v[0] = sinf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
- v[1] = cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
- VertexBuffer_set_attrib(vbo, pos_id, a, v);
- }
-
- SHC.drw_screenspace_circle = Batch_create(PRIM_LINE_STRIP, vbo, NULL);
- }
- return SHC.drw_screenspace_circle;
-#undef CIRCLE_RESOL
->>>>>>> blender2.8
}
/* Empties */
More information about the Bf-blender-cvs
mailing list