1
0
forked from 0ad/0ad

Removes more unused variables, based on patch by Markus, refs #1852.

Adds TODOs to use POT textures in fancy water rendering.

This was SVN commit r13663.
This commit is contained in:
historic_bruno 2013-08-15 18:25:32 +00:00
parent 6d3901faf7
commit 7ff167e7de
5 changed files with 6 additions and 14 deletions

View File

@ -1454,9 +1454,7 @@ int CMapReader::ParseEnvironment()
// If we have graphics, get rest of settings
if (pWaterMan)
{
std::wstring waterType;
// TODO: Water type not implemented
//GET_ENVIRONMENT_PROPERTY(waterBodyObj.get(), Type, waterType)
GET_ENVIRONMENT_PROPERTY(waterBodyObj.get(), Colour, pWaterMan->m_WaterColor)
GET_ENVIRONMENT_PROPERTY(waterBodyObj.get(), Shininess, pWaterMan->m_Shininess)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -58,10 +58,6 @@ void CGUIString::GenerateTextCall(SFeedback &Feedback,
std::vector<TextChunk>::const_iterator itTextChunk;
for (itTextChunk=m_TextChunks.begin(); itTextChunk!=m_TextChunks.end(); ++itTextChunk)
{
// - GL - Temp
TextChunk tc = *itTextChunk;
// -- GL
// Get the area that is overlapped by both the TextChunk and
// by the from/to inputted.
int _from, _to;

View File

@ -712,6 +712,7 @@ bool TerrainRenderer::RenderFancyWater(const CShaderDefines& context, ShadowMap*
glGenTextures(1, (GLuint*)&depthTex);
WaterMgr->m_depthTT = depthTex;
glBindTexture(GL_TEXTURE_2D, WaterMgr->m_depthTT);
// TODO: use POT texture
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32, g_Renderer.GetWidth(), g_Renderer.GetHeight(),
0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE,NULL);
}
@ -762,9 +763,7 @@ bool TerrainRenderer::RenderFancyWater(const CShaderDefines& context, ShadowMap*
WaterMgr->m_waveTT = renderedTexture;
glBindTexture(GL_TEXTURE_2D, WaterMgr->m_waveTT);
int size = (int)round_up_to_pow2((unsigned)g_Renderer.GetHeight());
if(size > g_Renderer.GetHeight()) size /= 2;
// TODO: use POT texture
glTexImage2D(GL_TEXTURE_2D, 0,GL_RGBA, (float)g_Renderer.GetWidth(), (float)g_Renderer.GetHeight(), 0,GL_RGBA, GL_UNSIGNED_BYTE, 0);
}

View File

@ -54,7 +54,7 @@ bool CComponentManager::DumpDebugState(std::ostream& stream, bool includeDebugIn
// We want the output to be grouped by entity ID, so invert the CComponentManager data structures
std::map<entity_id_t, std::map<ComponentTypeId, IComponent*> > components;
std::map<ComponentTypeId, std::string> names;
//std::map<ComponentTypeId, std::string> names;
std::map<ComponentTypeId, std::map<entity_id_t, IComponent*> >::const_iterator ctit = m_ComponentsByTypeId.begin();
for (; ctit != m_ComponentsByTypeId.end(); ++ctit)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -165,8 +165,7 @@ void MessagePasserImpl::Query(QueryMessage* qry, void(* UNUSED(timeoutCallback)
// while (0 != (err = sem_timedwait(psem, &abs_timeout)))
// #endif
int err;
while (0 != (err = sem_wait(m_Semaphore)))
while (0 != sem_wait(m_Semaphore))
{
// If timed out, call callback and try again
// if (errno == ETIMEDOUT)