Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 23 Sep 2009
Offline Last Active Apr 25 2013 05:06 AM

Posts I've Made

In Topic: Odd ID3DXFont problem

21 February 2011 - 08:25 AM

Looks like that was the problem, forgot to update that while I was doing everything else, Doh.

Thanks for the reply.
Liam F

In Topic: How to include in *fx. file?

20 February 2011 - 04:44 PM

I've not read the book so can't be sure but my guess is that he wants you to pass the value returned from the GameTimer::GetTime() function into the .fx file as a variable.
So something like this,

.fx file
float	gTime;

// vertex shader stuff.
Output VertexShader(Input in)
	Output out;

	out = in.Position*gTime;

	return out;

So basically in the .fx file I've created a variable at the top called gTime. This value is then accessed somewhere inside the vertex shader ( in my basic example it is multiplied with the given position values).
You would need to set this new variable in your C++ code before drawing anything with the effect applied, something like this,

.cpp file
// Heres the important line!!!
Effect.SetBool("gTime", GameTimer.GetTime());

// Draw something awesome. Like a duck!

Unfortunatly I have no idea of the exact code to set variables in your example but your current code should be setting some variables for the effect file already. So if you can find that code and copy it for your new variable that should work out.
Look in your draw code within your .cpp file and it should be setting a View or ViewProjection for the effect somewhere before drawing it.

hope that all makes sense and that its what your actually looking for.

In Topic: Would it be difficut to read a textbook on DirectX 8 and then program using D...

20 February 2011 - 12:53 PM

It's definitely highly advisable to read DirectX 9 books/tutorials from the start. Alot of functions have changed from 8 to 9 which could make starting out even more confusing for a new comer.
As well as the introduction of the programmable graphics pipeline already mentioned, alot of DirectX 8 books refer to Direct Input and Direct Play which aren't really used anymore.

If you don't want to invest in a new book just yet there is plenty of online tutorials to start of on,

directXTutorials is fantastic although only the first few tutorials are free a premium membership is required for the later ones.
The other 2 are quite old sites and not updated anymore I believe but the tutorials still stand up and work great.

Good luck with it all, and have fun.

In Topic: Odd ID3DXFont problem

20 February 2011 - 12:40 PM

Oh I forgot to mention,
I just transfered this project from a Windows 7 laptop to a windows vista laptop which is when the issues arose. The text was always displaying fine on the other system.

Both systems have The latest Direct X SDK (June 2010) and both running the Visual C++ 2010 express edition IDE.

Thx again, Liam

In Topic: [DirectX] Bounding Box on a Frame Hierachy

28 October 2010 - 08:21 AM

I'm thinking now that a boundingBox for the entire model may not be worth it.

My plan was to use the overall bounding box as an initial check and then check with each individual bone if a collision was found, in order to save processing time.

But the initial Bounding Box will be calculated while the model is in bind pose, then when animating the model arms and legs will be moving in and out of the box all the time, so to keep it acurate the overall box would need to be recalculated each frame therefore negating the benefit of less time spent performing collision checks...

So I guess thats my problem solved.