i managed to hook directx in a game and now i wanted to draw a text in 3d space.
hdc=CreateCompatibleDC(NULL); font=CreateFont(1000,0,0,0,FW_NORMAL,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP _DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,"Arial"); SelectObject(hdc, font); D3DXCreateText(this->m_pIDirect3DDevice9,hdc,"Hello World",0.001f,0.4f,&mesh,NULL,NULL);Beforce EndScene:
m_pIDirect3DDevice9->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); D3DXMATRIX world_matrix; //Pre-initialized D3DXMatrixIdentity(&world_matrix); D3DXMatrixTranslation(&world_matrix,-67762,3567,8384); m_pIDirect3DDevice9->SetTransform(D3DTS_WORLD,&world_matrix); mesh->DrawSubset(0);
The rendering appears like this:
As you can see, the text is nor in 3d, nor transformed and also it seems like a "mask" of the scene.
What can be the problem? Why 3d is not working,, nad the 3d text has this effect?