I am trying to show some images on the canvas using script found in some of outerra default models. It works to show the airspeed.dds image. I tried to edit this file in gimp or subtsitute it with another one made by me in gimp (.dds DXT1 format generate mipmaps) and add also the corresponding .tga as I have seen there is also a airspeed.tga in the Anteworld/ui folder but neither works. Nothing shows up. I only can get to show up the airspeed.dds or the set of images basic.dds with all of the images of the set showing together. How to create and show my own images on the canvas ?
var display_canvas,$sketch;
function init_vehicle()
{
...
$sketch = this.sketch = this.$query_interface("ot::js::sketch.get");
}
function update_frame(dt, engine, brake, steering)
{
this.img = $sketch.load_image("ui/airspeed.dds");
$sketch.make_canvas_active(display_canvas);
var screen_size = world.screen_size();
$sketch.set_canvas_2d_offset({ x: screen_size.x*0, y: 0 });
$sketch.clear_canvas();
$sketch.draw_image(this.img, {x:300,y:300}, 0xffffffff);
}