.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_get_opengl_proc_address" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_get_opengl_proc_address - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include void *al_get_opengl_proc_address(const char *name) \f[R] .fi .SH DESCRIPTION .PP 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 .nf \f[C] // 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( \[dq]glMultiTexCoord3fARB\[dq]); \f[R] .fi .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 .PP A pointer to the symbol if available or NULL otherwise.