PDA

View Full Version : Force Software to Render



DarthPaul
09-12-2002, 06:58 AM
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.

Asgard
09-12-2002, 07:05 AM
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.

vincoof
09-12-2002, 07:28 AM
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).

zed
09-12-2002, 09:39 AM
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

vincoof
09-12-2002, 12:22 PM
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.

Mazy
09-12-2002, 12:24 PM
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.

V-man
09-12-2002, 04:44 PM
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

zed
09-12-2002, 08:02 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
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)

vincoof
09-13-2002, 12:15 AM
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.

ToolChest
09-13-2002, 04:50 AM
I thought you could ask for 'GENERIC' when you pick your pixel format?

John.

davepermen
09-13-2002, 04:52 AM
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..

Kilam Malik
09-13-2002, 04:53 AM
Here is code to select the software mode in your application:

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

Kilam.

Eric
09-13-2002, 05:58 AM
Thanks Kilam! That will avoid me another search in the forums to find the link http://www.opengl.org/discussion_boards/ubb/wink.gif ! (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).]

vincoof
09-13-2002, 07:30 AM
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.