Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
textures [2020/01/12 20:58] – created admin | textures [2020/01/12 21:25] – [Min-/Mag Filter] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Textures ====== | ====== Textures ====== | ||
+ | |||
+ | Gorilla3D extends FMX texture support of TTextureBitmap. With default FMX behaviour you're only allowed to create a RGBA texture. | ||
+ | |||
+ | ===== Texture-Kinds ===== | ||
+ | |||
+ | With v0.8.2+ more texture types than 2D textures are supported. | ||
+ | |||
+ | ^Format^Description^ | ||
+ | |TGorillaTextureKind.Texture2D|Default texture kind creating a two dimensional image.| | ||
+ | |TGorillaTextureKind.Texture3D|Creating a three dimensional texture.| | ||
+ | |TGorillaTextureKind.CubeMap|Creating a texture with 6 sides of 2D Images.| | ||
+ | ===== Supported Formats ===== | ||
+ | |||
+ | A texture format is described by a components internal format and a general format. While the components define the exact datatypes of byte data, the general format is more a simple setup information. | ||
+ | |||
+ | ==== Components / InternalFormat ==== | ||
+ | ^Format^Description^ | ||
+ | |TPixelFormatEx.RGBA|| | ||
+ | |TPixelFormatEx.RGBA16F|| | ||
+ | |TPixelFormatEx.RGBA32F|| | ||
+ | |TPixelFormatEx.RGB|| | ||
+ | |TPixelFormatEx.RGB16F|| | ||
+ | |TPixelFormatEx.RGB32F|| | ||
+ | |TPixelFormatEx.RG|| | ||
+ | |TPixelFormatEx.RG16F|| | ||
+ | |TPixelFormatEx.RG32F|| | ||
+ | |TPixelFormatEx.R|| | ||
+ | |TPixelFormatEx.R16F|| | ||
+ | |TPixelFormatEx.R32F|| | ||
+ | |TPixelFormatEx.Depth|| | ||
+ | |TPixelFormatEx.Depth16|| | ||
+ | |TPixelFormatEx.Depth24|| | ||
+ | |TPixelFormatEx.Depth32|| | ||
+ | |...|| | ||
+ | |||
+ | ==== Format ==== | ||
+ | ^^^ | ||
+ | |TPixelFormatEx.RGBA|| | ||
+ | |TPixelFormatEx.RGB|| | ||
+ | |TPixelFormatEx.RG|| | ||
+ | |TPixelFormatEx.R|| | ||
+ | |TPixelFormatEx.Depth|| | ||
+ | |...|| | ||
+ | ===== Min-/Mag Filter ===== | ||
+ | |||
+ | ^Filter^Description^ | ||
+ | |TTextureFilter.Linear|| | ||
+ | |TTextureFilter.Nearest|| | ||
+ | ===== Wrapping ===== | ||
+ | |||
<file pascal> | <file pascal> | ||
LTexture := TGorillaTextureBitmap.Create(1024, | LTexture := TGorillaTextureBitmap.Create(1024, | ||
- | | + | LTexture.BeginSetup(); |
- | try | + | try |
- | with FFBOTexture | + | with LTexture |
- | begin | + | begin |
Components := TPixelFormatEx.RGB32F; | Components := TPixelFormatEx.RGB32F; | ||
Format := TPixelFormatEx.RGB; | Format := TPixelFormatEx.RGB; | ||
Line 13: | Line 63: | ||
WrapS := TGorillaTextureWrap.ClampToBorder; | WrapS := TGorillaTextureWrap.ClampToBorder; | ||
WrapT := TGorillaTextureWrap.ClampToBorder; | WrapT := TGorillaTextureWrap.ClampToBorder; | ||
- | end; | ||
- | finally | ||
- | LTexture.EndSetup(); | ||
end; | end; | ||
+ | finally | ||
+ | LTexture.EndSetup(); | ||
+ | end; | ||
</ | </ |