dhartles
11-29-2004, 09:51 PM
OK, in trying to build a tiling system, I cameto the realization that it appears to be easier to uses sprites for each tile in the map versus a texture on a vertex buffer. However the sprite sample from both Tom Miller's book, and another code sample of his on another web site do not work, so I'm stuck and need help.
The problem is in the sprite.Draw method (where sprite is a variable of type DirectX.Direct3D.Sprite)
The Draw function Tom uses is passing 5 parameters (texture, rectangle, vector3, vector3, and color)
However, this will not compile using MDX version 9.00.0900, as the exception states that the Draw method does not accept this number of parameters, it's now looking for 7! (texture, rectangle, vector2, vector2, single, vector2, color). All of his sample code is geared around the creation of the two vector3 parameters that are passed into the draw function, and I don't yet know how to change that to using 3 vector2's and a single.
Has anybody else run into this yet?? Or does anybody have a section of code working (using MDX9 in either VB or C#) to render a sprite??
TIA,
Dave
The problem is in the sprite.Draw method (where sprite is a variable of type DirectX.Direct3D.Sprite)
The Draw function Tom uses is passing 5 parameters (texture, rectangle, vector3, vector3, and color)
However, this will not compile using MDX version 9.00.0900, as the exception states that the Draw method does not accept this number of parameters, it's now looking for 7! (texture, rectangle, vector2, vector2, single, vector2, color). All of his sample code is geared around the creation of the two vector3 parameters that are passed into the draw function, and I don't yet know how to change that to using 3 vector2's and a single.
Has anybody else run into this yet?? Or does anybody have a section of code working (using MDX9 in either VB or C#) to render a sprite??
TIA,
Dave