glscene

 

Articles LoadingTexture

Page history last edited by skinhat 4 yrs ago

Loading a texture

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.

skinhat

Comments (0)

You don't have permission to comment on this page.