Jump to content
  • Advertisement
Sign in to follow this  
Zuka

How could I render text to an offscreen surface?

This topic is 3496 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

I'm using D3DXFont for this, and no, I don't want to use bitmap fonts. How can I make it render to a LPDIRECT3DSURFACE9 I have? Possibly a texture, instead of a surface...? I don't know what to do.

Share this post


Link to post
Share on other sites
Advertisement
To put some more detail into what AshleysBrain said, create a texture with the D3DUSAGE_RENDERTARGET usage flag, get its surface using GetSurfaceLevel, then you can use SetRenderTarget to set it as the render target, and whatever you render will be drawn into it. (And note that you either have to disable Z buffering or have a Z buffer of suitable size for your render target.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!