Sprite.Draw2D()

Started by
13 comments, last by Anri 19 years, 4 months ago
Something like this ought to work.

//initstruct GameThing {  Texture t;  Vector2 p;  float r;}GameThing[] things = ...Sprite s = new Sprite();//renders.Begin();foreach(GameThing g in things){   s.Transform = Matrix.AffineTransformation2D(     1.0, new Vector2(0,0),g.r,g.p);   s.Draw2d(g.t,new Vector2(0,0),0,new Vector2(0,0),someColor);}s.End();
Advertisement
Quote:Original post by turnpast
Something like this ought to work.

*** Source Snippet Removed ***


That didn't work for me, but you got me on the trail.
I have to use the Sprite.Draw() method instead. So I have: sprite.Draw(texture, Vector3.Empty, Vector3.Empty, Color.White.ToArgb()) instead.
Thanks for the help. You really helped me out ;)
Re: Lillemanden.

Well, it works in the C++ SDK. Its rotating right in front of me right now...

I thought C# was supposed to be "even easier than C++!"? Just goes to show!

Languages; C, Java. Platforms: Android, Oculus Go, ZX Spectrum, Megadrive.

Website: Mega-Gen Garage

Quote:Original post by Anri
Re: Lillemanden.

Well, it works in the C++ SDK. Its rotating right in front of me right now...

I thought C# was supposed to be "even easier than C++!"? Just goes to show!

Yeah, well I'm not using C#, I'm using Microsoft C# ;).
But seriusly, it's proberly a bug in the Managed DirectX SDK.
Nothing surprises me these days...but I'm confidant they will sort it in the next SDK update. ^_^

Languages; C, Java. Platforms: Android, Oculus Go, ZX Spectrum, Megadrive.

Website: Mega-Gen Garage

This topic is closed to new replies.

Advertisement