GDK's texture download code assumes that the format corresponds to the storage
parameters of the GL texture in an obvious way. For example, a format of
gdk.types.MemoryFormat.R16g16b16a16Premultiplied is expected to be stored as GL_RGBA16
texture, and gdk.types.MemoryFormat.G8a8 is expected to be stored as GL_RG8 texture.
Setting the right format is particularly useful when using high bit depth textures
to preserve the bit depth, to set the correct value for unpremultiplied textures
and to make sure opaque textures are treated as such.
Non-RGBA textures need to have swizzling parameters set up properly to be usable
in GSK's shaders.
Sets the format of the texture. The default is gdk.types.MemoryFormat.R8g8b8a8Premultiplied.
The format is the preferred format the texture data should be downloaded to. The format must be supported by the GL version of gdk.gltexture_builder.GLTextureBuilder.GLContext.
GDK's texture download code assumes that the format corresponds to the storage parameters of the GL texture in an obvious way. For example, a format of gdk.types.MemoryFormat.R16g16b16a16Premultiplied is expected to be stored as GL_RGBA16 texture, and gdk.types.MemoryFormat.G8a8 is expected to be stored as GL_RG8 texture.
Setting the right format is particularly useful when using high bit depth textures to preserve the bit depth, to set the correct value for unpremultiplied textures and to make sure opaque textures are treated as such.
Non-RGBA textures need to have swizzling parameters set up properly to be usable in GSK's shaders.