Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 D3DXText
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 16 2004 :  3:51:35 PM  Show Profile  Reply with Quote
Quick Question (I hope) - Is there another way to output text to the screen in DirectX? Usind D3DX, It lowered my framerate from ~600 FPS to almost 200 FPS! I think that's really weird, because each of the 32X32 sprites I'm Rendering only take away 5 to 10 FPS. Can anyone help me?

VBBR
Moderator

Brazil
617 Posts

Posted - May 16 2004 :  3:53:08 PM  Show Profile  Reply with Quote
Use custom text with bitmap fonts?


Whatever. Who knows...
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 16 2004 :  3:55:05 PM  Show Profile  Reply with Quote
Maybe... I could give it a try

PS - Wow, that was fast!
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - May 16 2004 :  4:48:11 PM  Show Profile  Reply with Quote
2 minutes from each post to the following... wow.
Really a coincidence, I was just hoping around here and your topic showed

Whatever. Who knows...
Go to Top of Page

EACam
Warrior

154 Posts

Posted - May 16 2004 :  8:58:01 PM  Show Profile  Reply with Quote
Umm...if you're getting that kind of frame rate, you're definately not using VSYNC. and when you don't have VSYNC on, little things like that drastically decrease the fps. It's not bad. it's just making it closer to what it would be without VSYNC
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 16 2004 :  9:01:42 PM  Show Profile  Reply with Quote
I know... I intentionally shut off VSYNC when I test. It shows me how fast it really runs. I guess that makes some sense though...

Edited by - Sr. Guapo on May 16 2004 9:02:21 PM
Go to Top of Page

masterbooda
Swordmaster

277 Posts

Posted - May 17 2004 :  12:47:42 AM  Show Profile  Visit masterbooda's Homepage  Reply with Quote
I had that same problem with my engine....
Are you creating the font on every render call or just once at the begining of the program?
Also If I make the rect to output the text, just a little bigger than the text, It was a difference of that magnitude.... kind of wierd but true...
But to be totally honest with you make a custom font using a .bmp or .dds file, just like vbbr said... it is alot quicker...
DaBooda out...


DaBooda Team is back: http://dabooda.789mb.com/
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 17 2004 :  11:28:08 AM  Show Profile  Reply with Quote
I only create the font once, but I could check the second part (about the rect size)... Thanks
Go to Top of Page

EACam
Warrior

154 Posts

Posted - May 17 2004 :  7:39:16 PM  Show Profile  Reply with Quote
Custom rendering is faster? Really?
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 17 2004 :  8:54:46 PM  Show Profile  Reply with Quote
I don't know. I just don't feel like investing the time to create my own font though. My life is so busy (Halo)...
Go to Top of Page

masterbooda
Swordmaster

277 Posts

Posted - May 17 2004 :  10:27:58 PM  Show Profile  Visit masterbooda's Homepage  Reply with Quote
Cunstom rendering is faster because you could just blt every character onto a texture, unless you are updating your text every render pass, then I would suggest text... But I always consider text like the score, or energy to be just a collection of sprites... Yes the speed is sacrificed, but with a custom font, you can work with it a little better, because you know the height and width of every character... but basically it boils down to preference...

But to not get off point here, yes changing the rect did make a big difference... even by subtracting 1 from width I would salvage 100 frames... I would like to know what causes this... any expert help on this subject would be appreciative...

DaBooda Team is back: http://dabooda.789mb.com/
Go to Top of Page

Almar
Moderator

Netherlands
192 Posts

Posted - May 18 2004 :  12:49:23 AM  Show Profile  Visit Almar's Homepage  Send Almar an ICQ Message  Reply with Quote
In YALg I prepare an array for every character, with the index as keycode I believe.

so font(65) is probably A (or a?) and giving me the right tu/tv coords.

Then a trianglist of 6 verts is created, and appended to the "font string" (which is just for every time I call my Createfontverts)

then all next frames I can simply render the vertex list I have. Remember 50 chars * 6 is already 300 verts. Recreating those every frame is just plain silly. (I also use the "overdim" method often demonstrated by Rag on a Stick on lucky's)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.