MonoGame 3.6: Direct3D Shader/Effect works on Windows 7 but not Windows 10 - windows

I've got a small test program using a MonoGame 3.6 Direct3D shader/effect that displays an Earth model with continents shaded with a day/night texture (city lights show on the dark side).
https://github.com/davidsummers/mgtest
It works great on Windows 7 but not on Windows 10 Pro. On Windows 10 Pro it doesn't give any errors but just displays a black ball.
I've been trying to figure out for the last week what might cause it to work correctly on Windows 7 but not Windows 10 Pro.
I've also opened a bug report at https://github.com/MonoGame/MonoGame/issues/6171 with only 1 response so far with someone verifying that it just displays a black ball for them as well.
My understanding is that there should be no differences between Windows 7 and Windows 10 Direct3D that would prevent Direct3D from working. Is this the case or is there something I should do to update code that would make it work on both Windows 7 and Windows 10?
I'm fairly new at shaders/effects so there might be something obvious to someone else that I'm not knowledgeable about yet.
I'm running this on a Dell Precision M6700 with Nvidia Quadro K3000M card with Windows 10 Pro that previously was running Windows 7 Pro and displayed the earth/continents/NightDay Shader/effect with no problems.
The program still works correctly on another box with Windows 7 Pro.
The main question with respect to this issue is: SHOULD a MonoGame 3.6 custom effect/shader that works with Direct3D 9 on Windows 7 work on Windows 10 without any changes?
If not, what changes would need to be made to get it to work?
If it should work, why is not working?
Please let me know if more information is needed.

I've resolved the issue. A kind user on GitHub showed me that I had two data structures that should have been the same that weren't the same.
I deleted one of them and changed one of the shader subroutines to use the other data structure.
I also found that some (additional) lighting variables in the shader were not being initialized.
Once I did both of these things then the program seems to work correctly on all platforms.

Related

Pixelated java GUI in Windows 7 after migrating to AdoptOpenJDK 11

I'm migrating a java application from java 8 (Oracle) to java 11 (AdaptOpenJDK).
The version that was using java 8 used to have layout problems on windows 10 with high dpi displays.
Once I built using java 11 the problem went away, and GUI looks fine in Windows 10.
However, I found that the new build with java 11 does not look ok on Windows 7, GUI images and text appear pixelated.
Summary:
GUI with java 8 is fine on Win 7 but does not look ok in Win 10
GUI with java 11 is fine on Win 10 but does not look ok in Win 7
I'm using a 4k monitor at 3840x2160 with 125% scaling.
I found that if I use the java 8 JRE (from AdoptOpenJDK) to run the application, then the problem in Windows 7 goes away. It seems the problem is caused by java 11 doing a 125% scaling since I found the GUI is approximately 25% larger.
I'd like to find a solution in Windows 7 when using java 11. I wonder whether there is any javaw argument I can use or any system setting I can change.
Any help is appreciated.
Thanks.
Update
Screenshots of all combinations on java version and windows are attached.
java8 win 7.jpg : looks ok (no scaling), only drawback text and images small regardless of scaling configuration on system
java8 win 10.png : scaling is not applied to icons - cluttered JTree
java11 win 10.png : looks ok - proper scaling
java11 win 7.jpg : scaling applied but it shows problems - icons and text appear pixelated
Solution
This is not actually a solution, but I want to share what I believe it's happening after some research.
This Microsoft article describes the DPI awareness modes and which ones are in each Windows version. The behavior for all Windows versions previous to 8.1 will always apply Bitmap-stretching which causes the blurry UIs.
Stretching does not occur in Java 8 because it's not dpi-aware but it has a more serious problem on high scaling percentages (cluttering, huge text and small images/icons). Stretching occurs in java 11, since it's dpi-aware, however it has the blurriness problem due to the stretching behavior implemented in Windows 7.

Should Programmers Upgrade from Windows 7 to Windows 10

I am a VisualC# programmer and an individual Unity3d game developer. I wanted to know if there was any problem if I upgraded from my windows 7 to windows 10, I wanted to know if there is any difference in performance. And one more thing.. From a programmers point of view is there any feature that I would not be able to get if I do not activate windows,meaning that I use deactivated Windows because I donot think why should I activate it.
New Windows versions introduce new API. E.g. GetSystemTimePreciseAsFileTime() was only added in Windows 8.

Can you develop Windows 8 applications on Windows 7 PC and remote debug on a Windows 8 device?

I am trying to work out the least disruptive way of beginning to experiment with Windows 8 development. I currently have a Windows 7 Ultimate PC (plenty of disk space, RAM and i7 CPU), and I have a copy of Windows 8 (not 8.1).
I have considered various options:
Convert my whole machine to Windows 8. (Not ideal right now, as I am in the middle of other work, but I may have to do this eventually).
Dual boot Windows 7 & 8. (Can't get this to work. Windows 7 is already installed, and though I can get Windows 8 to install on the second HD, I can't get its boot menu to see Windows 7. I suspect this would be easier if I installed Windows 8 first, but that would be a huge pain.)
Run either OS using a virtual machine. (I haven't looked into this yet, and I have no idea what is involved.)
As a final option, I wondered if it is possible to develop Windows 8 applications on a Windows 7 PC and remote debug on an attached Windows 8 device? (I'd prefer to do this, as it is a way I have worked often in the past while doing console development.)
Does anyone have any experience of any of this - positive or negative? It takes ages to experiment with this stuff, with the constant threat of recking my existing work environment. I'd really appreciate any advice or pointers to articles that deal with any of this stuff.
Microsoft do their loyal developers no favours. I've paid hundreds for modern hardware, Windows versions and Visual Studio, and still it seems difficult to say the least to develop for their latest OS.
Kind wishes ~ Patrick
Option 4 is not possible. In similar situation I went with option 2 and gratually migrate myself completly to windows 8.
If you have problems with boot try to ask on superuser.com or better search the web for guideline.
If you want to develop applications for Windows 8 don't go with option 3.Please see this post on installing Visual studio in VM.
Regarding option 2,verbatim from Microsoft
You must install the older operating system first, and then install the more recent operating system. If you don't (for example, if you install Windows Vista on a computer already running Windows 7), you can render your system inoperable. This can happen because earlier versions of Windows don't recognize the startup files used in more recent versions of Windows and can overwrite them.
But as #Antonio said there may be roundabout for option 2.

Monogame OpenGL Game crashes on some Windows 7 computers

I'am learning some Gamedevelopment using Monogame.
I started a Windows OpenGL Project and everything works fine on my Win8 machine.
I have compiled the project and sent it to 2 People, both are using win7 x64 and one of them can't open the Game.
After that, I tested it on my other computer (also win7 x64) and I get the same problem, the game process starts, then the screen flashes (Aero seems to deactivate), then everything gets back to normal and the process of my game crashes without a message.
I'm sure, that there is no problem with my code, maybe some missing dlls but most of them are copied with the game
Lidgren.Network.dll
MonoGame.Framework.dll
OpenTK.dll
SDL.dll
Tao.Sdl.dll
Sincerely
CarnVanBeck
If it's taking down Windows Aero, it might be a graphics issue. Compare the graphical capability of the Win7 machine that can run it with the one(s) that can't. Does the working one have a graphics card? I seem to remember Monogame having odd behaviour with the Reach graphics profile.
Ok I fixed it using an OpenAL32 installer
I found the solution here
You have to install it, if your game doesn't work.
fixed it for me on my second computer.

Delphi 6 application running slow on windows 7

I have a application developed in Delphi 6, it works very good on Windows XP. Most of the controls are custom drawn to show gradients. Recently, I have deployed the application on Windows 7, after which all the windows are shown very slow. I have compared the same with the XP system.
Do i need to handle anything extra for running on Windows 7? With lot of pain, i have compiled the same application in Delphi XE, but still the application behavior is same. The windows were all opening very slow.
I have enabled the run time themes, disabled the custom drawing, but it did not have any impact.
Please help.
You should try to use a profiler with XP and with Seven and so you will see where the code is slowing.
There have been significant changes in GDI with the introduction of Vista: http://msdn.microsoft.com/en-us/library/windows/desktop/ff729480(v=vs.85).aspx.

Resources