diff options
-rw-r--r-- | src/render/draw.cc | 9 | ||||
-rw-r--r-- | src/render/state.cc | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index f9076cc..04c839b 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -168,10 +168,11 @@ void draw_pass_sky() if (!core::localplayer()->zone()) return; - if (!core::localplayer()->zone()->sky().size()) - return; - - Textures::load_cubemap("textures/sky/" + core::localplayer()->zone()->sky()); + if (core::localplayer()->zone()->sky().size()) { + Textures::load_cubemap("textures/sky/" + core::localplayer()->zone()->sky()); + } else { + Textures::load_cubemap("textures/sky/default"); + } gl::enable(GL_TEXTURE_CUBE_MAP); diff --git a/src/render/state.cc b/src/render/state.cc index f5cbb8d..a6a65ba 100644 --- a/src/render/state.cc +++ b/src/render/state.cc @@ -289,8 +289,9 @@ void State::use_material(const model::Material * material) { gl::enable(GL_TEXTURE_GEN_S); gl::enable(GL_TEXTURE_GEN_T); gl::enable(GL_TEXTURE_GEN_R); + } else { + color.assign(0.0f, 0.0f, 0.0f); } - //FIXME provide a fallback for zones without a skybox } } |