sim.writeTexture crashes my v-rep

Typically: "How do I... ", "How can I... " questions
Post Reply
watxon
Posts: 2
Joined: 25 Feb 2018, 22:22

sim.writeTexture crashes my v-rep

Post by watxon »

This is what am running with the intention of changing a circular portion of the texture to black
result=sim.writeTexture(textureId,4,"000000000000000000000000",0.2,0.2,0.1,0.1, 0)

Thanks

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: sim.writeTexture crashes my v-rep

Post by coppelia »

Hello,

arguments 4-7 represent values in pixels. Basically this is equal to 0,0,0,0, which means the full texture. But you also need to make sure that you provide a buffer large enough for that dimension. e.g. if your texture has dimension 4x4, then your buffer needs to be at least 4x4x3 in size (x-size * y-size * rgb).

Cheers

Post Reply