build 170626. individual self-illumination levels for interior sections, automatic merging of suitable terrain geometry during load from text files, unused resource release by geometry bank manager, support for ui backgrounds with width:height ratio other than 4:3, comment parsing optimization, minor bug fixes

This commit is contained in:
tmj-fstate
2017-06-26 16:57:25 +02:00
parent 34a899239f
commit 5d7b3fb036
18 changed files with 608 additions and 339 deletions

View File

@@ -817,8 +817,8 @@ texture_manager::bind( texture_handle const Texture ) {
::glBindTexture( GL_TEXTURE_2D, texture(Texture).id );
m_activetexture = texture(Texture).id;
#else
if( Texture( Id ).bind() == resource_state::good ) {
m_activetexture = Id;
if( texture( Texture ).bind() == resource_state::good ) {
m_activetexture = Texture;
}
else {
// TODO: bind a special 'error' texture on failure
@@ -839,7 +839,7 @@ texture_manager::delete_textures() {
for( auto const &texture : m_textures ) {
// usunięcie wszyskich tekstur (bez usuwania struktury)
if( ( texture.id > 0 )
&& ( texture.id != -1 ) ) {
&& ( texture.id != -1 ) ) {
::glDeleteTextures( 1, &texture.id );
}
}
@@ -876,7 +876,7 @@ texture_manager::info() const {
+ std::to_string( readytexturecount )
+ " ("
+ to_string( readytexturesize / 1024.0f, 2 ) + " mb)"
+ " in vram, ";
+ " in vram, "
#endif
+ std::to_string( totaltexturecount )
+ " ("