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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index fba7e028830..64ab701acba 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1342,6 +1342,7 @@ static struct GPUMaterialState {
GPUBlendMode *alphablend;
GPUBlendMode alphablend_fixed[FIXEDMAT];
bool use_alpha_pass, is_alpha_pass;
+ bool use_matcaps;
int lastmatnr, lastretval;
GPUBlendMode lastalphablend;
@@ -1409,6 +1410,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
GMS.lastmatnr = -1;
GMS.lastretval = -1;
GMS.lastalphablend = GPU_BLEND_SOLID;
+ GMS.use_matcaps = use_matcap;
GMS.backface_culling = (v3d->flag2 & V3D_BACKFACE_CULLING) != 0;
@@ -1444,7 +1446,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
if (use_matcap) {
GMS.gmatbuf[0] = v3d->defmaterial;
GPU_material_matcap(scene, v3d->defmaterial);
-
+
/* do material 1 too, for displists! */
memcpy(&GMS.matbuf[1], &GMS.matbuf[0], sizeof(GPUMaterialFixed));
@@ -1656,6 +1658,12 @@ void GPU_material_diffuse_get(int nr, float diff[4])
}
}
+bool GPU_material_use_matcaps_get(void)
+{
+ return GMS.use_matcaps;
+}
+
+
void GPU_end_object_materials(void)
{
GPU_disable_material();