0

I'm going to develop a wrapper of OpenGL library in linux, libGL.so.1, installed from NVIDIA driver. I found there are about 3000 symbols which OpenGL library exports:

$ nm -D /usr/lib/x86_64-linux-gnu/libGL.so.1
...
0000000000047400 T glBeginConditionalRender
0000000000047420 T glBeginConditionalRenderNV
0000000000047440 T glBeginConditionalRenderNVX
0000000000047460 T glBeginFragmentShaderATI
0000000000047480 T glBeginOcclusionQueryNV
00000000000474a0 T glBeginPerfMonitorAMD
00000000000474c0 T glBeginPerfQueryINTEL
...

And most of them are extended symbols. It's not clear to me how to use these extended symbols.

In general, how to use these extension symbols? Directly calling or indrectly using such as via GetProcAddress()?

If these extended symbols will not be called directly, I don't need to wrap them.

I think this situation will also be suitable for those extended symbols of glX.

3
  • Some of them are for backwards compatibility. For example glBeginConditionalRender started its life as a a part of the NV extension and later made its way to the base OpenGL. Others are parts of various extensions and not of the base OpenGL. You need to consult the extension documentation to find out how to use them. Commented Feb 27, 2023 at 9:05
  • Generally speaking, these extension will be called via GetProcAddress(). Hence, I only just need to wrap this GetProcAddress() method. So these extension function pointers can be found and used. Commented Mar 9, 2023 at 3:22
  • @n.m. Can you post this comment to the answer. I'll adopt this commnet as the answer. Commented Mar 9, 2023 at 3:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.