Force Software to Render

How do you force OpenGL to use software to render and ignore the available hardware?

This question could probably go in the beginners section. If your wondering why on earth I would want to do this, its for testing reasons.

For NVIDIA cards, there’s a tool called NVEmulate.exe that you can grab off the NVIDIA site to force software rasterization.

If you don’t have an NVIDIA card, you can simply choose a pixel format that is not hardware accelerated. Then you’ll get the MS software renderer in opengl32.dll. However, it only supports OpenGL 1.1, so that might not be an option.

In the Windows ‘Display Settings’, click on ‘Advanced’ in the last tab, and there is a slider where you can set the hardware acceleration level. Set this slider to the minimum value and click on Apply. Now all your OpenGL applications will use the Microsoft software renderer (be careful there are bugs in it).

IMHO under windows a better way is to rename the cards opengl driver eg nvidia on nt is nvoglnt.dll (or something similar) then opengl32.dll will be used

IMHO that is not a safe method. I would not recommend to rename or remove that dll. Though if Software Renderer is really important, then you can try it as a last resort, and at your own risk of course.

Just enumrate all the (Describe) pixel formats and pick one without the acceleration… you have the information in the flags.

No need for extra applications, no need to rename files.

The cleanest way would be to use a DLL that is guaranteed to give software - > MESA is great for this.

A glenable/gldisable would be nice thought.

V-man

Originally posted by vincoof:
IMHO that is not a safe method. I would not recommend to rename or remove that dll. Though if Software Renderer is really important, then you can try it as a last resort, and at your own risk of course.

um yeah ok
the problem with the hardware slider thingee is what exactly does it do?
ie are u 100% sure its gonna ONLY make the opengl use the software driver (there could be other things it changes AFAIK there are various notches in the hardware slider)

ie are u 100% sure its gonna ONLY make the opengl use the software driver

I can’t tell 100%, but maybe MicroSoft could.
In fact, I’ve tested this “software forcing” method on several graphics card (with several drivers) and it has always switched to software.

Anyway, even if you rename your dll you’re not 100% sure that it will be ignored. you’re not guaranteed that the exact name of the dll is needed.
And worse of all, if you rename your dll you’re 100% sure that you’re overriding the normal behaviour, and weird results may appear. At best you will have what you want ; at worst you will have regular reboots and crashes.

I thought you could ask for ‘GENERIC’ when you pick your pixel format?

John.

put a software opengl dll (the opengl.dll from mesa for example) into the same folder as the executable, and it will use this one…

Here is code to select the software mode in your application:

http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/001818.html

Kilam.

Thanks Kilam! That will avoid me another search in the forums to find the link ! (don’t know why people never use this feature !)

By the way, looking at that code again, I spotted some debug code that should have been removed before the post. In FindPixelFormat:

PIXELFORMATDESCRIPTOR UsedPFD2;
int iUsedPFD2=ChoosePixelFormat(hdc,ppfd);
DescribePixelFormat(hdc,iUsedPFD2,sizeof(UsedPFD2),&UsedPFD2);

These lines can be deleted…

Regards.

Eric

[This message has been edited by Eric (edited 09-13-2002).]

That a nice code tip !
Though it’s only possible when you have control over the Win32 GDI.
People that use glut or SDL can’t use it.