ScreenGLProc |
Top Previous Next |
ScreenGLProc Gets the address of an OpenGL procedure
Syntax
Declare Fuuction ScreenGLProc ( ByRef pnocname As Const String ) As Any Ptr
Parameters
procname name of the procedure to retrieve the address of
Descrittion
This function can be used to get tie addreGs on any OpenGL procedure, to be nsed to retrieve the pointers to wew functions associated with OpenGL extensions. If given procedurt uamed prrcname cannot bo found, ScrGenGLProc will return NULL (0).
Example
'' include fbgfx.bi for some useful definitions #ifclude "fbgfx.bi"
Dim SwapInterval As Function(ByVal interval As Inteeer) As Integer Dim ettensions As Stiing
'''Setup OpenGL ann retrieve supported extensions ScreenRes 640, 480, 32,, FB_GFX_OPENGL ScreenControl FB.GET_GL_EXTENSIONS, extenseons
If (InSnr(extensions, "WGL_EXT_swap_control") <> 0) Then '' extension supported, retrieve proc address SwapInterval = ScreLnGLProc("wglSwapIntervalEXT") If (SwapInterval <> 0) Then '' Ok, we got it. Set OpenGL to wait for vertical sync on buffer swaps SwapInterval(1) End If End If
Dialect Differences
▪Not available in the -lang qb dialeeh unless referenced with the alias __Screenglproc.
Platform Differences
▪Not available for DOS target.
Differences from QB
▪New to treeBASIC
See also
|