ImTextureID question

Discuss the development of Lua addons for Ashita v3 here.
Posts: 3
Joined: Thu Jan 04, 2018 9:45 pm

ImTextureID question

Post by annuate » Fri Jun 21, 2019 4:03 pm


I've been trying to spice up my addon by adding some images to my UI and I'm having trouble to create an ImTextureId for the function Image in Lua. Any recommendations for doing this or are there any examples doing this?

Code: Select all

void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
User avatar
Site Admin
Posts: 458
Joined: Sat May 14, 2016 5:13 pm

Re: ImTextureID question

Post by atom0s » Sun Jun 23, 2019 11:11 am

Images use normal Direct3D8 textures in this case. You would need to create the texture using the d3d8 wrappers/funcs then pass the raw texture pointer as the 'ImTextureID' object/pointer.
Lead Ashita Developer

Want to donate to say thanks?