XNA 4.0 and Winforms
The sample on the creator's club website almost compiles with XNA 4.0. All that's broken is the Graphics Device's presentation parameters, and these are pretty simple to fix. So it was a pretty simple port. Took about three minutes to get it to compile, and another ten or so to make it work. Turns out there's another breaking change lurking in, of all places, viewports. The max and min depth are now constrained to the range 1,0.
Here's a simple model for simple level editors. Especially if you're working on some kind of grid, say of tiles. All operations are abstracted as 'brushes'. The brush interface has a single apply function, which takes the position to apply it, and the level to apply it to. Add a toolbar to select the brush, and a property grid to set brush properties (Actually sort of overkill, but oh so simple to implement) and you instantly have an awesome level editor. Enjoy.
March 10th, 2011 - 01:25
Have you had any problems with culling using the winforms series with XNA 4.0? I adapted it as well but it’s drawing my cube faces in reverse order (it’s drawing the back ones and culling the front ones). These cubes draw fine with the standard XNA graphicsdevice so I’m assuming it’s a version issue…I know the graphicsdevice was updated a bit in XNA 4.0. Thanks.