diff --git a/data/layout.xml b/data/layout.xml
index 57c7414..4f125d4 100644
--- a/data/layout.xml
+++ b/data/layout.xml
@@ -1666,8 +1666,8 @@ Here's a list of what's available in this release.
-
-
+
+
diff --git a/src/app_layout.cpp b/src/app_layout.cpp
index 8bd1a86..e239827 100644
--- a/src/app_layout.cpp
+++ b/src/app_layout.cpp
@@ -1244,7 +1244,7 @@ void App::initLayout()
if (auto t = x->find("ext-flt-text"))
{
int bits = ShaderManager::ext_texture_float ? 32 : 16;
- t->set_text_format("flt%d", bits);
+ t->set_text_format("F%d", bits);
}
x->m_color = glm::vec4(0, 1, 0, 1);
}
diff --git a/src/app_shaders.cpp b/src/app_shaders.cpp
index 2d30599..8b59751 100644
--- a/src/app_shaders.cpp
+++ b/src/app_shaders.cpp
@@ -15,20 +15,27 @@ void App::initShaders()
for (int i = 0; i < n_exts; i++)
{
std::string ext = (const char*)glGetStringi(GL_EXTENSIONS, i);
- if (GLAD_GL_EXT_shader_framebuffer_fetch || GLAD_GL_EXT_shader_framebuffer_fetch_non_coherent)
- {
+ if (ext.find("shader_framebuffer_fetch") != std::string::npos)
ShaderManager::ext_framebuffer_fetch = true;
- }
- else if (GLAD_GL_ARB_texture_float || GLAD_GL_ATI_texture_float)
- {
+#if __GLES__
+ if (ext.find("texture_float") != std::string::npos)
ShaderManager::ext_texture_float = true;
- }
- else if (GLAD_GL_NV_half_float || GLAD_GL_ARB_half_float_pixel)
- {
+ if (ext.find("color_buffer_float") != std::string::npos)
+ ShaderManager::ext_texture_float = true;
+ if (ext.find("texture__half_float") != std::string::npos)
ShaderManager::ext_half_float_pixel = true;
- }
+ if (ext.find("color_buffer_half_float") != std::string::npos)
+ ShaderManager::ext_half_float_pixel = true;
+#endif
+ LOG("EXT: %s", ext.c_str());
}
});
+
+#if __GL__
+ // In OpenGL 3.3 these should be already available
+ ShaderManager::ext_texture_float = true;
+ ShaderManager::ext_half_float_pixel = true;
+#endif
LOG("Shader Extension shader_framebuffer_fetch: %s", ShaderManager::ext_framebuffer_fetch ? "enabled" : "disabled");
diff --git a/src/pch.h b/src/pch.h
index c58fdff..084f223 100644
--- a/src/pch.h
+++ b/src/pch.h
@@ -20,6 +20,7 @@
#include
#include
#define SHADER_VERSION "#version 300 es\n"
+ #define __GLES__ 1
#define PP_OS "ios"
#else
#define __OSX__ 1
@@ -30,6 +31,7 @@
#include
#include
#define SHADER_VERSION "#version 150\n"
+ #define __GL__ 1
#define PP_OS "osx"
#endif
@@ -52,6 +54,7 @@
#define SHADER_VERSION "#version 300 es\n"
#define PP_OS "android"
+ #define __GLES__ 1
#define __block
//#define STBI_NEON
#define BT_SetTerminate void
@@ -75,6 +78,8 @@
#include
#include
+ #define __WIN__ 1
+ #define __GL__ 1
#define SHADER_VERSION "#version 150\n"
#define PP_OS "win"
#define __block