File: al_get_opengl_proc_address.3

package info (click to toggle)
allegro5 2%3A5.2.6.0-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 24,212 kB
  • sloc: ansic: 125,319; cpp: 15,781; objc: 4,579; python: 2,802; java: 2,254; javascript: 1,204; sh: 1,002; makefile: 51; perl: 37; xml: 25; pascal: 24
file content (54 lines) | stat: -rw-r--r-- 1,520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "al_get_opengl_proc_address" "3" "" "Allegro reference manual" ""
.hy
.SH NAME
.PP
al_get_opengl_proc_address \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_opengl.h>

void\ *al_get_opengl_proc_address(const\ char\ *name)
\f[]
.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[] that comes with
ARB\[aq]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(
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "glMultiTexCoord3fARB");
\f[]
.fi
.PP
If \f[I]glMultiTexCoord3fARB\f[] 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[] Under Windows, OpenGL functions may need a special
calling convention, so it\[aq]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.