# How to get OpenGL hardware acceleration?

**URL:** <https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667>\
**Category:** OpenGL: Basic Coding\
**Created:** [November 6, 2003, 3:56pm UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667 "2003-11-06T15:56:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![xunhuan](https://community.khronos.org/letter_avatar_proxy/v4/letter/x/e274bd/32.png) [@xunhuan](https://community.khronos.org/u/xunhuan)\
**Post date:** [November 6, 2003, 3:56pm UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/1 "2003-11-06T15:56:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![isOpenSource](https://community.khronos.org/letter_avatar_proxy/v4/letter/i/b4bc9f/32.png) [@isOpenSource](https://community.khronos.org/u/isOpenSource)\
**Post date:** [November 6, 2003, 5:30pm UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/2 "2003-11-06T17:30:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xunhuan](https://community.khronos.org/letter_avatar_proxy/v4/letter/x/e274bd/32.png) [@xunhuan](https://community.khronos.org/u/xunhuan)\
**Post date:** [November 6, 2003, 7:43pm UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/3 "2003-11-06T19:43:00Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Honk](https://community.khronos.org/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@Honk](https://community.khronos.org/u/Honk)\
**Post date:** [November 6, 2003, 11:23pm UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/4 "2003-11-06T23:23:00Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![xunhuan](https://community.khronos.org/letter_avatar_proxy/v4/letter/x/e274bd/32.png) [@xunhuan](https://community.khronos.org/u/xunhuan)\
**Post date:** [November 7, 2003, 7:56am UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/5 "2003-11-07T07:56:00Z")

</div>

> 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 ).

---

<div class="post-metadata">

**Author:** ![Tzupy](https://community.khronos.org/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tzupy](https://community.khronos.org/u/Tzupy)\
**Post date:** [November 7, 2003, 8:48am UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/6 "2003-11-07T08:48:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xunhuan](https://community.khronos.org/letter_avatar_proxy/v4/letter/x/e274bd/32.png) [@xunhuan](https://community.khronos.org/u/xunhuan)\
**Post date:** [November 7, 2003, 9:09am UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/7 "2003-11-07T09:09:00Z")

</div>

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).]

---

<div class="post-metadata">

**Author:** ![Honk](https://community.khronos.org/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@Honk](https://community.khronos.org/u/Honk)\
**Post date:** [November 7, 2003, 9:13am UTC](https://community.khronos.org/t/how-to-get-opengl-hardware-acceleration/20667/8 "2003-11-07T09:13:00Z")

</div>

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.
