Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DX.DrawText

Started by still_not_forgiven Feb 3, 2004 at 2:51 PM 2 replies 1.2k views
Original Post
still_not_forgiven
still_not_forgiven
I got a minor problem.. When i draw text with this command
fnt.Name = "Arial"
fnt.Size = 18
fnt.Bold = True
Set MainFontDesc = fnt
Set MainFont = D3DX.CreateFont(D3DDevice, MainFontDesc.hFont)

TextRect.Top = 0
TextRect.Left = 1
TextRect.bottom = 480
TextRect.Right = 640

D3DX.DrawText MainFont, &HFFCCCCFF, "Current Frame Rate: " & FPS_Current, TextRect, DT_TOP Or DT_CENTER
The text appears but when i try to change the color of the text the text will not appear.. How can i get this to work with other color?
RenderTarget
RenderTarget
Make sure your new color is no-alpha. Basically, only change some parts of the color:


&HFFFFFFFF = black
&HFF000000 = white
&HFFFF0000 = red
^^these must be set to FF



I like pie.


[edited by - rendertarget on February 3, 2004 7:28:52 PM]
[sub]My spoon is too big.[/sub]
still_not_forgiven
still_not_forgiven
Now if i want to use a RBG(r, g, b) for this how do i fix the problem or is this not possible?

still_not_forgiven
still_not_forgiven
Wel i fixed by using the function that comes with dx
D3DColorXRGB
It fixed it..

Well thx for teh advice ok

Topic Locked

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

Sign in to reply to this topic.