More often than not, rather than coloring a terrain, you’ll probably want to apply a texture to it. You can apply a texture to a terrain just as you would any other entity. Before you continue, open the file called demo09-03.bb and make sure that the file grass1.jpg is in the same folder as the program. Add the following code to apply a grass texture to our terrain.
; Create the terrain ground=CreateTerrain(512) texture=LoadTexture ( "grass1.jpg" ) EntityTexture ground, texture
Go ahead and run the program now and you’ll see that your terrain now has the grass texture applied to it (see Figure 9.5).
3.144.19.224