Jump to content
  • Advertisement
Sign in to follow this  

Manage C# Many Textures from one Picture

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Manage C# DirectX9 Question: if someone have a example that load one Texture spriteTexture and have a function that can draw one small texture from spriteTexture Example I get from Managed DirectX 9 ISBN: 0672325969 and Example work fine in book but not when me use an other .tga picture this is how me try do: // ------------------------------------------------------------------------ I try take out pictures from t Example try take out picture 6 from row 0: ar.Add(new Art(1000, 1000, 1, 11)); // Add new Sprite ((Art)ar[0]).Draw(sprite, spriteTexture, X, Y, 0, 6, Color.White); // Draw Sprite 6
public void Draw(Sprite sprite, Texture t, int X, int Y, int r, int c, Color Col)
		new Rectangle(X * 50 ,Y * 0, 50, 50),
		System.Drawing.Rectangle.Empty,			// this Rectangle I no know what does
		new System.Drawing.Point(X, Y),

I get this Graphical error: the Blue is what me get on screen and White is Texture spriteTexture small Texturepicture is (0-49 * 0-49) // ------------------------------------------------------------------------ PS: How u spinn (change angle) of sprite? [Edited by - mobii on March 29, 2005 4:59:29 AM]

Share this post

Link to post
Share on other sites
I just write say me get help from Post:

to get Picture in right size I use:

spriteTexture = Direct3D.TextureLoader.FromFile
1000, // Picture Width
1000, // Picture Height
// if u do like this u get Error if u going take out textures from Pic
spriteTexture = TextureLoader.FromFile(device, @"..\..\t.tga"); // OK to whole pic but no to many textures

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!