Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

D3D Font Fun

Sign in to follow this  
Evil Steve


Woah, it's been a while since I made a Journal entry. I haven't really been doing a lot, I got a temp job, doing contract work for Mastercare, installing fancy new tills (cash registers etc) for the Dixon's group. I also played around with my particle system editor a bit, and added some more stuff to it. I can display and sort 32k particles per frame at ~40FPS on my system (AMD 2600XP, GeForce 4 Ti 4400), which is reasonable, but I'm going to attempt to play with vertex shaders. That should allow me to speed things up considerably, although I don't know what to do about the particle sorting (which only needs to be done some of the time anyway).
Have a screenie:
It looks a lot nicer in motion, but I can't persuade Fraps to work with my app. Anyone know what you need to do to get Fraps working? I have my window as WS_POPUP, and D3D in fullscreen mode...
UPDATE: Ok, I got Fraps working (It doesn't like the debug D3D runtimes). You can download a short video from Here (2.99Mb)

I've decided on my next project; a D3D RichEdit replacement. I'm fed up with users complaining about my MUD client because the RichEdit sucks. It behaves totally differently between Win2k/XP and Win9x/ME, it's hard to extend, and I already subclass the hell out of it just to coerce it into doing what I want.
Also, some of you may remember (I think I made a journal entry about it) that I was wanting to get Winamp visualizations playing in the background of my DruinkEdit (subclassed RichEdit). It didn't work because I had to render my visualization to a device context, and then blit that DC to the DruinkEdit. However to do that, the DC I was rendering onto needed to be on the screen. That meant you had to have this ugly window the same size as the DruinkEdit, and it had to be onscreen and visible. If I can get direct access to the background of the control, I can hopefully render straight into it.
Another cool feature is that I'll allow the user to add callbacks to the new control, to let you change the state of the D3D device before, after, and during the font rendering. For instance, you could draw some funky particle system in the background using the "before" callback, you could set the transform matrices to make the text appear like the Star Wars intro using the "during" callback, and you could do some sort of image warping using the "after" callback.

Anyway, I'm going to try and get started tonight or tomorrow, once I have my basic plan down.
Sign in to follow this  


Recommended Comments

Regarding the particle sorting: you can keep your vertex buffer static, and only sort/update your particle's index buffer. Updating an index buffer is much more efficient due to the lowered bandwidth (indices are typically 2 or 4 bytes each).


Share this comment

Link to comment
Ysaneya: Ahh, that's a good idea. I'll give that a whirl, thanks [emile]

Rob: Already done [wink] Actually, in that example each particle has a random speed between (-10,-10,-10) and (10,10,10). And there's a gravity of -20. Which is a bit redundant, but it works.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!