Jump to content
  • Advertisement
Sign in to follow this  
Deprecated

[C# XNA] Simple draw?

This topic is 3091 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

Hey there! I've been looking at C# and XNA for a few hours now and I think it's pretty ok. I have no problems when I'm trying to draw sprites, but I can't find anything about drawing simple lines or rectangles in 2D? I've found a few examples on drawing 3D lines on a 2D surface, but they need alot of code and is fairly complex for such a simple task.. Could someone please point me in the right direction.

Share this post


Link to post
Share on other sites
Advertisement
Yeah unfortunately the framework doesn't come with any helper classes for drawing simple primitives, so that stuff has to be done manually. However there is a sample that creates such a helper class, so you should be able to just steal some code from that.

There's also a How To article on MSDN that shows you the basics of drawing primitives, in case you want to try from scratch.

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!