Painting Landscape programmatically using C++

About the generated texture, i’m planing to use custom existing assets(textures), i just need to paint the landscape with that textures using C++.