mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
ShaderTerrainMesh: silently reload texture if it has no RAM image
Fixes #492
This commit is contained in:
parent
f3ba1d317c
commit
6559932c7b
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user