ShaderTerrainMesh: silently reload texture if it has no RAM image

Fixes #492
This commit is contained in:
rdb 2018-12-31 16:27:21 +01:00
parent f3ba1d317c
commit 6559932c7b

View File

@ -156,7 +156,9 @@ bool ShaderTerrainMesh::generate() {
* the chunks, and the PNMImage is destroyed afterwards.
*/
void ShaderTerrainMesh::do_extract_heightfield() {
nassertv(_heightfield_tex->has_ram_image()); // Heightfield not in RAM, extract ram image first
if (!_heightfield_tex->has_ram_image()) {
_heightfield_tex->reload();
}
_heightfield_tex->store(_heightfield);