Is it possible to pass the content builder profile (HiDef/Reach) to an importer / processor?

I’d like to pass the Profile setting along to my custom pipeline extension. Is there a supported way of doing this?

In your processor you normally have an override of
‘Process(TInput input, ContentProcessorContext context)’ where the pipeline pass you a ContentProcessorContext object.

You can get the current GraphicsProfile from context.TargetProfile.

There are some helper methods as well, like ‘TextureContent.Validate(targetProfile)’ which unfortunately are not implemented.

You need to know however that the runtime ignores everything that have to do with the GraphicsProfile. 8-(

If you use features that goes Beyond the profile you set in GraphicsDevice the game will happily run without problems.
That is until someone run it in a machine with a lesses GPU when it will throw an exception straight from the graphics driver and there is nothing you can do in your code to foresee that. 8-(

1 Like