nside
Topic Author
Posts: 4
Joined: 01 Sep 2021, 04:08

TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

16 Sep 2021, 00:38

Hi

I'm trying to display an image loaded from a PNG file. Image spec from imagemagick:
Icon.png PNG 20x20 20x20+0+0 8-bit sRGB 212c 1798B 0.000u 0:00.000
I'm using the embedded texture loader in C++ on iOS:
    NoesisApp::EmbeddedTexture textures[] =
    {
        { "Icon.png", Icon_png }
    };
    
    auto tp =  new NoesisApp::EmbeddedTextureProvider(textures);
    
    // Setup theme
    NoesisApp::SetThemeProviders();
    Noesis::GUI::LoadApplicationResources("Theme/NoesisTheme.DarkBlue.xaml");
    Noesis::GUI::SetTextureProvider(tp);
At the time of rendering the image in a <Image src="Icon.png" /> XAML tag I get the following error:

TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE]

I loaded the texture with the bin2h tool.
I tried with the example texture from the NineSlice example and I'm getting the same error. Any pointers?

Tags:
 
User avatar
jsantos
Site Admin
Posts: 3257
Joined: 20 Jan 2012, 17:18
Contact:

Re: TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

16 Sep 2021, 14:51

We were thinking about deprecating GL on iOS, right now it is a path we are not testing as extensively as the rest of implementations. Have you considered switching to Metal? in fact, for Apple TV (recently added) we are only supporting Metal.

If this is critical for you, please create a ticket in the tracker.
 
nside
Topic Author
Posts: 4
Joined: 01 Sep 2021, 04:08

Re: TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

18 Sep 2021, 01:41

I'd rather have it work in my current environment. Can you think of a workaround? Different texture format? Different way to load the file?
 
User avatar
jsantos
Site Admin
Posts: 3257
Joined: 20 Jan 2012, 17:18
Contact:

Re: TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

20 Sep 2021, 16:42

This is probably related to TexStorage implementation on iOS. Could you try disabling it by commenting the following lines in GLRenderDevice.cpp:
    ////////////////
    // TexStorage //
    ////////////////
    if (IsSupported(Extension::ARB_texture_storage))
    {
        TexStorage2D_ = glTexStorage2D;
    }
    else if (IsSupported(Extension::EXT_texture_storage))
    {
      #if GL_EXT_texture_storage
        TexStorage2D_ = glTexStorage2DEXT;
      #else
        NS_ASSERT_UNREACHABLE;
      #endif
    }
 
nside
Topic Author
Posts: 4
Joined: 01 Sep 2021, 04:08

Re: TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

22 Sep 2021, 13:59

Sounds promising. I'm currently linking against the static library. Do you have a pointer on building the library?
 
User avatar
jsantos
Site Admin
Posts: 3257
Joined: 20 Jan 2012, 17:18
Contact:

Re: TexStorage2D_(target, levels, internalformat, width, height) [GL_INVALID_VALUE] error

23 Sep 2021, 12:42

There is a XCode solution available at $NoesisSDK/Build/NoesisGUI-ios.xcworkspace. GLRenderer is part of the App framework, with source code included.

Who is online

Users browsing this forum: No registered users and 2 guests