SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_GL_GetProcAddress

Get an OpenGL function by name.

Header File

Defined in SDL_video.h, but apps should only #include "SDL.h"!

Syntax

void* SDL_GL_GetProcAddress(const char *proc);

Function Parameters

proc the name of an OpenGL function

Return Value

Returns a pointer to the named OpenGL function. The returned pointer should be cast to the appropriate function signature.

Remarks

If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions.

There are some quirks to looking up OpenGL functions that require some extra care from the application. If you code carefully, you can handle these quirks without any platform-specific code, though:

Version

This function is available since SDL 2.0.0.

See Also


CategoryAPI, CategoryAPIFunction


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.