Copying from surface to texture in dx8
Hi!
How do i copy from a source surface to a texture?
Im making a textprinting class. My idea is to copy fonts from a fontmap surface to textured quads so i can display text.
Do you have any other sugestions?
Iv seen a method where you loads a fonttexture and tile the corect font on quads by adjusting u,v coordinates properly. But i dont like that method cause it can be limited by the texture size...
I found this baby:
Seem a litle strange but if it works it works for me too......
Do you have any other sugestions?
[edited by - russian-bear on April 17, 2002 3:32:30 PM]
LPDIRECT3DSURFACE8 targSurf;pTexture->GetSurfaceLevel(0,&targSurf);D3DXLoadSurfaceFromSurface(targSurf,NULL,NULL,tempSurf,NULL,&srcRect,D3DX_FILTER_NONE,0);targSurf->Release();
Seem a litle strange but if it works it works for me too......
Do you have any other sugestions?
[edited by - russian-bear on April 17, 2002 3:32:30 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement