GLX and WGL/Windows

Some of the WGL functions and Windows functions are more or less analogous to GLX X Window functions. The following list shows GLX functions and their corresponding WGL/Windows functions, if available.

GLX Functions WGL/Windows Functions
glXChooseVisual ChoosePixelFormat
glXCopyContext
glXCreateContext wglCreateContext
glXCreateGLXPixmap CreateDIBitmap / CreateDIBSection
glXDestroyContext wglDeleteContext
glXDestroyGLXPixmap DeleteObject
glXGetConfig DescribePixelFormat
glXGetCurrentContext wglGetCurrentContext
glXGetCurrentDrawable wglGetCurrentDC
glXIsDirect
glXMakeCurrent wglMakeCurrent
glXQueryExtension GetVersion
glXQueryVersion GetVersion
glXSwapBuffers SwapBuffers
glXUseXFont wglUseFontBitmaps / wglUseFontOutlines
glXWaitGL
glXWaitX
XGetVisualInfo GetPixelFormat
XCreateWindow CreateWindow / CreateWindowEx and GetDC / BeginPaint
XSync GdiFlush
SetPixelFormat
wglGetProcAddress
wglShareLists

 

For more information, refer to the Porting Guide.