mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-13 16:44:50 +02:00
Fix lack of water effects when using an AMD graphics card under Linux.
There were two instances in the code in which the water texture was left uninitialized and this caused the caustics and reflections not to show. Apparently this only happens with the open source AMD driver on Linux.
This commit is contained in:
@@ -410,6 +410,9 @@ struct WaterCache {
|
||||
caustics = new Texture(512, 512, Texture::RGB16, false);
|
||||
mask = new Texture(w, h, Texture::RGB16, false, m, false);
|
||||
delete[] m;
|
||||
|
||||
Core::setTarget(data[0], true);
|
||||
Core::setTarget(NULL);
|
||||
|
||||
blank = false;
|
||||
|
||||
@@ -571,7 +574,7 @@ struct WaterCache {
|
||||
while (item.timer >= SIMULATE_TIMESTEP) {
|
||||
// water step
|
||||
item.data[0]->bind(sDiffuse);
|
||||
Core::setTarget(item.data[1], 0, true);
|
||||
Core::setTarget(item.data[1], true);
|
||||
Core::setViewport(0, 0, int(item.size.x * DETAIL * 2.0f + 0.5f), int(item.size.z * DETAIL * 2.0f + 0.5f));
|
||||
game->getMesh()->renderQuad();
|
||||
Core::invalidateTarget(false, true);
|
||||
@@ -879,4 +882,4 @@ struct ZoneCache {
|
||||
|
||||
#undef UNDERWATER_COLOR
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user