From 7ea28826bbe25f236f45e4248508f23965d4aed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 2 Oct 2013 22:00:08 +0200 Subject: [PATCH] Fixed terrain preview not using specified material --- src/rendering/terrain/ter_preview.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rendering/terrain/ter_preview.c b/src/rendering/terrain/ter_preview.c index f4618f0..28b59cb 100644 --- a/src/rendering/terrain/ter_preview.c +++ b/src/rendering/terrain/ter_preview.c @@ -59,11 +59,13 @@ Renderer* terrainCreatePreviewRenderer() TexturesDefinition* textures; textures = TexturesDefinitionClass.create(); + layersClear(textures->layers); TexturesLayerDefinition* layer = layersGetLayer(textures->layers, layersAddLayer(textures->layers, NULL)); layer->displacement_height = 0.0; layer->material.base = colorToHSL(COLOR_WHITE); layer->material.reflection = 0.05; layer->material.shininess = 2.0; + TexturesDefinitionClass.validate(textures); noiseClearLevels(layer->_detail_noise); TexturesRendererClass.bind(result, textures);