Sign in to follow this  

Viewing framerate directx

This topic is 3096 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 dont understand what the string pointer, is to be, to display my framerate. Using ID3DXFONT::DrawText Looking around, i think it has something to do with the createDevice D3DPRESENT_PARAMETERS, but i'm not sure what. Thanks.
#include <string>

static RECT myRect; SetRect(&myRect, 0, 0, 640, 480); 

//Pointer is just psuedo for what is ment to be there..
int stringLength = pointer.length();

int DrawText(NULL,
  &pointer,
  stringLength,
  &myRect,
  DT_LEFT,
  D3DCOLOR_RGBA(255,255,255,255));

Share this post


Link to post
Share on other sites
It returns a null terminated C string. Essentially it just returns a pointer to the buffer the string encapsulates. Depending on the length of the string, this either resides within the string object itself, or is allocated later on.

Share this post


Link to post
Share on other sites

This topic is 3096 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.

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

Sign in to follow this