Google Earth - Set rendering via registry

Published:
Today, I installed Google Earth v5.1 on a Windows XP laptop and discovered it wasn't rendering the Earth or maps properly.  Now this is clearly a display issue as Google Earth is not rendering the images properly.  I looked in Tools-Options-3D View-Graphics Mode and discovered it was set to OpenGL.  OpenGL is Google Earth's default rendering mode.  I switched it to DirectX, restarted Google Earth, and it worked!  Now, I can see the Earth and all maps within.  Great!

Okay, now I need to do this to 30 other laptops and prefer to automate the process.  I did not know how Google Earth stored the setting of either OpenGL or DirectX.  I turned to Experts-Exchange and Google for solutions, which did not help.  As a result, I decided to create this article to share with anyone that cares.

After poking around the registry, I discovered where the registry value is stored.  One thing that made discovering this registry setting so difficult is that when Google Earth has only been opened in OpenGL mode, the registry key does not exist until DirectX has been enabled.

Unfortunately, the graphics mode (a.k.a. rendering) is located in the user registry, not the machine registry.  I find this odd since the graphics mode is really dependent upon hardware and not so much a user preference.  Why do programmers do things like this?  My best guess is to ensure the user has the "rights" to make the change if the system is in a locked down environment, but I digress.

Let me give you some specifics about the registry setting that I found.  The key is: [HKCU\Software\Google\Google Earth Plus\Render] The DWORD value that needs to be added/changed is called RenderingAPI.  This can have a value of 1 or 2.  
Setting the value to 1 will enable OpenGL mode.
Setting the value to 2 will enable DirectX mode.
Another way to set OpenGL in the registry is to delete the [HKCU\Software\Google\Google Earth Plus\Render] key completely.  This key does not exist when Google Earth has never been opened in DirectX rendering mode as I mentioned earlier.  However, some settings could be lost, so I recommend just modifying the RenderingAPI value instead.

Warning Serious problems might occur if you incorrectly modify the registry, please make sure you understand the steps and take appropriate precautions before you begin.

Here a the reg file for enabling DirectX. Just copy and past the code into a new text file and adjust the value accordingly.  You can name it to anything you like; I am calling it "render.reg".  
Windows Registry Editor Version 5.00 
                      [HKEY_CURRENT_USER\Software\Google\Google Earth Plus\Render]
                      "RenderingApi"=dword:00000002

Open in new window

A command line option for importing this reg file would be
reg.exe import render.reg

Open in new window




***The next steps are only needed if you have multiple users for a computer or plan to make an image of a computer.***

Now it is possible to add the RenderingApi value to the "Default User" registry for future users, which is useful when creating an image that you wish to deploy.  We will do this by loading the Default User NTUSER.DAT in the registry.  
Open Regedit
Highlight the HKEY_USERS key
Click File
Click Load Hive...
Navigate to the NTUSER.DAT file under the "C:\Documents and Settings\Default User" (Note: You may need to enable "Show Hidden files and folders" in the Folder Options control panel to see the "Default User" folder)
Name the new hive "Default"
Navigate to the [HKEY_USERS\Default\Software\Google\Google Earth Plus\Render] key (Create key if it does not exist)
Add or create the DWORD value for RenderingApi and set to either 1 or 2.
 I recommend using reg.exe for automating from the command line.  There are many ways to automate this, so you'll have to figure out the solution best for you.  

***End Step***

So there you have it.  You can now set Google Earth to use either OpenGL or DirectX via the registry.  Automating even the simplest tasks can make your job much easier.  I was once told by a co-worker that I would automate myself out of a job one day.  He was laid off a year later.  

Disclaimer and Final Warning : Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. I cannot guarantee that these problems can be solved. Modify the registry at your own risk.

1
6,484 Views

Comments (1)

Mark WillsTopic Advisor
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Thanks Jasenwebster,

Just ran the registry for directx and it does make a difference. Who would have thought :)

Voted Yes above...

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.