- made some small performance updates for rendering and updated beta version number
This commit is contained in:
parent
848d953bd7
commit
646e8593f4
|
@ -26,7 +26,7 @@ using namespace Shared::Platform;
|
||||||
namespace Glest{ namespace Game{
|
namespace Glest{ namespace Game{
|
||||||
|
|
||||||
const string mailString= "contact_game@glest.org";
|
const string mailString= "contact_game@glest.org";
|
||||||
const string glestVersionString= "v3.3.5-beta12";
|
const string glestVersionString= "v3.3.5-beta13";
|
||||||
|
|
||||||
string getCrashDumpFileName(){
|
string getCrashDumpFileName(){
|
||||||
return "glest" + glestVersionString + ".dmp";
|
return "glest" + glestVersionString + ".dmp";
|
||||||
|
|
|
@ -458,7 +458,7 @@ void Renderer::renderParticleManager(ResourceScope rs){
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::swapBuffers(){
|
void Renderer::swapBuffers(){
|
||||||
glFlush();
|
//glFlush(); // should not be required - http://www.opengl.org/wiki/Common_Mistakes
|
||||||
GraphicsInterface::getInstance().getCurrentContext()->swapBuffers();
|
GraphicsInterface::getInstance().getCurrentContext()->swapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,10 +106,10 @@ void BattleEnd::render(){
|
||||||
Vec3f color = stats.getPlayerColor(i);
|
Vec3f color = stats.getPlayerColor(i);
|
||||||
|
|
||||||
if(stats.getPlayerName(i) != "") {
|
if(stats.getPlayerName(i) != "") {
|
||||||
textRenderer->render(stats.getPlayerName(i).c_str(), textX, bm+400, false, color);
|
textRenderer->render(stats.getPlayerName(i).c_str(), textX, bm+400, false, &color);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
textRenderer->render((lang.get("Player")+" "+intToStr(i+1)).c_str(), textX, bm+400,false, color);
|
textRenderer->render((lang.get("Player")+" "+intToStr(i+1)).c_str(), textX, bm+400,false, &color);
|
||||||
}
|
}
|
||||||
textRenderer->render(stats.getVictory(i)? lang.get("Victory").c_str(): lang.get("Defeat").c_str(), textX, bm+360);
|
textRenderer->render(stats.getVictory(i)? lang.get("Victory").c_str(): lang.get("Defeat").c_str(), textX, bm+360);
|
||||||
textRenderer->render(controlString, textX, bm+320);
|
textRenderer->render(controlString, textX, bm+320);
|
||||||
|
|
|
@ -1147,6 +1147,7 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) {
|
||||||
|
|
||||||
// First save Used slots
|
// First save Used slots
|
||||||
//for(int i=0; i<mapInfo.players; ++i)
|
//for(int i=0; i<mapInfo.players; ++i)
|
||||||
|
int AIPlayerCount = 0;
|
||||||
for(int i = 0; i < GameConstants::maxPlayers; ++i) {
|
for(int i = 0; i < GameConstants::maxPlayers; ++i) {
|
||||||
ControlType ct= static_cast<ControlType>(listBoxControls[i].getSelectedItemIndex());
|
ControlType ct= static_cast<ControlType>(listBoxControls[i].getSelectedItemIndex());
|
||||||
if(ct != ctClosed) {
|
if(ct != ctClosed) {
|
||||||
|
@ -1173,7 +1174,8 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) {
|
||||||
gameSettings->setNetworkPlayerName(slotIndex, Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str()));
|
gameSettings->setNetworkPlayerName(slotIndex, Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gameSettings->setNetworkPlayerName(slotIndex, "Closed");
|
AIPlayerCount++;
|
||||||
|
gameSettings->setNetworkPlayerName(slotIndex, string("AI") + intToStr(AIPlayerCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
factionCount++;
|
factionCount++;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
TextRenderer2DGl();
|
TextRenderer2DGl();
|
||||||
|
|
||||||
virtual void begin(const Font2D *font);
|
virtual void begin(const Font2D *font);
|
||||||
virtual void render(const string &text, int x, int y, bool centered, Vec3f color);
|
virtual void render(const string &text, int x, int y, bool centered, Vec3f *color=NULL);
|
||||||
virtual void end();
|
virtual void end();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
virtual ~TextRenderer2D(){};
|
virtual ~TextRenderer2D(){};
|
||||||
|
|
||||||
virtual void begin(const Font2D *font)= 0;
|
virtual void begin(const Font2D *font)= 0;
|
||||||
virtual void render(const string &text, int x, int y, bool centered= false,Vec3f color=Vec3f(-1.0))= 0;
|
virtual void render(const string &text, int x, int y, bool centered= false,Vec3f *color=NULL)= 0;
|
||||||
virtual void end()= 0;
|
virtual void end()= 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,14 +32,14 @@ void TextRenderer2DGl::begin(const Font2D *font){
|
||||||
this->font= static_cast<const Font2DGl*>(font);
|
this->font= static_cast<const Font2DGl*>(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, Vec3f color) {
|
void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, Vec3f *color) {
|
||||||
assert(rendering);
|
assert(rendering);
|
||||||
|
|
||||||
assertGl();
|
assertGl();
|
||||||
|
|
||||||
if(color.x >= 0) {
|
if(color != NULL) {
|
||||||
glPushAttrib(GL_CURRENT_BIT);
|
glPushAttrib(GL_CURRENT_BIT);
|
||||||
glColor3fv(color.ptr());
|
glColor3fv(color->ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
int line=0;
|
int line=0;
|
||||||
|
@ -73,7 +73,7 @@ void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, V
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(color.x >= 0) {
|
if(color != NULL) {
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
}
|
}
|
||||||
assertGl();
|
assertGl();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user