- Joined
- Jun 6, 2012
- Messages
- 288
- Reaction score
- 67
- Points
- 28
- Location
- Sydney, Australia, Earth, Sol
- Website
- www.orbithangar.com
Hi All,
I'm experimenting with a vessel class which updtaes some of its textures in realtime.
I have this in clbkPreStep:
This will work to update the texture based on my parameter "light", but only on simulation load. Does anyone know a way to force oapiSetTexture to update in realtime? Or is this just not possible?
Thanks!
I'm experimenting with a vessel class which updtaes some of its textures in realtime.
I have this in clbkPreStep:
C++:
SURFHANDLE surf[2];
surf[0] = oapiLoadTexture ("texture_1.dds", false);
surf[1] = oapiLoadTexture ("texture_2.dds", false);
if (light == ON) {
oapiSetTexture (mh_main, 1, surf[0]);
}
else {
oapiSetTexture (mh_main, 1, surf[1]);
}
This will work to update the texture based on my parameter "light", but only on simulation load. Does anyone know a way to force oapiSetTexture to update in realtime? Or is this just not possible?
Thanks!