diff options
-rw-r--r-- | source/blender/draw/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index c3afb6b307e..9c1ca46175e 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -275,7 +275,6 @@ data_to_c_simple(modes/shaders/edit_mesh_overlay_geom_edge.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_points_vert.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_facedot_frag.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_facedot_vert.glsl SRC) -data_to_c_simple(modes/shaders/edit_mesh_overlay_ghost_clear_vert.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_mix_frag.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_facefill_vert.glsl SRC) data_to_c_simple(modes/shaders/edit_mesh_overlay_facefill_frag.glsl SRC) diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 834a0c0be0b..02b92843064 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -59,7 +59,6 @@ extern char datatoc_edit_mesh_overlay_geom_edge_glsl[]; extern char datatoc_edit_mesh_overlay_points_vert_glsl[]; extern char datatoc_edit_mesh_overlay_facedot_frag_glsl[]; extern char datatoc_edit_mesh_overlay_facedot_vert_glsl[]; -extern char datatoc_edit_mesh_overlay_ghost_clear_vert_glsl[]; extern char datatoc_edit_mesh_overlay_mix_frag_glsl[]; extern char datatoc_edit_mesh_overlay_facefill_vert_glsl[]; extern char datatoc_edit_mesh_overlay_facefill_frag_glsl[]; @@ -70,6 +69,7 @@ extern char datatoc_common_globals_lib_glsl[]; extern char datatoc_gpu_shader_uniform_color_frag_glsl[]; extern char datatoc_gpu_shader_flat_color_frag_glsl[]; extern char datatoc_gpu_shader_point_varying_color_frag_glsl[]; +extern char datatoc_gpu_shader_depth_only_frag_glsl[]; /* *********** LISTS *********** */ typedef struct EDIT_MESH_PassList { @@ -329,8 +329,7 @@ static void EDIT_MESH_engine_init(void *vedata) e_data.depth_sh = DRW_shader_create_3D_depth_only(); } if (!e_data.ghost_clear_depth_sh) { - e_data.ghost_clear_depth_sh = DRW_shader_create(datatoc_edit_mesh_overlay_ghost_clear_vert_glsl, - NULL, NULL, NULL); + e_data.ghost_clear_depth_sh = DRW_shader_create_fullscreen(datatoc_gpu_shader_depth_only_frag_glsl, NULL); } } diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index bae7520803d..5aec6b17218 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -357,12 +357,15 @@ GPUShader *GPU_shader_create_ex( UNUSED_VARS(shname); #endif + /* At least a vertex shader and a fragment shader are required. */ + BLI_assert((fragcode != NULL) && (vertexcode != NULL)); + if (vertexcode) shader->vertex = glCreateShader(GL_VERTEX_SHADER); if (fragcode) shader->fragment = glCreateShader(GL_FRAGMENT_SHADER); if (geocode) - shader->geometry = glCreateShader(GL_GEOMETRY_SHADER_EXT); + shader->geometry = glCreateShader(GL_GEOMETRY_SHADER); shader->program = glCreateProgram(); |