kuncarous
Topic Author
Posts: 8
Joined: 14 Nov 2018, 02:45

Texture formats

16 Nov 2018, 03:34

Hello,

Just found this amazing library, and I'm going to use it with my project, but there are a few questions I would like to do about textures, I was checking the SDK and it shows that only a few formats are supported, I would be using it for a cross-platform game, and I am going to use specific textures formats per platform, ETC2 for Android (if it does not support ASTC), ASTC for Android & iOS (supported devices), PVRTC for iOS (if it doesn ' t support ASTC), BCn for Windows, etc ... are those textures supported, or am I forced to use uncompressed images for Android & iOS, and BCn for windows?

The textures would be loaded by our own texture provider, so it won't be a problem to load the textures into GPU from our part, but would like to know if " virtual TextureFormat::Enum GetFormat() const = 0;" is really necessary, or can we just upload our textures to GPU and let Noesis use it without care about "GetFormat" function?

Thank you!
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture formats

16 Nov 2018, 14:18

Yes, all texture formats are supported. For example, in Unity we support all their formats, compressed and non-compressed.

If you implement your own RenderDevice (long-term we always recommend this) then you are in control of everything because you implement the Texture and RenderDevice classes yourself. In this case, implementing the function GetTextureFormat is necessary because we will create the glyph atlas through your device, and we need the format A8 for that. Note that the format enumeration only supports two formats right now.
struct TextureFormat
{
    enum Enum
    {
        RGBA8,
        R8,

        Count
    };
};
In case you use one of our RenderDevice implementations, then you don't need to care about formats. You just implement the texture provider, create the texture yourself and wrap it using the function WrapTexture:
D3D11Factory::WrapTexture(ID3D11Texture2D* texture, uint32_t width, uint32_t height, uint32_t levels, bool isInverted);
I hope this helps.
 
kuncarous
Topic Author
Posts: 8
Joined: 14 Nov 2018, 02:45

Re: Texture formats

16 Nov 2018, 20:35

That is all what I needed to know, really appreciate what you guys are doing with Noesis GUI, it does help a lot to Indie Developers(and for sure to companies too), I was seeking for a good GUI library and found it through reddit, really good job, thank you!
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Texture formats

18 Nov 2018, 19:35

Thanks! By the way, in 2.2 (beta right now) we removed the function GetFormat() from Texture.

Who is online

Users browsing this forum: Google [Bot] and 83 guests