Texture formats
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!
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!
Re: Texture formats
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.
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:
I hope this helps.
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.
Code: Select all
struct TextureFormat
{
enum Enum
{
RGBA8,
R8,
Count
};
};
Code: Select all
D3D11Factory::WrapTexture(ID3D11Texture2D* texture, uint32_t width, uint32_t height, uint32_t levels, bool isInverted);
Re: Texture formats
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!
Re: Texture formats
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