XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Custom Content Pipeline and XBox

Last post 04-30-2008 12:02 PM by Shawn Hargreaves. 2 replies.
  • 04-30-2008 8:24 AM

    Custom Content Pipeline and XBox

    Hi there, one of the groups following our Game programming lab has the following problem. They created a CustomModelProcessor. You can find it here: http://n.ethz.ch/~gnoris/download/CustomModelProcessor.cs The custom processor derives from ModelProcessor and generates some data they need for collision detection. They store this data in the Tag attribute of the ModelMeshContent. The problem is that running on the PC everything is fine, while on the Xbox the part relative to this stored data is screwed up. Are there xbox limitation on storing something big in the the Tag? Where should they store these data otherwise? They read the data using this class: http://n.ethz.ch/~gnoris/download/CustomModelDataReader.cs Do you understand what's wrong, and why it happens on the Xbox only? Thanks, meme
  • 04-30-2008 10:07 AM In reply to

    Re: Custom Content Pipeline and XBox

    how is the data screwed up?  need more details ;-)

    Joel Martinez
    Blog: http://codecube.net
    Play Videos on an XNA Texture: Scurvy Media
  • 04-30-2008 12:02 PM In reply to

    Re: Custom Content Pipeline and XBox

    Your processor code is using non-typesafe operations when it extracts the vertex position data into a memory stream, then pulls individual byte values back out of that stream. If you treat typed values as a non-typesafe stream of bytes, you then have to deal with all kinds of messy issues like processor endianess.

    You could add code to flip the endianess where required, but an easier solution is just to take out all this byte stream stuff and use strongly typed operations instead. The Content Pipeline graphics object model is designed to give you access to everything you need in a fully typesafe manner. Check out how our Triangle Picking sample looks up the vertex positions, for one example.
    XNA Framework Developer - blog - homepage
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG