[deng] 01/03: import upstream 1.15.4
Michael Gilbert
mgilbert at moszumanska.debian.org
Sun Oct 4 03:29:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
mgilbert pushed a commit to branch master
in repository deng.
commit 79e068cd82f4bb58ff4c14fb057ebd8dd141faf3
Author: Michael Gilbert <mgilbert at debian.org>
Date: Sun Oct 4 00:55:05 2015 +0000
import upstream 1.15.4
---
doomsday/api/dd_version.h | 4 +-
doomsday/client/include/ui/b_util.h | 4 +-
doomsday/client/net.dengine.client.pack/Info.dei | 2 +-
.../net.dengine.client.pack/defaultstyle.pack/Info | 2 +-
.../net.dengine.client.pack/renderer.pack/Info | 2 +-
.../renderer.pack/lensflares.pack/Info | 2 +-
doomsday/client/src/clientapp.cpp | 2 +
doomsday/client/src/ui/b_util.cpp | 6 +-
doomsday/client/src/ui/commandbinding.cpp | 4 +-
doomsday/doc/output/doomsday.6 | 2 +-
doomsday/doc/readme/readme.ame | 2 +-
doomsday/doc/server/server.ame | 2 +-
doomsday/doc/shell-text/shell-text.ame | 2 +-
doomsday/libappfw/appfw.doxy | 2 +-
doomsday/libcore/net.dengine.stdlib.pack/Info | 2 +-
doomsday/libgui/gui.doxy | 2 +-
doomsday/libgui/include/de/graphics/glinfo.h | 4 +-
doomsday/libgui/include/de/graphics/gltarget.h | 4 +-
doomsday/libgui/net.dengine.stdlib.gui.pack/Info | 2 +-
doomsday/libgui/src/graphics/glentrypoints.cpp | 159 ++++++++++++---------
doomsday/libgui/src/graphics/glframebuffer.cpp | 74 +++++++---
doomsday/libgui/src/graphics/glinfo.cpp | 6 +-
doomsday/libgui/src/graphics/gltarget.cpp | 16 ++-
doomsday/net.dengine.base.pack/Info | 2 +-
doomsday/sdk-qch.doxy | 4 +-
25 files changed, 188 insertions(+), 125 deletions(-)
diff --git a/doomsday/api/dd_version.h b/doomsday/api/dd_version.h
index 0f4c64b..78f14e1 100644
--- a/doomsday/api/dd_version.h
+++ b/doomsday/api/dd_version.h
@@ -51,8 +51,8 @@ extern "C" {
* Revision number increases with each small (maintenance) release.
*/
-#define DOOMSDAY_VERSION_BASE "1.15.3"
-#define DOOMSDAY_VERSION_NUMBER 1,15,3,0 // For WIN32 version info.
+#define DOOMSDAY_VERSION_BASE "1.15.4"
+#define DOOMSDAY_VERSION_NUMBER 1,15,4,0 // For WIN32 version info.
//#define DOOMSDAY_RELEASE_NAME "Example"
/**
diff --git a/doomsday/client/include/ui/b_util.h b/doomsday/client/include/ui/b_util.h
index 3dd9847..a99c940 100644
--- a/doomsday/client/include/ui/b_util.h
+++ b/doomsday/client/include/ui/b_util.h
@@ -56,7 +56,7 @@ bool B_CheckAxisPosition(Binding::ControlTest test, float testPos, float pos);
* @param localNum Local player number.
* @param context Relevant binding context, if any (may be @c nullptr).
*/
-bool B_CheckCondition(de::Record const *cond, int localNum, BindContext *context);
+bool B_CheckCondition(de::Record const *cond, int localNum, BindContext const *context);
bool B_EqualConditions(de::Record const &a, de::Record const &b);
@@ -72,7 +72,7 @@ bool B_ParseJoystickTypeAndId(ddeventtype_t &type, int &id, int deviceId, char c
de::String B_ControlDescToString(int deviceId, ddeventtype_t type, int id);
-void B_EvaluateImpulseBindings(BindContext *context, int localNum, int impulseId,
+void B_EvaluateImpulseBindings(BindContext const *context, int localNum, int impulseId,
float *pos, float *relativeOffset, bool allowTriggered);
char const *B_ShortNameForKey(int ddKey, bool forceLowercase = true);
diff --git a/doomsday/client/net.dengine.client.pack/Info.dei b/doomsday/client/net.dengine.client.pack/Info.dei
index f8023e0..b933862 100644
--- a/doomsday/client/net.dengine.client.pack/Info.dei
+++ b/doomsday/client/net.dengine.client.pack/Info.dei
@@ -1,7 +1,7 @@
# Client's primary resources
title: Doomsday Client
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core client
diff --git a/doomsday/client/net.dengine.client.pack/defaultstyle.pack/Info b/doomsday/client/net.dengine.client.pack/defaultstyle.pack/Info
index 4a1168f..128ce32 100644
--- a/doomsday/client/net.dengine.client.pack/defaultstyle.pack/Info
+++ b/doomsday/client/net.dengine.client.pack/defaultstyle.pack/Info
@@ -1,4 +1,4 @@
title: Doomsday Default UI Style
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: ui style
diff --git a/doomsday/client/net.dengine.client.pack/renderer.pack/Info b/doomsday/client/net.dengine.client.pack/renderer.pack/Info
index c8ca563..8c02605 100644
--- a/doomsday/client/net.dengine.client.pack/renderer.pack/Info
+++ b/doomsday/client/net.dengine.client.pack/renderer.pack/Info
@@ -1,6 +1,6 @@
# General resources for the renderer
title: Doomsday Renderer
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core
diff --git a/doomsday/client/net.dengine.client.pack/renderer.pack/lensflares.pack/Info b/doomsday/client/net.dengine.client.pack/renderer.pack/lensflares.pack/Info
index f544a04..14ea8be 100644
--- a/doomsday/client/net.dengine.client.pack/renderer.pack/lensflares.pack/Info
+++ b/doomsday/client/net.dengine.client.pack/renderer.pack/lensflares.pack/Info
@@ -1,5 +1,5 @@
title: Doomsday Default Lens Flares
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core fx
diff --git a/doomsday/client/src/clientapp.cpp b/doomsday/client/src/clientapp.cpp
index f5b2934..28f6a5a 100644
--- a/doomsday/client/src/clientapp.cpp
+++ b/doomsday/client/src/clientapp.cpp
@@ -78,6 +78,8 @@ static void handleLegacyCoreTerminate(char const *msg)
static void continueInitWithEventLoopRunning()
{
+ if(!ClientWindowSystem::mainExists()) return;
+
// Show the main window. This causes initialization to finish (in busy mode)
// as the canvas is visible and ready for initialization.
ClientWindowSystem::main().show();
diff --git a/doomsday/client/src/ui/b_util.cpp b/doomsday/client/src/ui/b_util.cpp
index ae1f057..d2c7514 100644
--- a/doomsday/client/src/ui/b_util.cpp
+++ b/doomsday/client/src/ui/b_util.cpp
@@ -429,7 +429,7 @@ bool B_CheckAxisPosition(Binding::ControlTest test, float testPos, float pos)
return false;
}
-bool B_CheckCondition(Record const *cond, int localNum, BindContext *context)
+bool B_CheckCondition(Record const *cond, int localNum, BindContext const *context)
{
DENG2_ASSERT(cond);
bool const fulfilled = !cond->getb("negate");
@@ -499,7 +499,7 @@ bool B_EqualConditions(Record const &a, Record const &b)
}
/// @todo: Belongs in BindContext? -ds
-void B_EvaluateImpulseBindings(BindContext *context, int localNum, int impulseId,
+void B_EvaluateImpulseBindings(BindContext const *context, int localNum, int impulseId,
float *pos, float *relativeOffset, bool allowTriggered)
{
DENG2_ASSERT(context); // Why call without one?
@@ -507,7 +507,7 @@ void B_EvaluateImpulseBindings(BindContext *context, int localNum, int impulseId
*pos = 0;
*relativeOffset = 0;
-
+
if(localNum < 0 || localNum >= DDMAXPLAYERS) return; // No local player specified.
uint const nowTime = Timer_RealMilliseconds();
diff --git a/doomsday/client/src/ui/commandbinding.cpp b/doomsday/client/src/ui/commandbinding.cpp
index e610162..d80ce8f 100644
--- a/doomsday/client/src/ui/commandbinding.cpp
+++ b/doomsday/client/src/ui/commandbinding.cpp
@@ -327,7 +327,7 @@ static void substituteInCommand(String const &command, ddevent_t const &event, d
Action *CommandBinding::makeAction(ddevent_t const &event, BindContext const &context,
bool respectHigherContexts) const
{
- if(geti("type") != event.type) return nullptr;
+ if(geti("type") != event.type) return nullptr;
InputDevice const *dev = nullptr;
if(event.type != E_SYMBOLIC)
@@ -431,7 +431,7 @@ Action *CommandBinding::makeAction(ddevent_t const &event, BindContext const &co
ArrayValue const &conds = def().geta("condition");
DENG2_FOR_EACH_CONST(ArrayValue::Elements, i, conds.elements())
{
- if(!B_CheckCondition((*i)->as<RecordValue>().record(), 0, nullptr))
+ if(!B_CheckCondition((*i)->as<RecordValue>().record(), 0, &context))
return nullptr;
}
diff --git a/doomsday/doc/output/doomsday.6 b/doomsday/doc/output/doomsday.6
index f369932..1830150 100644
--- a/doomsday/doc/output/doomsday.6
+++ b/doomsday/doc/output/doomsday.6
@@ -1,5 +1,5 @@
.\" manual page generated by Amethyst (mdoc+tbl)
-.Dd September 1, 2015
+.Dd October 1, 2015
.Os
.Dt "DOOMSDAY" 6
.Sh NAME
diff --git a/doomsday/doc/readme/readme.ame b/doomsday/doc/readme/readme.ame
index a3df40d..8754e57 100644
--- a/doomsday/doc/readme/readme.ame
+++ b/doomsday/doc/readme/readme.ame
@@ -5,7 +5,7 @@
@macro{TITLE}{ doomsday }
}
@macro{ONELINER}{ Enhanced source port of Doom, Heretic and Hexen }
- at macro{VERSION}{ Version 1.15.3 }
+ at macro{VERSION}{ Version 1.15.4 }
@macro{AUTHOR}{ Deng Team }
@macro{LINK}{ http://dengine.net/ }
@require{amestd}
diff --git a/doomsday/doc/server/server.ame b/doomsday/doc/server/server.ame
index 34b0109..2789f7a 100644
--- a/doomsday/doc/server/server.ame
+++ b/doomsday/doc/server/server.ame
@@ -1,7 +1,7 @@
$ Man page for doomsday-server
@macro{TITLE}{ doomsday-server }
@macro{ONELINER}{ Doomsday Engine multiplayer daemon }
- at macro{VERSION}{ Version 1.15.3 }
+ at macro{VERSION}{ Version 1.15.4 }
@macro{AUTHOR}{ Deng Team }
@macro{LINK}{ http://dengine.net/ }
@require{amestd}
diff --git a/doomsday/doc/shell-text/shell-text.ame b/doomsday/doc/shell-text/shell-text.ame
index 2960869..ec3706c 100644
--- a/doomsday/doc/shell-text/shell-text.ame
+++ b/doomsday/doc/shell-text/shell-text.ame
@@ -1,7 +1,7 @@
$ Man page for doomsday-shell-text
@macro{TITLE}{ doomsday-shell-text }
@macro{ONELINER}{ Utility for controlling and monitoring Doomsday servers }
- at macro{VERSION}{ Version 1.15.3 }
+ at macro{VERSION}{ Version 1.15.4 }
@macro{AUTHOR}{ Deng Team }
@macro{LINK}{ http://dengine.net/ }
@require{amestd}
diff --git a/doomsday/libappfw/appfw.doxy b/doomsday/libappfw/appfw.doxy
index aed9357..8d3d01d 100644
--- a/doomsday/libappfw/appfw.doxy
+++ b/doomsday/libappfw/appfw.doxy
@@ -2,7 +2,7 @@
@INCLUDE = ../doomsday.doxy
PROJECT_NAME = "libappfw"
-PROJECT_NUMBER = 1.15.3
+PROJECT_NUMBER = 1.15.4
PROJECT_BRIEF = "Application Framework"
OUTPUT_DIRECTORY = ../apidoc/appfw/
diff --git a/doomsday/libcore/net.dengine.stdlib.pack/Info b/doomsday/libcore/net.dengine.stdlib.pack/Info
index fc5e268..3568dfa 100644
--- a/doomsday/libcore/net.dengine.stdlib.pack/Info
+++ b/doomsday/libcore/net.dengine.stdlib.pack/Info
@@ -1,5 +1,5 @@
title: Doomsday Script Standard Library
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core script
diff --git a/doomsday/libgui/gui.doxy b/doomsday/libgui/gui.doxy
index 5aa6078..b06f56a 100644
--- a/doomsday/libgui/gui.doxy
+++ b/doomsday/libgui/gui.doxy
@@ -2,7 +2,7 @@
@INCLUDE = ../doomsday.doxy
PROJECT_NAME = "libgui"
-PROJECT_NUMBER = 1.15.3
+PROJECT_NUMBER = 1.15.4
PROJECT_BRIEF = "Graphics, Audio and Input Library"
OUTPUT_DIRECTORY = ../apidoc/gui/
diff --git a/doomsday/libgui/include/de/graphics/glinfo.h b/doomsday/libgui/include/de/graphics/glinfo.h
index 7d84044..ab22f21 100644
--- a/doomsday/libgui/include/de/graphics/glinfo.h
+++ b/doomsday/libgui/include/de/graphics/glinfo.h
@@ -13,7 +13,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
- * http://www.gnu.org/licenses</small>
+ * http://www.gnu.org/licenses</small>
*/
#ifndef LIBGUI_GLINFO_H
@@ -32,7 +32,6 @@ public:
struct Extensions
{
duint32 ARB_draw_instanced : 1;
- duint32 ARB_framebuffer_object : 1;
duint32 ARB_instanced_arrays : 1;
duint32 ARB_texture_env_combine : 1;
duint32 ARB_texture_non_power_of_two : 1;
@@ -40,6 +39,7 @@ public:
duint32 EXT_blend_subtract : 1;
duint32 EXT_framebuffer_blit : 1;
duint32 EXT_framebuffer_multisample : 1;
+ duint32 EXT_framebuffer_object : 1;
duint32 EXT_packed_depth_stencil : 1;
duint32 EXT_texture_compression_s3tc : 1;
duint32 EXT_texture_filter_anisotropic : 1;
diff --git a/doomsday/libgui/include/de/graphics/gltarget.h b/doomsday/libgui/include/de/graphics/gltarget.h
index 200c69e..07cace9 100644
--- a/doomsday/libgui/include/de/graphics/gltarget.h
+++ b/doomsday/libgui/include/de/graphics/gltarget.h
@@ -13,7 +13,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
- * http://www.gnu.org/licenses</small>
+ * http://www.gnu.org/licenses</small>
*/
#ifndef LIBGUI_GLTARGET_H
@@ -58,6 +58,8 @@ public:
ColorStencil = Color | Stencil,
DepthStencil = Depth | Stencil,
+ SeparateDepthAndStencil = 0x10, ///< Depth and stencil should use separate buffers.
+
NoAttachments = 0,
DefaultFlags = ColorDepth
};
diff --git a/doomsday/libgui/net.dengine.stdlib.gui.pack/Info b/doomsday/libgui/net.dengine.stdlib.gui.pack/Info
index 27917ef..9f822bc 100644
--- a/doomsday/libgui/net.dengine.stdlib.gui.pack/Info
+++ b/doomsday/libgui/net.dengine.stdlib.gui.pack/Info
@@ -1,5 +1,5 @@
title: Doomsday Script Standard Library: GUI
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core script gui
diff --git a/doomsday/libgui/src/graphics/glentrypoints.cpp b/doomsday/libgui/src/graphics/glentrypoints.cpp
index fa7e8f6..c38830b 100644
--- a/doomsday/libgui/src/graphics/glentrypoints.cpp
+++ b/doomsday/libgui/src/graphics/glentrypoints.cpp
@@ -117,6 +117,12 @@ PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisorARB;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC glRenderbufferStorageMultisampleCoverageNV;
#endif
+static void reportMissingEntryPoint(char const *name)
+{
+ throw de::Error("getAllOpenGLEntryPoints",
+ QString("Required OpenGL function missing: %1").arg(name));
+}
+
void getAllOpenGLEntryPoints()
{
static bool haveProcs = false;
@@ -124,89 +130,100 @@ void getAllOpenGLEntryPoints()
#ifdef WIN32
# ifdef MSVC
-# define GET_PROC_EXT(name) *((void**)&name) = wglGetProcAddress(#name)
+# define GET_PROC_EXT_ALT(varName, altName) *((void**)&varName) = wglGetProcAddress(#altName)
+# define GET_PROC_EXT(name) GET_PROC_EXT_ALT(name, name)
# else
-# define GET_PROC_EXT(name) *reinterpret_cast<PROC *>(&name) = wglGetProcAddress(#name)
+# define GET_PROC_EXT_ALT(varName, altName) *reinterpret_cast<PROC *>(&varName) = wglGetProcAddress(#altName)
+# define GET_PROC_EXT(name) GET_PROC_EXT_ALT(name, name)
# endif
#else
-# define GET_PROC_EXT(name) *((void (**)())&name) = glXGetProcAddress((GLubyte const *)#name)
+# define GET_PROC_EXT_ALT(varName, altName) *((void (**)())&varName) = glXGetProcAddress((GLubyte const *)#altName)
+# define GET_PROC_EXT(name) GET_PROC_EXT_ALT(name, name)
#endif
-#define GET_PROC(name) GET_PROC_EXT(name); DENG2_ASSERT(name != 0) // must have
+#define GET_PROC(name) GET_PROC_EXT(name); DENG2_ASSERT(name != 0); \
+ if(!name) { reportMissingEntryPoint(#name); } // must have
+
+#define GET_PROC_ALT(name, altName) \
+ GET_PROC_EXT_ALT(name, altName); /* try the alternative name first */ \
+ if(!name) { \
+ GET_PROC_EXT(name); DENG2_ASSERT(name != 0); \
+ if(!name) { reportMissingEntryPoint(#name); } /* must have */ \
+ }
#ifdef LIBGUI_FETCH_GL_1_3
- GET_PROC(glActiveTexture);
- GET_PROC(glBlendEquation);
- GET_PROC(glClientActiveTexture);
- GET_PROC(glMultiTexCoord2f);
- GET_PROC(glMultiTexCoord2fv);
+ GET_PROC (glActiveTexture);
+ GET_PROC (glBlendEquation);
+ GET_PROC (glClientActiveTexture);
+ GET_PROC (glMultiTexCoord2f);
+ GET_PROC (glMultiTexCoord2fv);
#endif
#ifdef WIN32
- GET_PROC(wglGetExtensionsStringARB);
+ GET_PROC (wglGetExtensionsStringARB);
#endif
- GET_PROC(glAttachShader);
-
- GET_PROC(glBindAttribLocation);
- GET_PROC(glBindBuffer);
- GET_PROC(glBindFramebuffer);
- GET_PROC(glBindRenderbuffer);
- GET_PROC(glBlendFuncSeparate);
- GET_PROC(glBufferData);
-
- GET_PROC(glCheckFramebufferStatus);
- GET_PROC(glCompileShader);
- GET_PROC(glCreateProgram);
- GET_PROC(glCreateShader);
-
- GET_PROC(glDeleteBuffers);
- GET_PROC(glDeleteFramebuffers);
- GET_PROC(glDeleteProgram);
- GET_PROC(glDeleteRenderbuffers);
- GET_PROC(glDeleteShader);
- GET_PROC(glDetachShader);
- GET_PROC(glDisableVertexAttribArray);
-
- GET_PROC(glEnableVertexAttribArray);
-
- GET_PROC(glFramebufferRenderbuffer);
- GET_PROC(glFramebufferTexture2D);
-
- GET_PROC(glGenBuffers);
- GET_PROC(glGenFramebuffers);
- GET_PROC(glGenerateMipmap);
- GET_PROC(glGenRenderbuffers);
- GET_PROC(glGetAttribLocation);
- GET_PROC(glGetProgramInfoLog);
- GET_PROC(glGetProgramiv);
- GET_PROC(glGetShaderInfoLog);
- GET_PROC(glGetShaderiv);
- GET_PROC(glGetShaderSource);
- GET_PROC(glGetUniformLocation);
-
- GET_PROC(glIsBuffer);
- GET_PROC(glIsFramebuffer);
- GET_PROC(glIsProgram);
-
- GET_PROC(glLinkProgram);
-
- GET_PROC(glRenderbufferStorage);
-
- GET_PROC(glShaderSource);
-
- GET_PROC(glUniform1f);
- GET_PROC(glUniform1i);
- GET_PROC(glUniform2f);
- GET_PROC(glUniform3f);
- GET_PROC(glUniform3fv);
- GET_PROC(glUniform4f);
- GET_PROC(glUniform4fv);
- GET_PROC(glUniformMatrix3fv);
- GET_PROC(glUniformMatrix4fv);
- GET_PROC(glUseProgram);
-
- GET_PROC(glVertexAttribPointer);
+ GET_PROC (glAttachShader);
+
+ GET_PROC (glBindAttribLocation);
+ GET_PROC (glBindBuffer);
+ GET_PROC_ALT(glBindFramebuffer, glBindFramebufferEXT);
+ GET_PROC_ALT(glBindRenderbuffer, glBindRenderbufferEXT);
+ GET_PROC_ALT(glBlendFuncSeparate, glBlendFuncSeparateEXT);
+ GET_PROC (glBufferData);
+
+ GET_PROC_ALT(glCheckFramebufferStatus, glCheckFramebufferStatusEXT);
+ GET_PROC (glCompileShader);
+ GET_PROC (glCreateProgram);
+ GET_PROC (glCreateShader);
+
+ GET_PROC (glDeleteBuffers);
+ GET_PROC_ALT(glDeleteFramebuffers, glDeleteFramebuffersEXT);
+ GET_PROC (glDeleteProgram);
+ GET_PROC_ALT(glDeleteRenderbuffers, glDeleteRenderbuffersEXT);
+ GET_PROC (glDeleteShader);
+ GET_PROC (glDetachShader);
+ GET_PROC (glDisableVertexAttribArray);
+
+ GET_PROC (glEnableVertexAttribArray);
+
+ GET_PROC_ALT(glFramebufferRenderbuffer, glFramebufferRenderbufferEXT);
+ GET_PROC_ALT(glFramebufferTexture2D, glFramebufferTexture2DEXT);
+
+ GET_PROC (glGenBuffers);
+ GET_PROC_ALT(glGenFramebuffers, glGenFramebuffersEXT);
+ GET_PROC_ALT(glGenerateMipmap, glGenerateMipmapEXT);
+ GET_PROC_ALT(glGenRenderbuffers, glGenRenderbuffersEXT);
+ GET_PROC (glGetAttribLocation);
+ GET_PROC (glGetProgramInfoLog);
+ GET_PROC (glGetProgramiv);
+ GET_PROC (glGetShaderInfoLog);
+ GET_PROC (glGetShaderiv);
+ GET_PROC (glGetShaderSource);
+ GET_PROC (glGetUniformLocation);
+
+ GET_PROC (glIsBuffer);
+ GET_PROC_ALT(glIsFramebuffer, glIsFramebufferEXT);
+ GET_PROC (glIsProgram);
+
+ GET_PROC (glLinkProgram);
+
+ GET_PROC_ALT(glRenderbufferStorage, glRenderbufferStorageEXT);
+
+ GET_PROC (glShaderSource);
+
+ GET_PROC (glUniform1f);
+ GET_PROC (glUniform1i);
+ GET_PROC (glUniform2f);
+ GET_PROC (glUniform3f);
+ GET_PROC (glUniform3fv);
+ GET_PROC (glUniform4f);
+ GET_PROC (glUniform4fv);
+ GET_PROC (glUniformMatrix3fv);
+ GET_PROC (glUniformMatrix4fv);
+ GET_PROC (glUseProgram);
+
+ GET_PROC (glVertexAttribPointer);
// Extensions:
diff --git a/doomsday/libgui/src/graphics/glframebuffer.cpp b/doomsday/libgui/src/graphics/glframebuffer.cpp
index 1a6ece7..914813e 100644
--- a/doomsday/libgui/src/graphics/glframebuffer.cpp
+++ b/doomsday/libgui/src/graphics/glframebuffer.cpp
@@ -13,7 +13,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
- * http://www.gnu.org/licenses</small>
+ * http://www.gnu.org/licenses</small>
*/
#include "de/GLFramebuffer"
@@ -159,20 +159,60 @@ DENG2_PIMPL(GLFramebuffer)
DENG2_ASSERT(depthStencil.isReady());
- try
+ // Try a couple of different ways to set up the FBO.
+ for(int attempt = 0; ; ++attempt)
{
- // We'd like to use texture attachments for both color and depth/stencil.
- target.configure(&color, &depthStencil);
- }
- catch(GLTarget::ConfigError const &er)
- {
- // Alternatively try without depth/stencil texture (some renderer features
- // will not be available!).
- LOG_GL_WARNING("Texture-based framebuffer failed: %s\n"
- "Trying fallback without depth/stencil texture")
- << er.asText();
-
- target.configure(GLTarget::Color, color, GLTarget::DepthStencil);
+ String failMsg;
+ try
+ {
+ switch(attempt)
+ {
+ case 0:
+ // Most preferred: render both color and depth+stencil to textures.
+ // Allows shaders to access contents of the entire framebuffer.
+ failMsg = "Texture-based framebuffer failed: %s\n"
+ "Trying again without depth/stencil texture";
+ target.configure(&color, &depthStencil);
+ break;
+
+ case 1:
+ failMsg = "Color texture with unified depth/stencil renderbuffer failed: %s\n"
+ "Trying again without stencil";
+ target.configure(GLTarget::Color, color, GLTarget::DepthStencil);
+ LOG_GL_WARNING("Renderer feature unavailable: lensflare depth");
+ break;
+
+ case 2:
+ failMsg = "Color texture with depth renderbuffer failed: %s\n"
+ "Trying again without texture buffers";
+ target.configure(GLTarget::Color, color, GLTarget::Depth);
+ LOG_GL_WARNING("Renderer features unavailable: sky mask, lensflare depth");
+ break;
+
+ case 3:
+ failMsg = "Renderbuffer-based framebuffer failed: %s\n"
+ "Trying again without stencil";
+ target.configure(size, GLTarget::ColorDepthStencil);
+ LOG_GL_WARNING("Renderer features unavailable: postfx, lensflare depth");
+ break;
+
+ case 4:
+ // Final fallback: simple FBO with just color+depth renderbuffers.
+ // No postfx, no access from shaders, no sky mask.
+ target.configure(size, GLTarget::ColorDepth);
+ LOG_GL_WARNING("Renderer features unavailable: postfx, sky mask, lensflare depth");
+ break;
+
+ default:
+ break;
+ }
+ break; // success!
+ }
+ catch(GLTarget::ConfigError const &er)
+ {
+ if(failMsg.isEmpty()) throw er; // Can't handle it.
+ LOG_GL_NOTE(failMsg) << er.asText();
+ }
}
target.clear(GLTarget::ColorDepthStencil);
@@ -304,9 +344,9 @@ void GLFramebuffer::glInit()
LOG_AS("GLFramebuffer");
// Check for some integral OpenGL functionality.
- if(!GLInfo::extensions().ARB_framebuffer_object)
+ if(!GLInfo::extensions().EXT_framebuffer_object)
{
- LOG_GL_WARNING("Required GL_ARB_framebuffer_object is missing!");
+ LOG_GL_WARNING("Required GL_EXT_framebuffer_object is missing!");
}
if(!GLInfo::extensions().EXT_packed_depth_stencil)
{
@@ -398,7 +438,7 @@ void GLFramebuffer::drawBuffer(float opacity)
}
bool GLFramebuffer::setDefaultMultisampling(int sampleCount)
-{
+{
LOG_AS("GLFramebuffer");
int const newCount = max(1, sampleCount);
diff --git a/doomsday/libgui/src/graphics/glinfo.cpp b/doomsday/libgui/src/graphics/glinfo.cpp
index 4c5860d..4e6c7b0 100644
--- a/doomsday/libgui/src/graphics/glinfo.cpp
+++ b/doomsday/libgui/src/graphics/glinfo.cpp
@@ -14,7 +14,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
- * http://www.gnu.org/licenses</small>
+ * http://www.gnu.org/licenses</small>
*/
#include "de/GLInfo"
@@ -90,7 +90,7 @@ DENG2_PIMPL_NOREF(GLInfo)
#ifdef WIN32
// Prefer the wgl-specific extensions.
- if(wglGetExtensionsStringARB != nullptr &&
+ if(wglGetExtensionsStringARB != nullptr &&
checkExtensionString(ext, (GLubyte const *)wglGetExtensionsStringARB(wglGetCurrentDC())))
return true;
#endif
@@ -119,7 +119,6 @@ DENG2_PIMPL_NOREF(GLInfo)
// Extensions.
ext.ARB_draw_instanced = query("GL_ARB_draw_instanced");
- ext.ARB_framebuffer_object = query("GL_ARB_framebuffer_object");
ext.ARB_instanced_arrays = query("GL_ARB_instanced_arrays");
ext.ARB_texture_env_combine = query("GL_ARB_texture_env_combine") || query("GL_EXT_texture_env_combine");
ext.ARB_texture_non_power_of_two = query("GL_ARB_texture_non_power_of_two");
@@ -127,6 +126,7 @@ DENG2_PIMPL_NOREF(GLInfo)
ext.EXT_blend_subtract = query("GL_EXT_blend_subtract");
ext.EXT_framebuffer_blit = query("GL_EXT_framebuffer_blit");
ext.EXT_framebuffer_multisample = query("GL_EXT_framebuffer_multisample");
+ ext.EXT_framebuffer_object = query("GL_EXT_framebuffer_object");
ext.EXT_packed_depth_stencil = query("GL_EXT_packed_depth_stencil");
ext.EXT_texture_compression_s3tc = query("GL_EXT_texture_compression_s3tc");
ext.EXT_texture_filter_anisotropic = query("GL_EXT_texture_filter_anisotropic");
diff --git a/doomsday/libgui/src/graphics/gltarget.cpp b/doomsday/libgui/src/graphics/gltarget.cpp
index 7262b9e..b73a26f 100644
--- a/doomsday/libgui/src/graphics/gltarget.cpp
+++ b/doomsday/libgui/src/graphics/gltarget.cpp
@@ -16,7 +16,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
- * http://www.gnu.org/licenses</small>
+ * http://www.gnu.org/licenses</small>
*/
#include "de/GLTarget"
@@ -79,7 +79,7 @@ DENG2_OBSERVES(Asset, Deletion)
GLTexture *bufTextures[MAX_ATTACHMENTS];
Flags flags;
Flags textureAttachment; ///< Where to attach @a texture.
- GLTexture *texture;
+ GLTexture *texture;
Vector2ui size;
Vector4f clearColor;
Rectangleui activeRect; ///< Initially null.
@@ -255,7 +255,9 @@ DENG2_OBSERVES(Asset, Deletion)
attachRenderbuffer(ColorBuffer, GL_RGBA8, GL_COLOR_ATTACHMENT0);
}
- if(flags.testFlag(DepthStencil) && (!texture || textureAttachment == Color))
+ if( flags.testFlag(DepthStencil) &&
+ !flags.testFlag(SeparateDepthAndStencil) &&
+ (!texture || textureAttachment == Color))
{
// We can use a combined depth/stencil buffer.
LOG_GL_VERBOSE("FBO %i: depth+stencil renderbuffer %s") << fbo << size.asText();
@@ -267,12 +269,12 @@ DENG2_OBSERVES(Asset, Deletion)
if(flags.testFlag(Depth) && !textureAttachment.testFlag(Depth))
{
LOG_GL_VERBOSE("FBO %i: depth renderbuffer %s") << fbo << size.asText();
- attachRenderbuffer(DepthBuffer, GL_DEPTH_COMPONENT16, GL_DEPTH_ATTACHMENT);
+ attachRenderbuffer(DepthBuffer, GL_DEPTH_COMPONENT, GL_DEPTH_ATTACHMENT);
}
if(flags.testFlag(Stencil) && !textureAttachment.testFlag(Stencil))
{
LOG_GL_VERBOSE("FBO %i: stencil renderbuffer %s") << fbo << size.asText();
- attachRenderbuffer(StencilBuffer, GL_STENCIL_INDEX8, GL_STENCIL_ATTACHMENT);
+ attachRenderbuffer(StencilBuffer, GL_STENCIL_INDEX, GL_STENCIL_ATTACHMENT);
}
}
@@ -354,7 +356,7 @@ DENG2_OBSERVES(Asset, Deletion)
status == GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT? "Incomplete attachments" :
status == GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS? "Mismatch with dimensions" :
status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT? "No images attached" :
- "Unsupported");
+ QString("Unsupported (0x%1)").arg(status, 0, 16));
}
self.setState(Ready);
}
@@ -521,7 +523,7 @@ void GLTarget::glBind() const
//DENG2_ASSERT(!d->fbo || glIsFramebuffer(d->fbo));
if(d->fbo && !glIsFramebuffer(d->fbo))
{
- qDebug() << "GLTarget: WARNING! Attempting to bind FBO" << d->fbo
+ qDebug() << "GLTarget: WARNING! Attempting to bind FBO" << d->fbo
<< "that is not a valid OpenGL FBO";
}
diff --git a/doomsday/net.dengine.base.pack/Info b/doomsday/net.dengine.base.pack/Info
index 974769b..706e607 100644
--- a/doomsday/net.dengine.base.pack/Info
+++ b/doomsday/net.dengine.base.pack/Info
@@ -1,6 +1,6 @@
# Shared resources for all Doomsday applications
title: Doomsday Base
-version: 1.15.3
+version: 1.15.4
license: GPL 3+
tags: core
diff --git a/doomsday/sdk-qch.doxy b/doomsday/sdk-qch.doxy
index f6d4139..9a6b72b 100644
--- a/doomsday/sdk-qch.doxy
+++ b/doomsday/sdk-qch.doxy
@@ -5,8 +5,8 @@ OUTPUT_DIRECTORY = apidoc-qch/
# Also generate help files for Qt Creator
GENERATE_QHP = YES
QCH_FILE = "doomsday.qch"
-QHP_NAMESPACE = "net.dengine.sdk.1153"
-QHP_VIRTUAL_FOLDER = "doomsday-1.15.3"
+QHP_NAMESPACE = "net.dengine.sdk.1154"
+QHP_VIRTUAL_FOLDER = "doomsday-1.15.4"
QHG_LOCATION = "../build/scripts/qhelp.py"
# Dynamic HTML doesn't work inside Qt Creator
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/deng.git
More information about the Pkg-games-commits
mailing list