---
name: "al_get_opengl_proc_address"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_get_opengl_proc_address"
---

# al\_get\_opengl\_proc\_address(3)

Allegro 5 API

## NAME

al\_get\_opengl\_proc\_address - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_opengl.h>
  void *al_get_opengl_proc_address(const char *name)
  ```

## DESCRIPTION

Helper to get the address of an OpenGL symbol

Example:

How to get the function *glMultiTexCoord3fARB* that comes with ARB’s Multitexture extension:

-

  ```
  // define the type of the function
  ALLEGRO_DEFINE_PROC_TYPE(void, MULTI_TEX_FUNC,
                           (GLenum, GLfloat, GLfloat, GLfloat));
  // declare the function pointer
  MULTI_TEX_FUNC glMultiTexCoord3fARB;
  // get the address of the function
  glMultiTexCoord3fARB = (MULTI_TEX_FUNC) al_get_opengl_proc_address(
                                                          "glMultiTexCoord3fARB");
  ```

If *glMultiTexCoord3fARB* is not NULL then it can be used as if it has been defined in the OpenGL core library.

*Note:* Under Windows, OpenGL functions may need a special calling convention, so it’s best to always use the ALLEGRO\_DEFINE\_PROC\_TYPE macro when declaring function pointer types for OpenGL functions.

Parameters:

name - The name of the symbol you want to link to.

## RETURN VALUE

A pointer to the symbol if available or NULL otherwise.
