How to get OpenGL hardware acceleration?

Hello,

I have a NVidia GF4 MX video card, and I would like to use hardware acceleration in my OpenGL program.

However, when I check the PIXELFORMATDESCRIPTOR, there is no hardware acceleration(PFD_GENERIC_ACCELERATED&pfd.dwFlags == false).

I’ve already installed the OpenGL driver from the video card. It’s nvoglnt.dll in System32 directory. I am wondering how I can use the new driver from my code?

I also tried to copy the nvoglnt.dll file in my source code directory ,and rename it to OpenGL32.dll. But it generates an error: “The procedure entry point glMap2f could not be located in the dynamic link library OPENGL32.dll”.

I will appreciate your help.

if you are using opengl at all, then you have hardware acceleration. A hardware accelerated device is a requirement for using the opengl renderer. I think you are asking about pixel shaders, no? Your geforce4 should have two pixel shaders on board, you might want to look into some specific posts on writing shader code. As of now, you can either use Cg (which is going down the tube), or the gl version, its called 'slang or something like that…anyhoo good luck.

Originally posted by isOpenSource:
if you are using opengl at all, then you have hardware acceleration. A hardware accelerated device is a requirement for using the opengl renderer. I think you are asking about pixel shaders, no? Your geforce4 should have two pixel shaders on board, you might want to look into some specific posts on writing shader code. As of now, you can either use Cg (which is going down the tube), or the gl version, its called 'slang or something like that…anyhoo good luck.

I want to use some OpenGL extensions of the specific video card. However, I can not access those functions. So I am guessing my code didn’t use the DLL file provided with the card.

Originally posted by isOpenSource:
A hardware accelerated device is a requirement for using the opengl renderer. Your geforce4 should have two pixel shaders on board

No, OpenGL does NOT require a hardware accelerated device and the Geforce4MX dosent have ANY pixelshaders.

@xunhuan

I guess you are requesting an pixelformat that is not hardware accelerated and forces OpenGL to fall back into software mode instead.

If you would post your pixelformat setup code it would be easier to find the problem.

Originally posted by Honk:
[b] No, OpenGL does NOT require a hardware accelerated device and the Geforce4MX dosent have ANY pixelshaders.

@xunhuan

I guess you are requesting an pixelformat that is not hardware accelerated and forces OpenGL to fall back into software mode instead.

If you would post your pixelformat setup code it would be easier to find the problem.[/b]

My Pixelformat setup is:
PIXELFORMATDESCRIPTOR PixelFormat =
{
sizeof ( PIXELFORMATDESCRIPTOR ), // the size of the structure
1, // structure version
PFD_DRAW_TO_BITMAP | // draw direct to window
PFD_SUPPORT_OPENGL | // allow DC to support OPENGL calls
PFD_SUPPORT_GDI | // use GDI support
PFD_GENERIC_ACCELERATED,
PFD_TYPE_RGBA, // use RGBA color mode
24, // use 24 bit color
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // unused
32, // use a 32 bit z buffer
0, 0, // unused
PFD_MAIN_PLANE, // draw to main plane
0, 0, 0, 0
};

After I set up the PixelFormat and create rendering context, I checked the dwFlags. It shows that there is only software acceleration. ( dwFlags & PFD_GENERICFORMAT == true and dwFlags && PFD_GENERIC_ACCELERATED == false ).

Hi,
If you request draw-to-bitmap in the PFD structure, then you’ll get only software rendering. You should ask for draw-to-window and see if you can get the 0x2027 (full acceleration) accepted.

Yes, you are right.
In PixelFormatDescriptor, I set PFD_DRAW_TO_BITMAP. It seems like this option is exclusive to hardware acceleration. Once I use PFD_DRAW_TO_WINDOW, it works fine.

Thank you!

[This message has been edited by xunhuan (edited 11-07-2003).]

Exactly!

If you plan to use double buffering you also want to get rid of the PFD_SUPPORT_GDI because PFD_SUPPORT_GDI and PFD_DOUBLEBUFFER are mutually exclusiv.