• Advertisement
Sign in to follow this  

how to draw text on 2d image

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

The code below does not draw text on 2d image (pTextureUp),Why does it not draw it? Thanks in advance for your help. ------------------------------------ private void render(void) { .... if (SUCCEEDED(pSprite->Begin(D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_TEXTURE ))) { //pSprite->Draw(pTexture,NULL,NULL, &D3DXVECTOR3( 0.0f, 0.0f, 0.0f),D3DCOLOR_RGBA(255,255,255,0)); pSprite->Draw(pTextureUp, NULL, NULL,&D3DXVECTOR3(0.0f,16.0f,0.0f),0xFFFFFFFF ); pSprite->Draw(pTextureBottom,NULL, NULL,&D3DXVECTOR3(0.0f,285.0f,0.0f),0xFFFFFFFF ); RECT rcSprite={4,0,0,0}; pFont->DrawText(pSprite,(LPCSTR)"Deneme 1 2 ....",-1,&rcSprite,DT_NOCLIP,D3DXCOLOR(1.0,1.0,1.0,1.0)); pSprite->End(); } ... }

Share this post


Link to post
Share on other sites
Advertisement
Does your pFont->DrawText() function work? i.e when it's not drawing over a 2D image?

Also some more code into the class members called could be useful.

Share this post


Link to post
Share on other sites
Indeed,i draw two image on top and bottom of screen,and i want to write my text on these images.But It does not,if I try to write on nonimage area(viewport),It works.But It does not work on the top and bottom (image area) of the screen.

Problem is this.If you have any idea,please do not hesitate to tell me.. thanks

Share this post


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

  • Advertisement