diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-27 21:00:38 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-27 21:21:12 +0300 |
commit | 0d5c5a8438badf5e4921a96b9d4648d1d0dc3aee (patch) | |
tree | 41574f22dc7e566dd279e67a50c3d1ae3d9da679 /source/blender/editors/space_view3d/drawmesh.c | |
parent | 99fde39f49054fcb2abce58777096f47fc5ad4a9 (diff) |
OpenGL: early exit from functions that don't mix with core profile
These parts will not be part of final viewport, but are called indirectly during the transition. To avoid runtime errors on core profile, exit early -- functions effectively do nothing.
I put the early exits inside the functions to avoid cluttering the code that calls these. But (long term) the calling functions need to change.
Basic shader's detect_options function was unused and full of old, so I deleted it.
Part of T51164
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 7db72d2c338..701efab0bd0 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -1171,6 +1171,11 @@ static bool tex_mat_set_face_editmesh_cb(void *userData, int index) void draw_mesh_textured(Scene *scene, SceneLayer *sl, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, const int draw_flags) { +#ifndef WITH_LEGACY_OPENGL + /* some legacy GL calls here will *crash* blender */ + return; +#endif + /* if not cycles, or preview-modifiers, or drawing matcaps */ if ((draw_flags & DRAW_MODIFIERS_PREVIEW) || (v3d->flag2 & V3D_SHOW_SOLID_MATCAP) || |