.\" Automatically generated by Pandoc 3.5 .\" .TH "al_get_opengl_proc_address" "3" "" "Allegro reference manual" .SH NAME al_get_opengl_proc_address \- Allegro 5 API .SH SYNOPSIS .IP .EX #include \f[B]\f[R] void *al_get_opengl_proc_address(const char *name) .EE .SH DESCRIPTION Helper to get the address of an OpenGL symbol .PP Example: .PP How to get the function \f[I]glMultiTexCoord3fARB\f[R] that comes with ARB\[cq]s Multitexture extension: .IP .EX \f[I]// define the type of the function\f[R] ALLEGRO_DEFINE_PROC_TYPE(void, MULTI_TEX_FUNC, (GLenum, GLfloat, GLfloat, GLfloat)); \f[I]// declare the function pointer\f[R] MULTI_TEX_FUNC glMultiTexCoord3fARB; \f[I]// get the address of the function\f[R] glMultiTexCoord3fARB = (MULTI_TEX_FUNC) al_get_opengl_proc_address( \[dq]glMultiTexCoord3fARB\[dq]); .EE .PP If \f[I]glMultiTexCoord3fARB\f[R] is not NULL then it can be used as if it has been defined in the OpenGL core library. .RS .PP \f[I]Note:\f[R] Under Windows, OpenGL functions may need a special calling convention, so it\[cq]s best to always use the ALLEGRO_DEFINE_PROC_TYPE macro when declaring function pointer types for OpenGL functions. .RE .PP Parameters: .PP name \- The name of the symbol you want to link to. .SH RETURN VALUE A pointer to the symbol if available or NULL otherwise.