From 12522cc99fd41e93d61f06118c01191cf115fa9a Mon Sep 17 00:00:00 2001 From: Benau Date: Wed, 18 May 2016 10:05:12 +0800 Subject: [PATCH 1/5] Don't crash if missing texture --- src/graphics/stk_mesh.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/graphics/stk_mesh.cpp b/src/graphics/stk_mesh.cpp index 0589a0df1..7d32e6b18 100644 --- a/src/graphics/stk_mesh.cpp +++ b/src/graphics/stk_mesh.cpp @@ -419,8 +419,7 @@ void initTexturesTransparent(GLMesh &mesh) { if (!mesh.textures[0]) { - Log::fatal("STKMesh", "Missing texture for material transparent"); - return; + mesh.textures[0] = getUnicolorTexture(video::SColor(255, 255, 255, 255)); } compressTexture(mesh.textures[0], true); if (CVS->isAZDOEnabled()) From 9a815b4e655a142d1d409b7bd5125e17e6c11a6f Mon Sep 17 00:00:00 2001 From: Benau Date: Wed, 18 May 2016 13:03:35 +0800 Subject: [PATCH 2/5] Fix x N items font size It should depend on screen scaling. --- src/states_screens/race_gui_base.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/states_screens/race_gui_base.cpp b/src/states_screens/race_gui_base.cpp index b64b3ced8..5d69851e8 100644 --- a/src/states_screens/race_gui_base.cpp +++ b/src/states_screens/race_gui_base.cpp @@ -317,9 +317,11 @@ void RaceGUIBase::drawPowerupIcons(const AbstractKart* kart, n = 1; } - int nSize = (int)(64.0f*std::min(scaling.X, scaling.Y)); + float scale = (float)(std::min(scaling.X, scaling.Y)); - int itemSpacing = (int)(std::min(scaling.X, scaling.Y)*30); + int nSize = (int)(64.0f * scale); + + int itemSpacing = (int)(scale * 30); int x1 = viewport.UpperLeftCorner.X + viewport.getWidth()/2 - (n * itemSpacing)/2; @@ -345,7 +347,7 @@ void RaceGUIBase::drawPowerupIcons(const AbstractKart* kart, { gui::ScalableFont* font = GUIEngine::getHighresDigitFont(); core::rect pos(x2+nSize, y1, x2+nSize+nSize, y1+nSize); - font->setScale(1.5f); + font->setScale(scale); font->draw(core::stringw(L"x")+StringUtils::toWString(many_powerups), pos, video::SColor(255, 255, 255, 255)); font->setScale(1.0f); From edfc7d285c6d14460ebbb59dc937e69574a049b3 Mon Sep 17 00:00:00 2001 From: Deve Date: Wed, 18 May 2016 22:18:24 +0200 Subject: [PATCH 3/5] Fixed shadows and GI for mesa drivers. The check for GL_ARB_geometry_shader4 doesn't have sense at all because we don't use this extension and our geometry shaders use functionality which is available in core OpenGL 3.2. The reason that it wasn't working for older mesa versions must be a bug in mesa or maybe missing other functionality (but not GL_ARB_geometry_shader4). I checked it with mesa 11.2 and current git version and it works fine on intel, nouveau and with software rendering. It needs some testing because it potentially affects all drivers with OpenGL >= 3.2 on every platform. If someone could test it with Radeon drivers, I would be really happy to enable it in upcoming release, at least on linux. --- data/graphical_restrictions.xml | 5 +++-- src/graphics/central_settings.cpp | 6 +++--- src/graphics/graphics_restrictions.cpp | 2 +- src/graphics/graphics_restrictions.hpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/data/graphical_restrictions.xml b/data/graphical_restrictions.xml index d22b9a6a2..dc0f0f011 100644 --- a/data/graphical_restrictions.xml +++ b/data/graphical_restrictions.xml @@ -5,6 +5,7 @@ + @@ -15,11 +16,11 @@ - + - + diff --git a/src/graphics/central_settings.cpp b/src/graphics/central_settings.cpp index 04326698d..92f460750 100644 --- a/src/graphics/central_settings.cpp +++ b/src/graphics/central_settings.cpp @@ -154,10 +154,10 @@ void CentralVideoSettings::init() hasUBO = true; Log::info("GLDriver", "ARB Uniform Buffer Object Present"); } - if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER4) && - hasGLExtension("GL_ARB_geometry_shader4")) { + if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER) && + (m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 2))) { hasGS = true; - Log::info("GLDriver", "ARB Geometry Shader 4 Present"); + Log::info("GLDriver", "Geometry Shaders Present"); } // Only unset the high def textures if they are set as default. If the diff --git a/src/graphics/graphics_restrictions.cpp b/src/graphics/graphics_restrictions.cpp index 2c5064fa4..ae5856eda 100644 --- a/src/graphics/graphics_restrictions.cpp +++ b/src/graphics/graphics_restrictions.cpp @@ -41,7 +41,7 @@ namespace GraphicsRestrictions const char *m_names_of_restrictions[] = { "UniformBufferObject", - "GeometryShader4", + "GeometryShader", "DrawIndirect", "TextureView", "TextureStorage", diff --git a/src/graphics/graphics_restrictions.hpp b/src/graphics/graphics_restrictions.hpp index 5df701c60..526544d04 100644 --- a/src/graphics/graphics_restrictions.hpp +++ b/src/graphics/graphics_restrictions.hpp @@ -35,7 +35,7 @@ namespace GraphicsRestrictions enum GraphicsRestrictionsType { GR_UNIFORM_BUFFER_OBJECT, - GR_GEOMETRY_SHADER4, + GR_GEOMETRY_SHADER, GR_DRAW_INDIRECT, GR_TEXTURE_VIEW, GR_TEXTURE_STORAGE, From 2c6e6789292d57b5aeeb13a8e300e9e01b3190dd Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Wed, 18 May 2016 19:57:09 -0400 Subject: [PATCH 4/5] Add new volcano track --- data/challenges/jungle.challenge | 2 +- data/challenges/volcano_island.challenge | 19 +++++++++++++++++++ data/grandprix/3_tothemoonandback.grandprix | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 data/challenges/volcano_island.challenge diff --git a/data/challenges/jungle.challenge b/data/challenges/jungle.challenge index 46ec0a924..b3e280633 100644 --- a/data/challenges/jungle.challenge +++ b/data/challenges/jungle.challenge @@ -2,7 +2,7 @@ - + diff --git a/data/challenges/volcano_island.challenge b/data/challenges/volcano_island.challenge new file mode 100644 index 000000000..10250c4f1 --- /dev/null +++ b/data/challenges/volcano_island.challenge @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/grandprix/3_tothemoonandback.grandprix b/data/grandprix/3_tothemoonandback.grandprix index 2d0f4b104..f5535d00f 100644 --- a/data/grandprix/3_tothemoonandback.grandprix +++ b/data/grandprix/3_tothemoonandback.grandprix @@ -5,7 +5,7 @@ - + From 6f36bc5b34b28ffe4c124b3c0e2f0d73e972de35 Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Wed, 18 May 2016 20:00:57 -0400 Subject: [PATCH 5/5] Update changelog and credits --- CHANGELOG.md | 1 + data/CREDITS | Bin 16524 -> 16560 bytes 2 files changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6150e4d..1d438c7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * Battle mode AI by Benau * Soccer mode AI by Benau * New subsea track by samuncle +* New volcano track by Ponzino * TTF font rendering by Benau * Kart properties refactor by Flakebi * Scripting work under the hood diff --git a/data/CREDITS b/data/CREDITS index 4d002181b10266ad83169a0dc9df33f63b9a9f16..96165c2729151f833543c65f7447d9ea4615c165 100755 GIT binary patch delta 110 zcmeBaWZVEmMLfCz4EYRs3{?!7Kr){}fx!xh!+@+DhGd3BpqK)KCqpri2V$p8KFy;n x?9WgHRGkjikqDGgU{Ig@mPejZeKI%iM(z-xY$8x^Hbe2`Y#!&$7kKv=0RVhN8fpLl delta 64 zcmdnc$k@}!xS@z=@(x}b*&v2eh7^WM1`7sL1_cHyAPxqKBry~-q%tH