Articles - Loading a texture in code
A texture is loaded into a material through its texture property. The
TGLTexture class has an image property that has a loadfromfile property. At runtime a texture from the material library can be loaded as follows:
Material:=GLMaterialLibrary1.materials.getlibmaterialbyname('Texture1');
Material.material.texture.image.loadfromfile('texture.jpg')
Set the TGLTexture.disabled flag to false.
To assign a texture to a GLScene object refer to the how to assign a texture article.
by skinhat