Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/SkyManager.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | void SkyManager::LoadSkyTextures() | ||||
static const CStrW images[NUMBER_OF_TEXTURES + 1] = { | static const CStrW images[NUMBER_OF_TEXTURES + 1] = { | ||||
L"front", | L"front", | ||||
L"back", | L"back", | ||||
L"right", | L"right", | ||||
L"left", | L"left", | ||||
L"top", | L"top", | ||||
L"top" | L"top" | ||||
}; | }; | ||||
OGL_SCOPED_DEBUG_GROUP("Load Sky Textures"); | |||||
/*for (size_t i = 0; i < ARRAY_SIZE(m_SkyTexture); ++i) | /*for (size_t i = 0; i < ARRAY_SIZE(m_SkyTexture); ++i) | ||||
{ | { | ||||
VfsPath path = VfsPath("art/textures/skies") / m_SkySet / (Path::String(s_imageNames[i])+L".dds"); | VfsPath path = VfsPath("art/textures/skies") / m_SkySet / (Path::String(s_imageNames[i])+L".dds"); | ||||
CTextureProperties textureProps(path); | CTextureProperties textureProps(path); | ||||
textureProps.SetWrap(GL_CLAMP_TO_EDGE); | textureProps.SetWrap(GL_CLAMP_TO_EDGE); | ||||
CTexturePtr texture = g_Renderer.GetTextureManager().CreateTexture(textureProps); | CTexturePtr texture = g_Renderer.GetTextureManager().CreateTexture(textureProps); | ||||
texture->Prefetch(); | texture->Prefetch(); | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | std::vector<CStrW> SkyManager::GetSkySets() const | ||||
return skies; | return skies; | ||||
} | } | ||||
/////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////// | ||||
// Render sky | // Render sky | ||||
void SkyManager::RenderSky() | void SkyManager::RenderSky() | ||||
{ | { | ||||
OGL_SCOPED_DEBUG_GROUP("Render Sky"); | |||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
#warning TODO: implement SkyManager::RenderSky for GLES | #warning TODO: implement SkyManager::RenderSky for GLES | ||||
#else | #else | ||||
if (!m_RenderSky) | if (!m_RenderSky) | ||||
return; | return; | ||||
// Draw the sky as a small box around the map, with depth write enabled. | // Draw the sky as a small box around the map, with depth write enabled. | ||||
// This will be done before anything else is drawn so we'll be overlapped by | // This will be done before anything else is drawn so we'll be overlapped by | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator