diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-01-04 11:30:18 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-01-08 00:32:35 +0300 |
commit | e20b30a1d8573ab687e05da606ee62e2f079a066 (patch) | |
tree | 125677a0f788f017edbe837f20eb27e6fd63c799 /source/blender/editors | |
parent | 261ac69f57a9daac370f0a25af955d725d6c77be (diff) |
OpenGL: remove glPointSize hack
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 7 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 95 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 100 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 28 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 30 |
7 files changed, 88 insertions, 196 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 05b733d2564..98ee89ae38e 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -185,13 +185,6 @@ void gla2DGetMap(gla2DDrawInfo *di, struct rctf *rect); void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect); #endif -/* use this for platform hacks. glPointSize is solved here */ -void bglBegin(int mode); -void bglEnd(void); -// int bglPointHack(void); /* UNUSED */ -void bglVertex3fv(const float vec[3]); -void bglVertex3f(float x, float y, float z); -void bglVertex2fv(const float vec[2]); /* intel gfx cards frontbuffer problem */ // void bglFlush(void); /* UNUSED */ void set_inverted_drawing(int enable); diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index a3adf65cd84..e7f5f1b49de 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1506,7 +1506,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, const rcti /* the points, use aspect to make them visible on edges */ cmp = cuma->curve; glPointSize(3.0f); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); for (a = 0; a < cuma->totpoint; a++) { if (cmp[a].flag & CUMA_SELECT) UI_ThemeColor(TH_TEXT_HI); @@ -1514,9 +1514,9 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, const rcti UI_ThemeColor(TH_TEXT); fac[0] = rect->xmin + zoomx * (cmp[a].x - offsx); fac[1] = rect->ymin + zoomy * (cmp[a].y - offsy); - bglVertex2fv(fac); + glVertex2fv(fac); } - bglEnd(); + glEnd(); glPointSize(1.0f); /* restore scissortest */ diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 0b83bf993ae..a870b108fad 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -730,101 +730,6 @@ void glaEnd2DDraw(gla2DDrawInfo *di) } #endif -/* **************** GL_POINT hack ************************ */ - -static int curmode = 0; -static int pointhack = 0; -static GLubyte Squaredot[16] = {0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - -void bglBegin(int mode) -{ - curmode = mode; - - if (mode == GL_POINTS) { - float value[4]; - glGetFloatv(GL_POINT_SIZE_RANGE, value); - if (value[1] < 2.0f) { - glGetFloatv(GL_POINT_SIZE, value); - pointhack = iroundf(value[0]); - if (pointhack > 4) pointhack = 4; - } - else { - glBegin(mode); - } - } -} - -#if 0 /* UNUSED */ -int bglPointHack(void) -{ - float value[4]; - int pointhack_px; - glGetFloatv(GL_POINT_SIZE_RANGE, value); - if (value[1] < 2.0f) { - glGetFloatv(GL_POINT_SIZE, value); - pointhack_px = floorf(value[0] + 0.5f); - if (pointhack_px > 4) pointhack_px = 4; - return pointhack_px; - } - return 0; -} -#endif - -void bglVertex3fv(const float vec[3]) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos3fv(vec); - glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot); - } - else { - glVertex3fv(vec); - } - break; - } -} - -void bglVertex3f(float x, float y, float z) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos3f(x, y, z); - glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot); - } - else { - glVertex3f(x, y, z); - } - break; - } -} - -void bglVertex2fv(const float vec[2]) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos2fv(vec); - glBitmap(pointhack, pointhack, (float)pointhack / 2, pointhack / 2, 0.0, 0.0, Squaredot); - } - else { - glVertex2fv(vec); - } - break; - } -} - - -void bglEnd(void) -{ - if (pointhack) pointhack = 0; - else glEnd(); - -} /* Uses current OpenGL state to get view matrices for gluProject/gluUnProject */ void bgl_get_mats(bglMats *mats) diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 51865ebcf90..5e1747692e1 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -102,10 +102,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d) /* for now, point color is fixed, and is white */ glColor3f(1.0f, 1.0f, 1.0f); - /* we use bgl points not standard gl points, to workaround vertex - * drawing bugs that some drivers have (probably legacy ones only though) - */ - bglBegin(GL_POINTS); + glBegin(GL_POINTS); for (i = 0, fed = env->data; i < env->totvert; i++, fed++) { /* only draw if visible * - min/max here are fixed, not relative @@ -115,7 +112,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d) glVertex2f(fed->time, fed->max); } } - bglEnd(); /* GL_POINTS */ + glEnd(); /* GL_POINTS */ glPointSize(1.0f); } @@ -132,10 +129,7 @@ static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo), const float fac = 0.05f * BLI_rctf_size_x(&v2d->cur); int i; - /* we use bgl points not standard gl points, to workaround vertex - * drawing bugs that some drivers have (probably legacy ones only though) - */ - bglBegin(GL_POINTS); + glBegin(GL_POINTS); for (i = 0; i < fcu->totvert; i++, bezt++) { /* as an optimization step, only draw those in view @@ -148,17 +142,17 @@ static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo), * - */ if ((bezt->f2 & SELECT) == sel) - bglVertex3fv(bezt->vec[1]); + glVertex3fv(bezt->vec[1]); } else { /* no check for selection here, as curve is not editable... */ /* XXX perhaps we don't want to even draw points? maybe add an option for that later */ - bglVertex3fv(bezt->vec[1]); + glVertex3fv(bezt->vec[1]); } } } - bglEnd(); /* GL_POINTS */ + glEnd(); /* GL_POINTS */ } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 3dd846803ee..de79468d144 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -968,10 +968,10 @@ static void drawshadbuflimits(Lamp *la, float mat[4][4]) glEnd(); glPointSize(3.0); - bglBegin(GL_POINTS); - bglVertex3fv(sta); - bglVertex3fv(end); - bglEnd(); + glBegin(GL_POINTS); + glVertex3fv(sta); + glVertex3fv(end); + glEnd(); glPointSize(1.0); } @@ -2208,7 +2208,7 @@ static void lattice_draw_verts(Lattice *lt, DispList *dl, BPoint *actbp, short s UI_ThemeColor(color); glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); for (int w = 0; w < lt->pntsw; w++) { int wxt = (w == 0 || w == lt->pntsw - 1); @@ -2221,11 +2221,11 @@ static void lattice_draw_verts(Lattice *lt, DispList *dl, BPoint *actbp, short s /* check for active BPoint and ensure selected */ if ((bp == actbp) && (bp->f1 & SELECT)) { UI_ThemeColor(TH_ACTIVE_VERT); - bglVertex3fv(dl ? co : bp->vec); + glVertex3fv(dl ? co : bp->vec); UI_ThemeColor(color); } else if ((bp->f1 & SELECT) == sel) { - bglVertex3fv(dl ? co : bp->vec); + glVertex3fv(dl ? co : bp->vec); } } } @@ -2233,7 +2233,7 @@ static void lattice_draw_verts(Lattice *lt, DispList *dl, BPoint *actbp, short s } } - bglEnd(); + glEnd(); glPointSize(1.0); } @@ -2487,16 +2487,16 @@ static void draw_dm_face_centers__mapFunc(void *userData, int index, const float if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && (BM_elem_flag_test(efa, BM_ELEM_SELECT) == data->select)) { - bglVertex3fv(cent); + glVertex3fv(cent); } } static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, bool select) { drawBMSelect_userData data = {em->bm, select}; - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedFaceCenter(dm, draw_dm_face_centers__mapFunc, &data, DM_FOREACH_NOP); - bglEnd(); + glEnd(); } static void draw_dm_vert_normals__mapFunc(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]) @@ -2557,13 +2557,13 @@ static void draw_dm_verts__mapFunc(void *userData, int index, const float co[3], const MVertSkin *vs = BM_ELEM_CD_GET_VOID_P(eve, data->cd_vskin_offset); if (vs->flag & MVERT_SKIN_ROOT) { float radius = (vs->radius[0] + vs->radius[1]) * 0.5f; - bglEnd(); + glEnd(); glColor4ubv(data->th_skin_root); drawcircball(GL_LINES, co, radius, data->imat); glColor4ubv(data->sel ? data->th_vertex_select : data->th_vertex); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); } } @@ -2571,19 +2571,19 @@ static void draw_dm_verts__mapFunc(void *userData, int index, const float co[3], if (eve == data->eve_act) { glColor4ubv(data->th_editmesh_active); - bglEnd(); + glEnd(); glPointSize(data->th_vertex_size); - bglBegin(GL_POINTS); - bglVertex3fv(co); - bglEnd(); + glBegin(GL_POINTS); + glVertex3fv(co); + glEnd(); glColor4ubv(data->sel ? data->th_vertex_select : data->th_vertex); glPointSize(data->th_vertex_size); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); } else { - bglVertex3fv(co); + glVertex3fv(co); } } } @@ -2609,9 +2609,9 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, const char sel, BMVer mul_m4_m4m4(data.imat, rv3d->viewmat, em->ob->obmat); invert_m4(data.imat); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedVert(dm, draw_dm_verts__mapFunc, &data, DM_FOREACH_NOP); - bglEnd(); + glEnd(); } /* Draw edges with color set based on selection */ @@ -3083,7 +3083,7 @@ static void draw_dm_bweights__mapFunc(void *userData, int index, const float co[ const float bweight = BM_ELEM_CD_GET_FLOAT(eve, data->cd_layer_offset); if (bweight != 0.0f) { UI_ThemeColorBlend(TH_VERTEX, TH_VERTEX_SELECT, bweight); - bglVertex3fv(co); + glVertex3fv(co); } } } @@ -3099,9 +3099,9 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm) if (data.cd_layer_offset != -1) { glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) + 2); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedVert(dm, draw_dm_bweights__mapFunc, &data, DM_FOREACH_NOP); - bglEnd(); + glEnd(); } } else { @@ -6111,7 +6111,7 @@ static void drawvertsN(Nurb *nu, const char sel, const bool hide_handles, const glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); if (nu->type == CU_BEZIER) { @@ -6122,21 +6122,21 @@ static void drawvertsN(Nurb *nu, const char sel, const bool hide_handles, const if (sel == 1 && bezt == vert) { UI_ThemeColor(TH_ACTIVE_VERT); - if (bezt->f2 & SELECT) bglVertex3fv(bezt->vec[1]); + if (bezt->f2 & SELECT) glVertex3fv(bezt->vec[1]); if (!hide_handles) { - if (bezt->f1 & SELECT) bglVertex3fv(bezt->vec[0]); - if (bezt->f3 & SELECT) bglVertex3fv(bezt->vec[2]); + if (bezt->f1 & SELECT) glVertex3fv(bezt->vec[0]); + if (bezt->f3 & SELECT) glVertex3fv(bezt->vec[2]); } UI_ThemeColor(color); } else if (hide_handles) { - if ((bezt->f2 & SELECT) == sel) bglVertex3fv(bezt->vec[1]); + if ((bezt->f2 & SELECT) == sel) glVertex3fv(bezt->vec[1]); } else { - if ((bezt->f1 & SELECT) == sel) bglVertex3fv(bezt->vec[0]); - if ((bezt->f2 & SELECT) == sel) bglVertex3fv(bezt->vec[1]); - if ((bezt->f3 & SELECT) == sel) bglVertex3fv(bezt->vec[2]); + if ((bezt->f1 & SELECT) == sel) glVertex3fv(bezt->vec[0]); + if ((bezt->f2 & SELECT) == sel) glVertex3fv(bezt->vec[1]); + if ((bezt->f3 & SELECT) == sel) glVertex3fv(bezt->vec[2]); } } bezt++; @@ -6149,18 +6149,18 @@ static void drawvertsN(Nurb *nu, const char sel, const bool hide_handles, const if (bp->hide == 0) { if (bp == vert) { UI_ThemeColor(TH_ACTIVE_VERT); - bglVertex3fv(bp->vec); + glVertex3fv(bp->vec); UI_ThemeColor(color); } else { - if ((bp->f1 & SELECT) == sel) bglVertex3fv(bp->vec); + if ((bp->f1 & SELECT) == sel) glVertex3fv(bp->vec); } } bp++; } } - bglEnd(); + glEnd(); glPointSize(1.0); } @@ -7265,9 +7265,9 @@ static void draw_hooks(Object *ob) } glPointSize(3.0); - bglBegin(GL_POINTS); - bglVertex3fv(vec); - bglEnd(); + glBegin(GL_POINTS); + glVertex3fv(vec); + glEnd(); glPointSize(1.0); } } @@ -7851,14 +7851,14 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short // glPointSize(3.0); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); for (i = 0; i < scs->numpoints; i++) { - bglVertex3fv(&scs->points[3 * i]); + glVertex3fv(&scs->points[3 * i]); } - bglEnd(); + glEnd(); glPointSize(1.0); glMultMatrixf(ob->obmat); @@ -8185,7 +8185,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, const floa if (!(mv->flag & ME_HIDE)) { WM_framebuffer_index_set(data->offset + index); - bglVertex3fv(co); + glVertex3fv(co); } } @@ -8197,9 +8197,9 @@ static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset) data.mvert = mvert; data.offset = offset; glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data, DM_FOREACH_NOP); - bglEnd(); + glEnd(); glPointSize(1.0); } @@ -8211,16 +8211,16 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3] if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { WM_framebuffer_index_set(data->offset + index); - bglVertex3fv(co); + glVertex3fv(co); } } static void bbs_mesh_verts(BMEditMesh *em, DerivedMesh *dm, int offset) { drawBMOffset_userData data = {em->bm, offset}; glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedVert(dm, bbs_mesh_verts__mapFunc, &data, DM_FOREACH_NOP); - bglEnd(); + glEnd(); glPointSize(1.0); } @@ -8278,7 +8278,7 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { WM_framebuffer_index_set(index + 1); - bglVertex3fv(cent); + glVertex3fv(cent); } } @@ -8294,9 +8294,9 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d, if (check_ob_drawface_dot(scene, v3d, ob->dt)) { glPointSize(UI_GetThemeValuef(TH_FACEDOT_SIZE)); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); dm->foreachMappedFaceCenter(dm, bbs_mesh_solid__drawCenter, em->bm, DM_FOREACH_NOP); - bglEnd(); + glEnd(); } } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index bae57016eec..79c065de2f9 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -6825,25 +6825,25 @@ static void drawEdgeSlide(TransInfo *t) UI_ThemeColorShadeAlpha(TH_SELECT, -30, alpha_shade); glPointSize(ctrl_size); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); if (sld->flipped) { - if (curr_sv->v_side[1]) bglVertex3fv(curr_sv->v_side[1]->co); + if (curr_sv->v_side[1]) glVertex3fv(curr_sv->v_side[1]->co); } else { - if (curr_sv->v_side[0]) bglVertex3fv(curr_sv->v_side[0]->co); + if (curr_sv->v_side[0]) glVertex3fv(curr_sv->v_side[0]->co); } - bglEnd(); + glEnd(); UI_ThemeColorShadeAlpha(TH_SELECT, 255, alpha_shade); glPointSize(guide_size); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); #if 0 interp_v3_v3v3(co_mark, co_b, co_a, fac); - bglVertex3fv(co_mark); + glVertex3fv(co_mark); #endif interp_line_v3_v3v3v3(co_mark, co_b, curr_sv->v_co_orig, co_a, fac); - bglVertex3fv(co_mark); - bglEnd(); + glVertex3fv(co_mark); + glEnd(); } else { if (is_clamp == false) { @@ -7436,15 +7436,15 @@ static void drawVertSlide(TransInfo *t) glVertex3fv(b); } } - bglEnd(); + glEnd(); glPointSize(ctrl_size); - bglBegin(GL_POINTS); - bglVertex3fv((sld->flipped && sld->use_even) ? - curr_sv->co_link_orig_3d[curr_sv->co_link_curr] : - curr_sv->co_orig_3d); - bglEnd(); + glBegin(GL_POINTS); + glVertex3fv((sld->flipped && sld->use_even) ? + curr_sv->co_link_orig_3d[curr_sv->co_link_curr] : + curr_sv->co_orig_3d); + glEnd(); glDisable(GL_BLEND); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 34f59b56fff..9f9a42e9b80 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -861,32 +861,32 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) /* unselected faces */ UI_ThemeColor(TH_WIRE); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_TAG)) continue; if (!uvedit_face_select_test(scene, efa, cd_loop_uv_offset)) { uv_poly_center(efa, cent, cd_loop_uv_offset); - bglVertex2fv(cent); + glVertex2fv(cent); } } - bglEnd(); + glEnd(); /* selected faces */ UI_ThemeColor(TH_FACE_DOT); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_TAG)) continue; if (uvedit_face_select_test(scene, efa, cd_loop_uv_offset)) { uv_poly_center(efa, cent, cd_loop_uv_offset); - bglVertex2fv(cent); + glVertex2fv(cent); } } - bglEnd(); + glEnd(); } /* 6. draw uv vertices */ @@ -897,7 +897,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) pointsize = UI_GetThemeValuef(TH_VERTEX_SIZE); glPointSize(pointsize); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_TAG)) continue; @@ -905,17 +905,17 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (!uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) - bglVertex2fv(luv->uv); + glVertex2fv(luv->uv); } } - bglEnd(); + glEnd(); /* pinned uvs */ /* give odd pointsizes odd pin pointsizes */ glPointSize(pointsize * 2 + (((int)pointsize % 2) ? (-1) : 0)); cpack(0xFF); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_TAG)) continue; @@ -924,16 +924,16 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (luv->flag & MLOOPUV_PINNED) - bglVertex2fv(luv->uv); + glVertex2fv(luv->uv); } } - bglEnd(); + glEnd(); /* selected uvs */ UI_ThemeColor(TH_VERTEX_SELECT); glPointSize(pointsize); - bglBegin(GL_POINTS); + glBegin(GL_POINTS); BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { if (!BM_elem_flag_test(efa, BM_ELEM_TAG)) continue; @@ -942,10 +942,10 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) - bglVertex2fv(luv->uv); + glVertex2fv(luv->uv); } } - bglEnd(); + glEnd(); } glPointSize(1.0); |