|
@@ -1039,8 +1039,10 @@ reset() {
|
|
|
#endif
|
|
#endif
|
|
|
_supports_tex_storage = true;
|
|
_supports_tex_storage = true;
|
|
|
|
|
|
|
|
|
|
+#ifndef OPENGLES
|
|
|
_glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)
|
|
_glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)
|
|
|
get_extension_func("glTexStorage1D");
|
|
get_extension_func("glTexStorage1D");
|
|
|
|
|
+#endif
|
|
|
_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)
|
|
_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)
|
|
|
get_extension_func("glTexStorage2D");
|
|
get_extension_func("glTexStorage2D");
|
|
|
_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)
|
|
_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)
|
|
@@ -1050,8 +1052,6 @@ reset() {
|
|
|
else if (has_extension("GL_EXT_texture_storage")) {
|
|
else if (has_extension("GL_EXT_texture_storage")) {
|
|
|
_supports_tex_storage = true;
|
|
_supports_tex_storage = true;
|
|
|
|
|
|
|
|
- _glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)
|
|
|
|
|
- get_extension_func("glTexStorage1DEXT");
|
|
|
|
|
_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)
|
|
_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)
|
|
|
get_extension_func("glTexStorage2DEXT");
|
|
get_extension_func("glTexStorage2DEXT");
|
|
|
_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)
|
|
_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)
|
|
@@ -1060,7 +1060,11 @@ reset() {
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
if (_supports_tex_storage) {
|
|
if (_supports_tex_storage) {
|
|
|
- if (_glTexStorage1D == nullptr || _glTexStorage2D == nullptr || _glTexStorage3D == nullptr) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+#ifndef OPENGLES
|
|
|
|
|
+ _glTexStorage1D == nullptr ||
|
|
|
|
|
+#endif
|
|
|
|
|
+ _glTexStorage2D == nullptr || _glTexStorage3D == nullptr) {
|
|
|
GLCAT.warning()
|
|
GLCAT.warning()
|
|
|
<< "Immutable texture storage advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n";
|
|
<< "Immutable texture storage advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n";
|
|
|
_supports_tex_storage = false;
|
|
_supports_tex_storage = false;
|
|
@@ -13230,8 +13234,10 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) {
|
|
|
case Texture::TT_buffer_texture:
|
|
case Texture::TT_buffer_texture:
|
|
|
// Won't get here, but squelch compiler warning
|
|
// Won't get here, but squelch compiler warning
|
|
|
case Texture::TT_1d_texture:
|
|
case Texture::TT_1d_texture:
|
|
|
|
|
+#ifndef OPENGLES
|
|
|
_glTexStorage1D(target, num_levels, internal_format, width);
|
|
_glTexStorage1D(target, num_levels, internal_format, width);
|
|
|
break;
|
|
break;
|
|
|
|
|
+#endif
|
|
|
case Texture::TT_2d_texture:
|
|
case Texture::TT_2d_texture:
|
|
|
case Texture::TT_cube_map:
|
|
case Texture::TT_cube_map:
|
|
|
case Texture::TT_1d_texture_array:
|
|
case Texture::TT_1d_texture_array:
|