AddTerrainLayer - Need a variable for texture file name

Everything related to 3D programming
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

AddTerrainLayer - Need a variable for texture file name

Post by Lexicon »

Hi guys! :D
I have a question...

Now I see: AddTerrainTexture(0, 0, 70, "grass_tile1.dds", "grass_tile2.dds")
I need: AddTerrainTexture(0, 0, 70, TextureID(1), TextureID(2))

Is that possible?
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: AddTerrainLayer - Need a variable for texture file name

Post by Comtois »

Lexicon wrote:Hi guys! :D
I have a question...

Now I see: AddTerrainTexture(0, 0, 70, "grass_tile1.dds", "grass_tile2.dds")
I need: AddTerrainTexture(0, 0, 70, TextureID(1), TextureID(2))

Is that possible?
No, but you can do this

Code: Select all

Dim MyTextureID.s(2)
MyTextureID(1) = "grass_tile1.dds"
MyTextureID(2) = "grass_tile2.dds"
AddTerrainTexture(0, 0, 70, MyTextureID(1), MyTextureID(2))
Please correct my english
http://purebasic.developpez.com/
User avatar
Lexicon
User
User
Posts: 98
Joined: Mon Jul 22, 2013 6:16 am
Contact:

Re: AddTerrainLayer - Need a variable for texture file name

Post by Lexicon »

Thanks! You're really guru!

May be you know...
I have an entity (pseudoterrain) 5x5 vertexes and 5 associated textures. How may I do this:

0x2 vert - texture 3
0x3 vert - texture 3
1x1 vert - texture 0
1x2 vert - texture 2
1x3 vert - texture 3
2x2 vert - texture 2
3x3 vert - texture 1
3x4 vert - texture 1
etc.

Code: Select all

0-0-3-3-0
0-0-2-3-0
0-0-2-0-0
0-0-0-1-1
0-4-3-4-0
Thanks for your answer.
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: AddTerrainLayer - Need a variable for texture file name

Post by Bananenfreak »

Open a new thread please, this has nothing to do with your first question.
Image
Post Reply