-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenGLAda - Windows.html
441 lines (280 loc) · 11.6 KB
/
OpenGLAda - Windows.html
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>OpenGLAda - Windows</title>
<link href="/OpenGLAda/css/main.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="/OpenGLAda/css/prettify.css" media="screen" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/OpenGLAda/js/prettify.js"></script>
<script type="text/javascript" src="/OpenGLAda/js/lang-ada.js"></script>
</head>
<body onload="prettyPrint()">
<!--[if IE lte 8]>
<div class="ie-warning"><p>Yes, I'm aware that this site is broken on IE <=8. I don't care.</p></div>
<![endif]-->
<header>
<a href="https://github.com/flyx/OpenGLAda">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub">
</a>
<h1>OpenGLAda</h1>
<h2>Thick Ada Binding for OpenGL</h2>
</header>
<div id="main-row">
<nav>
<div id="main-nav">
<h3>Navigation</h3>
<ul>
<li>
<a href="/OpenGLAda/index.html">
<span>
Home
</span>
</a>
</li>
<li>
<a href="/OpenGLAda/api.html">
<span>
API Documentation
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl.html">
<span>
GL
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-types.html">
<span>
GL.Types
<br />
GL.Types.Colors
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-context.html">
<span>
GL.Context
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-immediate.html">
<span>
GL.Immediate
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-fixed.html">
<span>
GL.Fixed
<br />
GL.Fixed.Lighting
<br />
GL.Fixed.Matrix
<br />
GL.Fixed.Textures
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-objects.html">
<span>
GL.Objects
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-objects-textures.html">
<span>
GL.Objects.Textures
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-objects-shaders.html">
<span>
GL.Objects.Shaders
<br />
GL.Objects.Programs
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-attributes.html">
<span>
GL.Attributes
<br />
GL.Uniforms
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-buffers.html">
<span>
GL.Buffers
<br />
GL.Blending
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/glfw-v2.html">
<span>
GLFW (2.x)
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/glfw-v3.html">
<span>
GLFW (3+)
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/soil.html">
<span>
SOIL
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/ftgl.html">
<span>
FTGL
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/ft.html">
<span>
FT
</span>
</a>
</li>
<li class="api">
<a href="/OpenGLAda/gl-text.html">
<span>
GL.Text
</span>
</a>
</li>
<li>
<a href="/OpenGLAda/setup.html">
<span>
Setup Instructions
</span>
</a>
</li>
<li class="setup">
<a class="active"href="/OpenGLAda/setup/windows.html">
<span>
Windows
</span>
</a>
</li>
<li class="setup">
<a href="/OpenGLAda/setup/macos.html">
<span>
macOS
</span>
</a>
</li>
<li>
<a href="/OpenGLAda/mapping.html">
<span>
OpenGL Mapping
</span>
</a>
</li>
<li>
<a href="/OpenGLAda/assets/css/style.css">
<span>
</span>
</a>
</li>
</ul>
</div>
<div id="see-also">
<h3>See Also</h3>
<ul>
<li><a href="https://flyx.github.io/OpenCLAda/">OpenCLAda</a></li>
</ul>
</div>
</nav>
<article>
<h1 id="windows-setup">Windows Setup</h1>
<p><strong>General advice:</strong> Keep in mind that you need to spread the DLLs you link to
along with your binaries for them to work on other systems.</p>
<h2 id="gnat-gpl-2017">GNAT GPL 2017</h2>
<ul>
<li>Download and install GNAT GPL 2017 Windows x86 from
<a href="http://libre.adacore.com/">AdaCore’s Libre Site</a>. We assume you install it to <code class="highlighter-rouge">C:\GNAT\2017</code>. Make
sure the <code class="highlighter-rouge">bin</code> folder is in the <code class="highlighter-rouge">PATH</code> of your shell.</li>
<li>Download <em>32-bit Windows binaries</em> from the <a href="http://www.glfw.org/download.html">GLFW download section</a>
(tested with GLFW 3.2.1).</li>
<li>Open the zip folder and copy the file <code class="highlighter-rouge">glfw3.dll</code> from the <code class="highlighter-rouge">lib-mingw</code>
folder into <code class="highlighter-rouge">C:\GNAT\2017\lib</code>.</li>
<li>If you want to use FreeType, you need at least FreeType 2.7.1. There is an
<a href="https://github.com/ubawurinna/freetype-windows-binaries/">semi-official GitHub repository</a> which hosts current Windows binaries
known to work; get the <code class="highlighter-rouge">freetype.dll</code> file from the <code class="highlighter-rouge">win32</code> folder and copy
it into <code class="highlighter-rouge">C:\GNAT\2017\lib</code>.</li>
<li>The FreeType library requires the Visual C++ Redistributable libraries for
Visual Studio 2017. Download and install the <code class="highlighter-rouge">x86</code> version from <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">here</a> and
install it.</li>
<li>
<p>Open your shell and navigate to the root folder of OpenGLAda. Execute:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ gprbuild -p -P opengl-test.gpr -XWindowing_System=windows
</code></pre></div> </div>
<p>This should produce executables in the <code class="highlighter-rouge">bin</code> folder inside OpenGLAda.</p>
</li>
<li>You can now either add <code class="highlighter-rouge">C:\GNAT\2017\lib</code> to your <code class="highlighter-rouge">PATH</code> or copy the
DLLs from there to the <code class="highlighter-rouge">bin</code> folder. One of those two options is
necessary so that the binaries can find the dll.</li>
</ul>
<h2 id="tdm-gcc-64bit">TDM-GCC 64bit</h2>
<p>These instructions are for building 64bit binaries on Windows.</p>
<ul>
<li>Download and install the 64bit TDM-GCC compiler from <a href="http://tdm-gcc.tdragon.net/download">here</a>. In the
installation wizard, make sure to check the (by default unchecked) <em>ada</em>
option. Make sure the <code class="highlighter-rouge">bin</code> folder is in the <code class="highlighter-rouge">PATH</code> of your shell.</li>
</ul>
<!-- These currently do not work – uncomment when fixed
* Download `gpr-tools.zip` from [here][16] and extract its contents to the
folder where you installed TDM-GCC (e.g. `C:\TDM-GCC-64\`).
-->
<ul>
<li>Download the <em>64-bit Windows binaries</em> from the <a href="http://www.glfw.org/download.html">GLFW download section</a>
(tested with GLFW 3.2.1).</li>
<li>Open the zip folder and copy the file <code class="highlighter-rouge">glfw3.dll</code> from the <code class="highlighter-rouge">lib-mingw-w64</code>
folder into <code class="highlighter-rouge">C:\TDM-GCC-64\lib</code>.</li>
<li>If you want to use FreeType, you need at least FreeType 2.7.1. There is an
<a href="https://github.com/ubawurinna/freetype-windows-binaries/">semi-official GitHub repository</a> which hosts current Windows binaries
known to work; get the <code class="highlighter-rouge">freetype.dll</code> file from the <code class="highlighter-rouge">win64</code> folder and copy
it into <code class="highlighter-rouge">C:\TDM-GCC-64\lib</code>.</li>
<li>The FreeType library requires the Visual C++ Redistributable libraries for
Visual Studio 2017. Download and install the <code class="highlighter-rouge">x64</code> version from <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">here</a> and
install it.</li>
<li>
<p>Open your shell and navigate to the root folder of OpenGLAda. Execute:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ gnatmake -p -P opengl-test.gpr -XWindowing_System=windows
$ gnatmake -p -P opengl-text-test.gpr -XWindowing_System=quartz
</code></pre></div> </div>
<p>This should produce executables in the <code class="highlighter-rouge">bin</code> folder inside OpenGLAda.</p>
</li>
<li>You can now either add <code class="highlighter-rouge">C:\TDM-GCC-64\lib</code> to your <code class="highlighter-rouge">PATH</code> or copy the
DLLs from there to the <code class="highlighter-rouge">bin</code> folder. One of those two options is
necessary so that the binary can find the dll.</li>
</ul>
</article>
</div>
<footer>
<p>Copyright © 2012-2017 by <a href="http://flyx.org">Felix Krause</a>. Powered by <a href="http://pages.github.com/">GitHub Pages</a></p>
</footer>
</body>
</html>