Gorilla.Context.Texturing.OpenGL
Unit Gorilla.Context.Texturing.OpenGL.pasClasses
- TOpenGLPixelFormatExHelper = class ( TPixelFormatExHelper )
- TOpenGLGorillaTextureWrapHelper = class ( TGorillaTextureWrapHelper )
- TOpenGLGorillaTextureDataTypeHelper = class ( TGorillaTextureDataTypeHelper )
- TOpenGLGorillaTexture = class ( TGorillaTexture )
- TOpenGLGorillaTextureBitmap = class ( TGorillaTextureBitmap )
TOpenGLGorillaTextureWrapHelper
GL_TEXTURE_2D GL_TEXTURE_3D GL_TEXTURE_CUBE_MAP
CubeMapPositiveX, CubeMapNegativeX, CubeMapPositiveY, CubeMapNegativeY, CubeMapPositiveZ, CubeMapNegativeZAncestors
Members
TOpenGLGorillaTexture
Extends the internal FMX texture class with more configuration opportunities to initialize a texture.
Remarks
The parent bitmap should be a TGorillaTextureBitmap instance, otherwise default values will be used for extended fields like WrapS, WrapT, ...Ancestors
Members
Methods
- public procedure GetBindingAndKind
(
out
ABinding :
Cardinal; out
AKind :
Cardinal
)
;
override;
Returns the graphics api value (f.e. OpenGL) for texture binding type (GL_TEXTURE_BINDING_2D, GL_TEXTURE_BINDING_3D, GL_TEXTURE_BINDING_CUBE_MAP) and texture kind (GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP)
- public procedure Clear
(
)
;
override;
Clear a texture directly in GPU.
- public procedure GenerateMipMap
(
)
;
override;
Direct instruction to generate mip maps
- public function RequestTextureData
(
var
ABytes :
TBytes; var
ASize :
Int64; const
ALevel :
Integer
=
$0
)
: Boolean
;
override;
Allows to request texture image data from GPU.
TOpenGLGorillaTextureBitmap
Overrides the FMX texture bitmap component to allow more opportunities to configure texture (format, min-, magfilter, wrapping, datatype, ...) The basic problem with the FMX implementation is, that it uses fixed values for textures. This is not usable for usage in render passes, where a specific type of texture is expected, f.e. for shadow mapping.
Remarks
Because in render passes we create a TTextureBitmap / TGorillaTextureBitmap we need to store texture settings here, to apply them to the automatically created texture instance.Ancestors
Members
Methods
- public procedure UpdateCubeMapFace
(
const
ASide :
TGorillaCubeMapFace; ATexture :
TTexture; const
ABits :
Pointer; const
APitch :
Integer
)
;
overload override;
Call this method to upload image data for a specific face of a cube map texture.
- public procedure UpdateBuffer
(
ABuffer :
Pointer; ASize :
Int64
)
;
override;
Upload complete image data for textures instead of cube map textures.
- public procedure Update3DSlice ( ASlice : Integer; ABuffer : Pointer; ASize : Int64 ) ; override;