From 481be1cd34e6a46cc940f4c6b150c3ef2a1d9086 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 6 Jan 2016 20:10:42 -0800 Subject: [PATCH] Fix GL feature detection. --- Windows/GPU/WindowsGLContext.cpp | 4 +--- android/jni/app-android.cpp | 2 ++ ext/native/base/BlackberryMain.cpp | 2 ++ ext/native/base/PCMain.cpp | 1 + ios/ViewController.mm | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Windows/GPU/WindowsGLContext.cpp b/Windows/GPU/WindowsGLContext.cpp index 072af0a5b5..82cacb910f 100644 --- a/Windows/GPU/WindowsGLContext.cpp +++ b/Windows/GPU/WindowsGLContext.cpp @@ -387,9 +387,7 @@ void WindowsGLContext::Resize() { } Thin3DContext *WindowsGLContext::CreateThin3DContext() { + CheckGLExtensions(); Thin3DContext *ctx = T3DCreateGLContext(); - if (ctx) { - CheckGLExtensions(); - } return ctx; } diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 6c3348c999..5153c2698e 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -27,6 +27,7 @@ #include "net/resolve.h" #include "android/jni/native_audio.h" #include "gfx/gl_common.h" +#include "gfx_es2/gpu_features.h" #include "Common/GraphicsContext.h" #include "Common/GL/GLInterfaceBase.h" @@ -52,6 +53,7 @@ public: void SwapInterval(int interval) override {} void Resize() {} Thin3DContext *CreateThin3DContext() { + CheckGLExtensions(); return T3DCreateGLContext(); } diff --git a/ext/native/base/BlackberryMain.cpp b/ext/native/base/BlackberryMain.cpp index 30c1239e7b..3540a80df8 100644 --- a/ext/native/base/BlackberryMain.cpp +++ b/ext/native/base/BlackberryMain.cpp @@ -13,6 +13,7 @@ #include // Receive invocation messages #include "BlackberryMain.h" #include "base/NKCodeFromBlackberry.h" +#include "gfx_es2/gpu_features.h" #include "thin3d/thin3d.h" #include "Core/System.h" @@ -26,6 +27,7 @@ static GraphicsContext *graphicsContext; class GLDummyGraphicsContext : public DummyGraphicsContext { public: Thin3DContext *CreateThin3DContext() override { + CheckGLExtensions(); return T3DCreateGLContext(); } }; diff --git a/ext/native/base/PCMain.cpp b/ext/native/base/PCMain.cpp index be10f4a2d1..9ab0ef9f6f 100644 --- a/ext/native/base/PCMain.cpp +++ b/ext/native/base/PCMain.cpp @@ -49,6 +49,7 @@ SDLJoystick *joystick = NULL; class GLDummyGraphicsContext : public DummyGraphicsContext { public: Thin3DContext *CreateThin3DContext() override { + CheckGLExtensions(); return T3DCreateGLContext(); } }; diff --git a/ios/ViewController.mm b/ios/ViewController.mm index c1d28d8570..e1a09cfe92 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -17,6 +17,7 @@ #include "ui/screen.h" #include "thin3d/thin3d.h" #include "input/keycodes.h" +#include "gfx_es2/gpu_features.h" #include "Core/Config.h" #include "Common/GraphicsContext.h" @@ -36,6 +37,7 @@ class IOSDummyGraphicsContext : public DummyGraphicsContext { public: Thin3DContext *CreateThin3DContext() override { + CheckGLExtensions(); return T3DCreateGLContext(); } };