Osiris: Image turns white in menu

Created on 30 Oct 2020  路  2Comments  路  Source: danielkrupinski/Osiris

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.

duplicate

All 2 comments

2215

2215

A month has passed and there is no response? This is a problem because of the new render

Was this page helpful?
0 / 5 - 0 ratings

Related issues

h4x0reL picture h4x0reL  路  4Comments

kschou95 picture kschou95  路  3Comments

TauCSGO picture TauCSGO  路  3Comments

deprale picture deprale  路  3Comments

nosexynomoney picture nosexynomoney  路  3Comments