Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

russian-bear

Copying from surface to texture in dx8

This topic is 5936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
I found this baby:


    
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!