Skip to main content
GameDev.net gamedev.net
🔒 Locked

[C# XNA] Simple draw?

Started by Deprecated Dec 5, 2009 at 2:50 PM 0 replies 550+ views
Original Post
Deprecated
Deprecated
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.
Those who can do, do; those who can't do, do teach.
MJP
MJP
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.