1 #include <exec/types.h>
2 #include <intuition/intuition.h>
3 #include <intuition/intuitionbase.h>
4 #include <intuition/screens.h>
6 #include <proto/exec.h>
8 #include <proto/intuition.h>
11 #include <GL/arosmesa.h>
16 AROSMesaContext glcont
=NULL
;
20 PFNGLUNIFORM4IPROC AROSglUniform4i
= NULL
;
24 printf("Getting pointer to glUniform4i...\n");
25 AROSglUniform4i
= AROSMesaGetProcAddress("glUniform4i");
27 if (AROSglUniform4i
!= NULL
)
29 printf("Pointer to glUniform4i acquired\n");
30 printf("Calling glUniform4i via pointer\n");
31 AROSglUniform4i(0, 0, 0, 0, 0);
32 printf("glUniform4i called\n");
36 printf("Failed to get pointer to glUniform4i");
40 struct Window
* win
= NULL
;
44 struct TagItem attributes
[ 14 ]; /* 14 should be more than enough :) */
47 // default config. Always used...
48 attributes
[i
].ti_Tag
= AMA_Window
; attributes
[i
++].ti_Data
= (IPTR
)win
;
49 attributes
[i
].ti_Tag
= AMA_Left
; attributes
[i
++].ti_Data
= win
->BorderLeft
;
50 attributes
[i
].ti_Tag
= AMA_Top
; attributes
[i
++].ti_Data
= win
->BorderTop
;
51 attributes
[i
].ti_Tag
= AMA_Bottom
; attributes
[i
++].ti_Data
= win
->BorderBottom
;
52 attributes
[i
].ti_Tag
= AMA_Right
; attributes
[i
++].ti_Data
= win
->BorderRight
;
55 attributes
[i
].ti_Tag
= AMA_DoubleBuf
; attributes
[i
++].ti_Data
= GL_TRUE
;
58 attributes
[i
].ti_Tag
= AMA_RGBMode
; attributes
[i
++].ti_Data
= GL_TRUE
;
61 attributes
[i
].ti_Tag
= TAG_DONE
;
63 glcont
= AROSMesaCreateContext(attributes
);
64 AROSMesaMakeCurrent(glcont
);
69 AROSMesaDestroyContext(glcont
);
75 ** Open a simple window using OpenWindowTagList()
77 int main(int argc
, char **argv
)
80 win
= OpenWindowTags(0,
81 WA_Title
, (IPTR
)"MesaGetProcAddress",
91 WA_SimpleRefresh
, TRUE
,
92 WA_NoCareRefresh
, TRUE
,
93 WA_IDCMP
, IDCMP_CLOSEWINDOW
,