Skip to main content
gamedev.net
🔒 Locked

texture problem

Started by jad_salloum 6 replies 550+ views
Original Post
jad_salloum
jad_salloum
can anyone tell me how to write a text on a texture so that they become as one surface together . please paste some code
dave
dave
Hi,

The problem firstly is that you will need to expand on your post quite a bit before people are willing to help. People won't know what you mean.

That aside, i shall ask.

Can you expand please then i can help. Do you simply mean how to write text to a DirectX window?

ace
jad_salloum
jad_salloum
hi acelover , no i don't mean writting text on a window , i will explain in details ::

i have an X file that has a texture covering it , so i want to write some text on its texture not on the window, so if the X file is for putting a name on it , the name should stick on the texture even if the x file is animated and make movements . i think that i need something called ((render text to texture)) but i don't know how to do it thanks for ur help
UriKiller
UriKiller
He probably wants the text to be 3D, as if it were part of the texture covering the 3d model.
dyerseve
dyerseve
Render to texture?

Look into IDirect3DDevice9.SetRenderTarget
jad_salloum
jad_salloum
paste some code plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
deffer
deffer
Quote:
Original post by jad_salloum
paste some code plzzzzzzzzzzzzzzzzzz[...]zzzz

g_pDevice->SetRenderTarget(pTexture->GetSurfaceLevel(0));



EDIT:
Ok, sorry for flaming.
The full version could be:
ID3DXSurface *pSurf = pTexture->GetSurfaceLevel(0);ID3DXSurface *pPrevRenderTarget = g_pDevice->GetRenderTarget(0);g_pDevice->SetRenderTarget(0, pSurf);// Render as if you were rendering to the screen.// ...g_pDevice->SetRenderTarget(0, pPrevRenderTarget);pPrevRenderTarget->Release();pSurf->Release();

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.