How to get generic UNACCELERATED OpenGL context?

Hi,

I have nVidia GeForce2, so almost all calls to ::ChoosePixelFormat give me a hardware accelerated pixel format.

But I have to take a look on unaccelerated OpenGL and want to do it without plugin/plugout card cycle.

Thanks for advance

maybe you could try sgi’s mmx opengl implementation, the link can be easily found on the opengl.org page.

flash

Unfortunately, SGI MMX implementation is too well, so it fall to hardware accelerated contexts too.

Select a pixelformat with PFD_GENERIC_FORMAT. These are the ones using MS GDI generic OpenGL implementation.

And beware of ChoosePixelformat(), it ignores some flags. Enumeration with DescribePixelformat() gives you more control.

[This message has been edited by Relic (edited 07-28-2000).]

> Unfortunately, SGI MMX implementation is too well, so it fall to hardware accelerated contexts too.

Just rename opengl.dll to opengl32.dll - and it will do the trick!

Once agin here is the psudo code. Apologies for half of the last message. If you didnt get the last message: basically I wrote that you must iterate thru all formats reading the flags to get the one you want. You cannot expressly set the pf structure to generic and then call SetpixelFormat. If you do you wont necessarily get a software driver. You must have the driver number first.
// 1 - link against your normal libs

//2 iterate thru drivers
PXELFORMATDESCRIPTOR pf;
//set flags to your requirements

int nFmt = DescribePixelFormat(hdc,1,0,NULL);
int iDriver = 1;
for( i=1;i<nFmt;i++)
{
DescribePixelFormat(hdc,i,pf.size,&pf);
if( pf.dwFlags & PFD_GENERIC_ACCELERATED )
{
// do your color and depth checks e.t.c

//this is a software driver
iDriver = i;
//break from loop
}
}

SetPixelFormat(hdc,iDriver,&pf);

//you now have software GL

//If you are writing a windows app you
//should switch to software when your window
//goes inactive

Hope this helps.
VS

Thank you, guys!
I rely too much on ::ChoosePixelFormat().
Enumeration works fine.

Thanks a lot!