Uwaga
Dostęp do tej strony wymaga autoryzacji. Może spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
OpenGL X Window System programs use the OpenGL Extension with the X Window System (GLX) library. The library is a set of functions and routines that initialize the pixel format, control rendering, and perform other OpenGL specific tasks. It connects the OpenGL library to the X Window System by managing window handles and rendering contexts. You must translate these functions to their equivalent Windows functions. The following table lists the X Window System GLX functions and their equivalent Windows functions.
GLX/Xlib function | WGL/Windows function |
---|---|
glXChooseVisual | ChoosePixelFormat |
glXCopyContext | wglCopyContext |
glXCreateContext | wglCreateContext, wglShareLists |
glXCreateGLXPixmap | CreateDIBitmap / CreateDIBSection |
glXDestroyContext | wglDeleteContext |
glXDestroyGLXPixmap | DeleteObject |
glXGetConfig | DescribePixelFormat |
glXGetCurrentContext | wglGetCurrentContext |
glXGetCurrentDrawable | wglGetCurrentDC |
glXGetProcAddress | wglGetProcAddress |
glXIsDirect | Not applicable. |
glXMakeCurrent | wglMakeCurrent |
glXQueryExtension | GetVersion |
glXQueryVersion | GetVersion |
glXSwapBuffers | SwapBuffers |
glXUseXFont | wglUseFontBitmaps / wglUseFontOutlines |
glXWaitGL | Not applicable. |
glXWaitX | Not applicable. |
XCreateWindow | CreateWindow / CreateWindowEx and GetDC / BeginPaint |
XGetVisualInfo | GetPixelFormat |
XSync | GdiFlush |
Not applicable. | SetPixelFormat |
Some GLX functions don't have an equivalent Windows function. To port these functions to Windows, rewrite your code to achieve the same functionality. For example, glXWaitGL has no equivalent Windows function but you can achieve the same result, executing any pending OpenGL commands, by calling glFinish.
The following topics describe how to port GLX functions that set the pixel format, and manage rendering contexts, pixmaps and bitmaps.