Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline CARUFO  
#1 Posted : Tuesday, November 8, 2011 8:27:19 PM(UTC)
CARUFO

Joined: 8/21/2011(UTC)
Posts: 37

Was thanked: 1 time(s) in 1 post(s)
In XNA I can reflect a Sprite with the "SpriteEffects".
And in the DE?

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Tuesday, November 8, 2011 9:03:19 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Originally Posted by: CARUFO Go to Quoted Post
In XNA I can reflect a Sprite with the "SpriteEffects".
And in the DE?


What does "reflect a sprite" mean? Do you mean flipping it? You can rotate it or pass custom points to it rotating or flipping it. There is also a switch in MaterialManager for flipping materials (needed for render to texture).
Offline CARUFO  
#3 Posted : Tuesday, November 8, 2011 9:18:48 PM(UTC)
CARUFO

Joined: 8/21/2011(UTC)
Posts: 37

Was thanked: 1 time(s) in 1 post(s)
Yes, flipping I mean.
Quote:
There is also a switch in MaterialManager for flipping materials (needed for render to texture).

I don't understand.
Offline Benjamin  
#4 Posted : Tuesday, November 8, 2011 9:48:34 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
I don't have a sample at hand, but we will add something for the next release to explain what options are available.
Offline CARUFO  
#5 Posted : Tuesday, November 8, 2011 10:04:49 PM(UTC)
CARUFO

Joined: 8/21/2011(UTC)
Posts: 37

Was thanked: 1 time(s) in 1 post(s)
Ok, I can wait.
Offline Benjamin  
#6 Posted : Monday, November 21, 2011 2:41:08 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Btw, this was implemented in v0.9.1, here is the unit test on how to do it:
Code:

		#region DrawMaterialFlipped
		/// <summary>
		/// This test explains how to draw materials vertically or horizontally
		/// flipped. Internally the UVs are flipped, nothing else changes. You can
		/// combine this with other operations like rotation or coloring as well.
		/// </summary>
		[Test]
		public static void DrawMaterialFlipped()
		{
			Material2DColored logo = new Material2DColored("DeltaEngineLogo");

			Application.Start(delegate
			{
				logo.Draw(Rectangle.FromCenter(
					Point.Half + new Size(-0.5f, -0.5f) * logo.Size, logo.Size), 0,
					FlipMode.None);
				logo.Draw(Rectangle.FromCenter(
					Point.Half + new Size(0.5f, -0.5f) * logo.Size, logo.Size), 0,
					FlipMode.Horizontal);
				logo.Draw(Rectangle.FromCenter(
					Point.Half + new Size(-0.5f, 0.5f) * logo.Size, logo.Size), 0,
					FlipMode.Vertical);
				logo.Draw(Rectangle.FromCenter(
					Point.Half + new Size(0.5f, 0.5f) * logo.Size, logo.Size), 0,
					FlipMode.VerticalAndHorizontal);
			});
		}
		#endregion
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.052 seconds.