GLEXT: Demo of GL_WIN_swap_hint & GL_EXT_vertex_arrayID: Q139967
|
The GLEXT sample illustrates how to use the GL_WIN_swap_hint extension to
speed up animation by reducing the amount of repainting between frames and
how to use GL_EXT_vertex_array extension to provide fast rendering of
multiple geometric primitives with one glDrawArraysEXT call. It also shows
how to use glPixelZoom and glDrawPixels to display an OpenGL bitmap.
Note that GL_WIN_swap_hint and GL_EXT_vertex_array are not supported by all
accelerator cards. You should query the available pixel formats for these
capabilities as described in the following article text.
The following file is available for download from the Microsoft Software Library:
~ glext.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
glAddSwapHintRectWIN
SwapBuffers
glGetString
wglGetProcAddress
The glAddSwapHintRectWIN function lets you specify a set of rectangular areas that you want to copy when you call SwapBuffers function. When no rectangles are specified with glAddSwapHintRectWIN before calling SwapBuffers, the entire frame buffer is swapped. If you only want to animate part of your scene, using glAddSwapHintRectWIN function will significantly speed up your animation. To check whether your implementation
of OpenGL supports glAddSwapHintRectWIN, call glGetString(GL_EXTENSIONS). If it returns GL_WIN_swap_hint, glAddWsapHintRectWIN is supported. To obtain the address of the glAddSwapHintRectWIN function, call wglGetProcAddress.
glDrawArraysEXT
glGetString
wglGetProcAddress
The glDrawArraysEXT function enables you to specify multiple geometric primitives to render. Instead of calling separate OpenGL functions to pass each individual vertex, normal, or color, you can specify separate arrays of vertexes, normals, and colors to define a sequence of primitives of the same kind, and just use one glDrawArraysEXT call to render them. To check whether your implementation of OpenGL supports glDrawArraysEXT, call
glGetString(GL_EXTENSIONS). If it returns GL_EXT_vertex_array,
glDrawArraysEXT is supported. To obtain the address of the glDrawArraysEXT function, call wglGetProcAddress.
glVertexPointerEXT
glNormalPointerEXT
glColorPointerEXT
glTexCoordPointerEXT
glEdgeFlagPointerEXT
glArrayElementEXT
glGetPointervEXT
glIndexPointerEXT
See the SDK references for information on these functions.
Additional query words: kbgraphic kbfile glext.exe opengl swap extension
Keywords : kbfile kbgraphic kbNTOS400 kbSDKWin32 kbWinOS95 kbWinOS98 GdiOpenGL
Version : WINDOWS:95,98
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: June 15, 1999