Problem arises in XNA when going between VSC# 2008 to 2010 [duplicate] - c#

This question already has answers here:
Graphics Card and XNA 4.0
(3 answers)
Closed 2 years ago.
My problem is that I have written code in Visual C# for a background for a game that is part of my grade in a class. The background has multiple layers moving at different speeds is how I modified some code... I did this in 2008 version with XNA 3.1 and it worked fine and the background ran like intended. But when I went and ran the exact same code in the 2010 version on XNA 4.0 this error message appeared that states:
"No suitable graphics card found.
Could not find a Direct3D Device that supports the XNA Framework
HiDef profile.
Verify that a suitable graphics device is installed.
Make sure the desktop is not locked, and that no other application is
running in full screen mode.
Avoid running under Remote Desktop or as a Windows service.
Check the display properties to make sure hardware acceleration is set
to Full."
I understand that is says I need a better graphics card,but i was confused at the fact is worked in 2008 easily... so I went and change my setting to try and fix the problem to no avail. Is my graphic card not good, even though it worked in 2008 consistently? Have anyone else encountered this message and if so how did you fix it? I am wondering how do I make it so that I can run the said background in 2010 version. Appreciate any assistance...

There are many breaking changes between XNA 3 and 4. I would finish out the project in 3.1 if I were you. In 4.0:The HiDef profile requires DX10 hardware. The Reach profile supports older hardware.
This covers how to get to the older profile and what is covered by it.
Link

You need to have a better graphics card... Xna 3.1 uses Shader version 1.2 and Xna 4 uses shader 3 version. Your card doesn't support the correct shader version.

Related

XNA 4.0 game doesn't do anything when ran on another PC

This issue is getting real tiresome and I've been spending atleast 2 days looking around for an answer. Basically, I want to publish a game, and I've hired a friend of mine to test it out before I officially release it. Whenever he runs it, reports as "nothing happends".
These conditions are met:
He has installed the .NET Framework 4.0 and the XNA Redistributable 4.0 (he most likely also has installed other .NET Frameworks and XNA Frameworks as well, because nothing worked).
The game is compiled onto a Release build.
GamerService referenced is removed.
A possible issue could be that he's using Win8, but as my searching experience goes, XNA DEVELOPMENT is only restricted on Windows 8, right?
So, what's going on? I'm clueless.. I even put a MessageBox.Show(); after the execution of my game in my Program.cs file via try/catch, and no results.
Are there any extreme conditions in my code that I need to meet?
Any site describing 100% of all requirements to run an XNA game and the most proper way to build it?
Any issues when using non-distributable "developer tools" in XNA coding? If so, what includes in these "developer tools", and what do I need to modify? (I noticed that on another thread).
An answer to this issue would more than make my day...
Ah, and also, I tried running it on a virtual machine ( Windows 7 ) but then it spat out a messagebox saying Index outside the bounds of the array on a perfectly valid code execution, and various other random errors such as missing files when they clearly are there.
Thank you greatly!
In summary I think your app wont run on Windows 8, let me explain:
Windows 8
A possible issue could be that he's using Win8, but as my searching experience goes, XNA DEVELOPMENT is only restricted on Windows 8, right?
Officially, desktop games using unmodified Microsoft XNA 4/is not supported on Windows 8 in any form:
Microsoft officials have said the XNA tools/runtime environment used primarily by game developers isn't supported on Windows 8. - Read more...
Redistributables
Any issues when using non-distributable "developer tools" in XNA coding?
That depends on whether they are required at runtime on the target machine. That might sound like an oxymoron but in Windows c/c++, I can have an app that depends on Microsoft DLLs but we are not allowed to deploy the DLLs, one must depend on it being present in the OS; service pack or some other form. Is there something you are missing?
Windows 7
Ah, and also, I tried running it on a virtual machine ( Windows 7 ) but then it spat out a messagebox saying Index outside the bounds of the array on a perfectly valid code execution
This is more interesting and I suspect is one of the more testable aspects of your application (also that it is not Windows 8). I suggest you setup a remote-debug session to your Win7 VM or if that is not possible, use Debug.WriteLine() or equivalent displaying critical state contents.

No suitable graphics card is found error in Visual Studio 2010 debug mode

When i try to run my program i get this error:
"No suitable graphics card is found. Could not find a Direct3D device
that supports the XNA Framework Hi-Def profile. Verify that a suitable
graphics device is installed. Make sure your desktop isn't locked, and
that no other application is running in full screen mode. Avoid
running under Remote Desktop or as a Windows service. Check the
display properties to make sure hardware acceleration is set to Full."
I tryied to search: i can't set Rearch profile because i have to use Hi-Def libraries. I tryied to uninstall and install XNA 4.0 and .NET 4.5 but it doesn't work.
What i should do?
My laptop:
Pentium (R) Dual-Core CPU 2.2GHz
RAM: 4GB
Windows 7 Ultimate 32 bit
DirectX 11
Mobile Intel(R) 4 Series Express Chipset Family
Intel Graphics Media Accelerator (GMA) 4500MHD
Your graphics card does not meet the XNA requirements. Why do you have to use Hi-Def? Your DirectX sounds up to date, but those are still very low end cards. Read the exact specifications on Shawn Hargreaves blog for more information.
You can set your XNA project settings in the corresponding tab to target Reach profile, not the HD one. This will probably let you run the app, but beware the performance may be very low.
You may still be able to reference the HD libs and call their methods. Try to solve specific problems you have with that approach instead.
But really get a discrete graphics card if you want high performance and less problems.

Receiving error unable to find entry point named glBindFramebuffer when creating a new GraphicsDeviceManager object?

I have a Unable to find an entry point named 'glBindFramebuffer' in DLL 'opengl32.dll' when running a MonoGame Windows OpenGL project, So it seems the only way to solve this problem is to wrap a try and catch around it and then it will let you compile and run the program so my question is since I know that the new GraphicsDeviceManager fails will that result in a problem later on when deploying my game?.
I recently had the exact same error when I was trying to run my game in a virtual machine. It's essentially because you don't have the correct version of OpenGL installed. OpenGL normally comes with your graphics card drivers.
There is a discussion about this issue here:
https://github.com/mono/MonoGame/issues/998
In terms of deployment you basically have 3 options:
Use DirectX instead (plain old Microsoft XNA) or you can try MonoGame's DirectX implementation, but I'm not sure if it's complete.
If you are targeting other platforms (Android, iOS, etc) you'll be using OpenGL on the devices, but this should be okay.
Ensure your game has minimum requirements specified somewhere and handle the errors gracefully when it fails telling your users to update their graphics drivers.
That said, testing in different machine configurations is still a good idea.

Windows 7/8, Direct3D9, 10, and 11 - Effects / Shaders

Currently, i'm developing an app for the Windows 8 Store, Windows 8 Desktop and also Windows 7. The App should run smoothly on a Tablet and also on a "normal" Windows 7/8 Device. So, i got a tablet from my work and installed Windows 8 on it, just to realize, that the creepy Intel Graphics Media Accellerator (600) only supports DirectX 9.0c.
So, i tried for hours now to get my DirectX10/11 Effects/Shaders working on DirectX9, but nothing seems to work.. a Test with NVidia's FxComposer shows me, that DirectX9 Effects run good.
I'm programming with SharpDX / C#, and the technique10's and technique11's both are valid (MyTechnique.IsValid == true). To load the effect, i use theese lines of code:
var EffectByteCode = ShaderBytecode.CompileFromFile("DirectX/Shaders/"+FxFile, "fx_5_0", ShaderFlags.None, EffectFlags.None);
var Effect = new Effect(GraphicsProvider.Device, EffectByteCode, EffectFlags.None);
mEffect = FxEffect;
mTechnique11 = mEffect.GetTechniqueByName("main_11"); //works
mTechnique10 = mEffect.GetTechniqueByName("main_10"); //works
mTechnique9 = mEffect.GetTechniqueByName("main_9"); //doesn't work
I pasted the effect source code here: http://pastebin.com/KPxBN1DD.. excluded "main_11" and "main_10", in my tests, i commented them out, so i just removed those comment blocks.. i think dx9 should understand this very simple code..
So my final questions are:
- Is the parameter "fx_5_0" valid for loading technique, technique10 and technique11?
- Is my shader code correct? Or have i done something terribly wrong?
- Do i have to specify any other/additional information/functions/parameters for loading DX9 technique's?
- Maybe its a bug of SharpDX? I will take look on the code for this now i think..
Edit: Tried to make the question(s) a bit clearer..
The legacy Effect framework is not supported on Windows 8 Metro (because D3DCompiler_xx.dll is not supported), so you should better work with another solution. Also, Effect is deprecated by Microsoft and no longer supported.
The old Direct3D9 technique(compiled with vs_2_0 or ps_2_0) are not stored in FX files compiled with fx_5_0 (just check the output of fxc.exe compiler and you won't see them).
You have to use vs_4_0_level_9_x or ps_4_0_level_9_x in order to compile them for 9.x down level hardware support using technique10/11 syntax. Also, if all your original shaders could work with vs_4_0_level_9_x and you don't have any specific optimized version for 10.0 or 11.1, then you wouldn't have to compile a main_10 or main_11, as level_9_x shaders are working on any hardware from 9.x to 11.x.
You can probably have a look at SharpDX.Toolkit, not yet official, but It is supporting an Effect framework (with some XNA stock effects like BasicEffect or SpriteBatch). A beta of the toolkit will be available later this month.
Try replacing the SV_TARGET semantic with COLOR0. I've never seen SV_TARGET semantic in D3D9 shaders so far.

C# Joystick Input

I've got a Logitech Attack 3 (Standard Joystick) plugged into my computer and have confirmed that it is working. Now given that, I need a way via C# (only C#) to read the axis (and buttons would be nice too) values from the joystick. I have seen many examples which use DirectX, but are from 8 years ago and no longer work with .NET 4.5...Hence, I need a .NET 4.5 solution that works on Visual Studio 2012. I have done extensive research on this and cannot find a way to get simple coordinates from a joystick. Any help would be appreciated. Thanks!
I have tried to use SlimDx, but have no idea what code to write.
Also, this: http://www.codeproject.com/KB/directx/joystick.aspx <-- this is from 2006, and no longer works with .NET 4.5 for some reason.
Those examples you've looked at should still be fairly correct. What has changed is the directX version and I think you should have a look at directX11 to use in your project.

Categories

Resources