1al_get_opengl_proc_address(3L)ibrary Functions Manuaall_get_opengl_proc_address(3)
2
3
4

NAME

6       al_get_opengl_proc_address
7

SYNOPSIS

9              #include <allegro5/allegro_opengl.h>
10
11              void *al_get_opengl_proc_address(const char *name)
12

DESCRIPTION

14       Helper to get the address of an OpenGL symbol
15
16       Example:
17
18       How to get the function glMultiTexCoord3fARB that comes with ARB's Mul‐
19       titexture extension:
20
21              // define the type of the function
22                 ALLEGRO_DEFINE_PROC_TYPE(void, MULTI_TEX_FUNC,
23                    (GLenum, GLfloat, GLfloat, GLfloat));
24              // declare the function pointer
25                 MULTI_TEX_FUNC glMultiTexCoord3fARB;
26              // get the address of the function
27                 glMultiTexCoord3fARB = (MULTI_TEX_FUNC) al_get_opengl_proc_address(
28                    "glMultiTexCoord3fARB");
29
30       If glMultiTexCoord3fARB is not NULL then it can be used as  if  it  has
31       been defined in the OpenGL core library.
32
33              Note: Under Windows, OpenGL functions may need a special calling
34              convention,   so   it's   best   to   always   use   the   ALLE‐
35              GRO_DEFINE_PROC_TYPE macro when declaring function pointer types
36              for OpenGL functions.
37
38       Parameters:
39
40       name - The name of the symbol you want to link to.
41

RETURN VALUE

43       A pointer to the symbol if available or NULL otherwise.
44
45
46
47Allegro reference manual                         al_get_opengl_proc_address(3)
Impressum