Hello,
I have tried a lot, so if you could help me I would be glad.
So I want to add a logo from a png file to my menu
so I do
bool LoadTextureFromFile(const char* filename, PDIRECT3DTEXTURE9* out_texture, int* out_width, int* out_height)
{
PDIRECT3DTEXTURE9 texture;
LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;
HRESULT hr = D3DXCreateTextureFromFileA(g_pd3dDevice, filename, &texture);
if (hr != S_OK)
return false;
D3DSURFACE_DESC my_image_desc;
texture->GetLevelDesc(0, &my_image_desc);
*out_texture = texture;
*out_width = (int)my_image_desc.Width;
*out_height = (int)my_image_desc.Height;
return true;
}
int my_image_width = 270;
int my_image_height = 78;
PDIRECT3DTEXTURE9 my_texture = NULL;
bool ret = LoadTextureFromFile("../../logo.png", &my_texture, &my_image_width, &my_image_height);
IM_ASSERT(ret);
ImGui::Image((void*)my_texture, ImVec2(my_image_width, my_image_height));
and it's just white like this http://prntscr.com/ur9upt
Also tried the old indigo way and many other methods that I could find.
Thanks in advance.
2215
A month has passed and there is no response? This is a problem because of the new render