Sign in to follow this  
Andy474

XNA HiDef / Reach Question

Recommended Posts

Andy474    694
Ok hi, hopefully a qq.

My projeclt has been build on my PC which has a great graphics card etc. so it runs the XNA hiDef Profile. Howecver, when i Publish the project, and install it to my latop i get the error that the graphics chip cannot handle hiDef.

So Solution, i wanna target HiDef if it can support HiDef, else support Reac, so i have this code:

[code]

protected override void Initialize()
{
graphics.PreferredBackBufferWidth = WindowSize.X;
graphics.PreferredBackBufferHeight = WindowSize.Y;
graphics.IsFullScreen = isFullScreen;

if (graphics.GraphicsDevice.Adapter.IsProfileSupported(GraphicsProfile.HiDef))
graphics.GraphicsProfile = GraphicsProfile.HiDef;
else
graphics.GraphicsProfile = GraphicsProfile.Reach;

graphics.ApplyChanges();
this.Window.Title = GameTitle + " " + Version;
this.IsMouseVisible = true;
base.Initialize();
}
[/code]

However, this doesn't run on my laptop either, comes back with the same Error :/

two ideas here:
1/ My laptop doesn't support HiDef, and the code i wrote is wrong or in the wrong place?
2/ My Laptop supports it so it passes the check for hiDef and then XNA throws a fit.

In my eyes Scenario 1 is the best, Anyone else have any thoughts? Has anyone managed to do this in one of there games?

NOTE: My Laptop doesn't have Visual C# etc and the XNA Framework installed, it only has what the Published Files had Installed (the XNA Framework Redistributable packet i think)

- Any help Much appreciated :)
- Alex

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='Andy474' timestamp='1305803351' post='4812951']
Ok hi, hopefully a qq.

My projeclt has been build on my PC which has a great graphics card etc. so it runs the XNA hiDef Profile. Howecver, when i Publish the project, and install it to my latop i get the error that the graphics chip cannot handle hiDef.

So Solution, i wanna target HiDef if it can support HiDef, else support Reac, so i have this code:

[code]

protected override void Initialize()
{
graphics.PreferredBackBufferWidth = WindowSize.X;
graphics.PreferredBackBufferHeight = WindowSize.Y;
graphics.IsFullScreen = isFullScreen;

if (graphics.GraphicsDevice.Adapter.IsProfileSupported(GraphicsProfile.HiDef))
graphics.GraphicsProfile = GraphicsProfile.HiDef;
else
graphics.GraphicsProfile = GraphicsProfile.Reach;

graphics.ApplyChanges();
this.Window.Title = GameTitle + " " + Version;
this.IsMouseVisible = true;
base.Initialize();
}
[/code]

However, this doesn't run on my laptop either, comes back with the same Error :/

two ideas here:
1/ My laptop doesn't support HiDef, and the code i wrote is wrong or in the wrong place?
2/ My Laptop supports it so it passes the check for hiDef and then XNA throws a fit.

In my eyes Scenario 1 is the best, Anyone else have any thoughts? Has anyone managed to do this in one of there games?

NOTE: My Laptop doesn't have Visual C# etc and the XNA Framework installed, it only has what the Published Files had Installed (the XNA Framework Redistributable packet i think)

- Any help Much appreciated :)
- Alex
[/quote]

from what i know of XNA, is that you need the XNA Runtime (the version your useing) and atleast the same version of the .Net Runtime as required by the version of XNA.

Share this post


Link to post
Share on other sites
Andy474    694
Ya, thats not the problem. there is .NET on there and everything is installed, the problem is that the Program is targeting the wrong graphics profile. and i want to make it check. However its obv not doing that with the code i have.

The Laptop can run things in reach i know because i used to develop on there before i formatted the Hard-drive.

Share this post


Link to post
Share on other sites
DarklyDreaming    367
What is your laptop's graphics card? If it's an Intel GMA <whatever> it's highly likely [i]that's [/i]the problem. Either way, seems pretty straight forward - if it's telling you it doesn't support HiDef it doesn't?
Oh, wait. I re-read. You're saying that doesn't work, it should go for the Reach profile. Well, are you [i]sure[/i] it even supports Reach? Check for Shader Model 2.0 compliance (pissy GMA chipsets DO NOT support both Vertex and Pixel Shaders 2.0 so it is NOT compliant).

If you have a card that supports SM 2.0, then make sure you selected Reach in the 'Properties' section before you publish. (Project -> Properties -> 'Game Profile: Use Reach [...]')
Anyhow, good luck!

Share this post


Link to post
Share on other sites
Andy474    694
Cheers for the reply :)

My Laptop has a Mobile [b][u]Intel(R) 4 Series Express Chipset Family[/u][/b]
[b][u]
[/u][/b]
And i have run programs off the Reach profile on the laptop before.

The problem here is that the project i am using is set to use the Hi-Def profile by default (which is what i want) and then at startup it checks to see if we can use the Hi-def, if we cant it should set the profile to reach, however it doesn't? is the value i code in overridden by what i set in project properties?

E.g. Project --> Properties --> XNA --> Use HiDef going to always be used. even if in the code it says i wanna use Reach?

Share this post


Link to post
Share on other sites
DarklyDreaming    367
Personally I've never had to use both in the same project (e.g. I've created one project with Reach profile and one with HiDef). But according to [url="http://blogs.msdn.com/b/shawnhar/archive/2010/07/19/selecting-reach-vs-hidef.aspx"]THIS[/url] page you can indeed change at runtime. It's not exactly clear to how, so I made a search and came up with nothing good on the subject. However, looking at the article it would seem trivial to implement - but the assumption is your going Reach -> HiDef and NOT the other way around, which makes sense since HiDef is a superset or Reach. So, is your content built for HiDef? Because if that is the case I don't think it will work, and you will instead have to build using the Reach profile and check if HiDef is available or something similar.

Sorry for the lack of info, working right now so got little spare time between builds!

Share this post


Link to post
Share on other sites
Andy474    694
Yah, came to the same conclusion and it worked :)

- If i have it on Reach profile by default, and try to set it to Hi-def it works, but it wont work the other way around :D


Cheers for replys and hf Dark :)


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this