What the heck has happened to utility.timer and directxtimer?

I've been working through an introductory Managed DirectX book and there is some code that refers to a thing called "utility.timer" and a call to "DirectXTimer.GetElapsedTime". Neither of these things compile for me in VS.NET 2003 with DirectX 9. I can't seem to find anything at all on the utility function, and damn little on DirectXTimer. Obviously these things have become defunct, but what has taken their place Where should I be looking

Answer this question

What the heck has happened to utility.timer and directxtimer?

  • MasonUSA

    Someone converted the common directory from the April SDK, its not identical to Tom's book but fairly close so it might help you.

    http://www.thezbuffer.com/articles/187.aspx

    But I don't know of a VB conversion for the book code.

     

     

     



  • srinivas_234

     

    The book is more then likely using the timer that is inside the Common framework. You will need to add a file from the Common directory in the SDK Samples. The file that is needed is dxmutmisc.cs make sure that you add the namespace to the top of your code.

    Also what book are you referring to this might help us look further into the problem.



  • davisp2

    The Managed DirectX libaries have undergone a number of changes across recent releases - from what I've read, several of them are breaking changes. This can make it pretty difficult to learn from a book as you've found out

    As an idea... whilst you work your way through the book it might be worth setting up your development environment to be the same as that used by Tom Miller throughout the book. Even if that is out-of-date now. That way you should be able to finish the book without having to worry about upgrading/migrating it to a newer platform.

    hth
    Jack


  • Tom Arnold

    Tom doesn't use the actual DX framework in the book, but he builds something *very* similar in the Framework directory that should be in your code install from the book. This has the missing timer classes in it. These 'support' files are in C# so you will either have to convert them or possibly compile them into a DLL using c# and then reference them from VB.Net

    The book only needs one slight modification to those framework files to run with the current SDKs - the fixed file is here - http://www.thezbuffer.com/articles/271.aspx

     

     

     



  • Eddie Hulme

    I'm working from the same book, and I'm trying to convert the Common framework files to VB.
    I ran them through a C# to VB converter and then tried fixing the errors, but I got bogged down.
    Does anyone know if they have been converted before

    I had not thought of compiling to DLL though..


  • blackspider

    Thanks.

    The book is Tom Miller's "Managed DirectX: Graphics and Game Programming". The example is on page 89 (I didn't have the book in front of me before, hence the lack of detail). I'm actually following his examples in VB.NET rather than C#. I don't think he makes any mention of the dxmutmisc.cs file, and I guess I'm uncertain as to how this relates to VB. Can I add a reference to a .cs file I assume I'd have to compile it into a dll first.

    Also, looking at the October SDK (haven't had a chance to install the latest yet), I can't see any timer function in the utility Class in the samples.

    Still scratching my head, but I have a better idea where to look now. And those samples look most interesting indeed! Do they build on each other in each release of the SDK or do you have to trawl back through each release to find unique elements

  • What the heck has happened to utility.timer and directxtimer?