1 // WTFPL or Public Domain, on your choice
2 module iv
.glbinds
.util
/*is aliced*/;
3 nothrow @trusted @nogc:
9 //enum GL_PI = 3.14159265358979323846;
10 enum GL_PI
= 3.1415926535897932384626433832795;
13 // ////////////////////////////////////////////////////////////////////////// //
14 uint nextPOTU32 (uint x
) nothrow @safe @nogc {
23 if (x
!= 0 && (x
&(x
-1)) == 0) res
&= ~(res
>>1); else ++res
;
28 // ////////////////////////////////////////////////////////////////////////// //
29 void oglSetup2D(bool upsideDown
=false) (int winWidth
, int winHeight
) {
30 glViewport(0, 0, winWidth
, winHeight
);
33 glBlendFunc(GL_SRC_ALPHA
, GL_ONE_MINUS_SRC_ALPHA
);
34 glDisable(GL_LINE_SMOOTH
);
35 glDisable(GL_POINT_SMOOTH
);
36 glDisable(GL_DEPTH_TEST
);
37 glDisable(GL_TEXTURE_2D
);
38 glDisable(GL_LIGHTING
);
40 glDisable(GL_STENCIL_TEST
);
41 glDisable(GL_SCISSOR_TEST
);
42 glDisable(GL_CULL_FACE
);
44 glMatrixMode(GL_PROJECTION
);
46 static if (upsideDown
) {
47 glOrtho(0, winWidth
, 0, winHeight
, -1, 1); // set origin to bottom left
49 glOrtho(0, winWidth
, winHeight
, 0, -1, 1); // set origin to top left
52 glMatrixMode(GL_MODELVIEW
);
55 glClearColor(0, 0, 0, 0);
56 glColor4f(1, 1, 1, 1);
60 // ////////////////////////////////////////////////////////////////////////// //
61 // replacement for `gluPerspective()`
62 // sets the frustum to perspective mode.
63 // fovY - Field of vision in degrees in the y direction
64 // aspect - Aspect ratio of the viewport
65 // zNear - The near clipping distance
66 // zFar - The far clipping distance
68 void oglPerspective (GLdouble fovY, GLdouble aspect, GLdouble zNear, GLdouble zFar) nothrow @trusted @nogc {
69 import core.stdc.math : tan;
71 //const GLdouble pi = 3.1415926535897932384626433832795;
72 //double fW, fH; // half of the size of the x and y clipping planes.
73 // calculate the distance from 0 of the y clipping plane.
74 // basically trig to calculate position of clipper at zNear.
75 // Note: tan(double) uses radians but OpenGL works in degrees so we convert
76 // degrees to radians by dividing by 360 then multiplying by PI
77 //fH = tan((fovY/2)/180*PI)*zNear;
78 immutable GLdouble fH = tan(fovY/360.0*GL_PI)*zNear;
79 // calculate the distance from 0 of the x clipping plane based on the aspect ratio
80 immutable GLdouble fW = fH*aspect;
81 // finally call glFrustum, this is all gluPerspective does anyway!
82 // this is why we calculate half the distance between the clipping planes,
83 // glFrustum takes an offset from zero for each clipping planes distance (saves 2 divides)
84 glFrustum(-fW, fW, -fH, fH, zNear, zFar);
89 // ////////////////////////////////////////////////////////////////////////// //
90 // replacement for `gluLookAt()`
93 GLfloat eyex, GLfloat eyey, GLfloat eyez,
94 GLfloat centerx, GLfloat centery, GLfloat centerz,
95 GLfloat upx, GLfloat upy, GLfloat upz
97 import core.math : sqrt;
100 GLfloat[3] x = void, y = void, z = void;
102 // make rotation matrix
104 z.ptr[0] = eyex-centerx;
105 z.ptr[1] = eyey-centery;
106 z.ptr[2] = eyez-centerz;
107 mag = sqrt(z.ptr[0]*z.ptr[0]+z.ptr[1]*z.ptr[1]+z.ptr[2]*z.ptr[2]);
117 // X vector = Y cross Z
118 x.ptr[0] = y.ptr[1]*z.ptr[2]-y.ptr[2]*z.ptr[1];
119 x.ptr[1] = -y.ptr[0]*z.ptr[2]+y.ptr[2]*z.ptr[0];
120 x.ptr[2] = y.ptr[0]*z.ptr[1]-y.ptr[1]*z.ptr[0];
121 // Recompute Y = Z cross X
122 y.ptr[0] = z.ptr[1]*x.ptr[2]-z.ptr[2]*x.ptr[1];
123 y.ptr[1] = -z.ptr[0]*x.ptr[2]+z.ptr[2]*x.ptr[0];
124 y.ptr[2] = z.ptr[0]*x.ptr[1]-z.ptr[1]*x.ptr[0];
126 /* cross product gives area of parallelogram, which is < 1.0 for
127 * non-perpendicular unit-length vectors; so normalize x, y here
129 mag = sqrt(x.ptr[0]*x.ptr[0]+x.ptr[1]*x.ptr[1]+x.ptr[2]*x.ptr[2]);
136 mag = sqrt(y.ptr[0]*y.ptr[0]+y.ptr[1]*y.ptr[1]+y.ptr[2]*y.ptr[2]);
143 m.ptr[0*4+0] = x.ptr[0];
144 m.ptr[1*4+0] = x.ptr[1];
145 m.ptr[2*4+0] = x.ptr[2];
147 m.ptr[0*4+1] = y.ptr[0];
148 m.ptr[1*4+1] = y.ptr[1];
149 m.ptr[2*4+1] = y.ptr[2];
151 m.ptr[0*4+2] = z.ptr[0];
152 m.ptr[1*4+2] = z.ptr[1];
153 m.ptr[2*4+2] = z.ptr[2];
160 glMultMatrixf(m.ptr);
162 // translate Eye to Origin
163 glTranslatef(-eyex, -eyey, -eyez);
168 // ////////////////////////////////////////////////////////////////////////// //
169 private void normalize(GLfloat
* v
) {
170 import core
.math
: sqrt
;
171 GLfloat r
= sqrt(v
[0]*v
[0]+v
[1]*v
[1]+v
[2]*v
[2]);
180 private void cross(GLfloat
* v1
, GLfloat
* v2
, GLfloat
* result
) {
181 result
[0] = v1
[1]*v2
[2]-v1
[2]*v2
[1];
182 result
[1] = v1
[2]*v2
[0]-v1
[0]*v2
[2];
183 result
[2] = v1
[0]*v2
[1]-v1
[1]*v2
[0];
187 // ////////////////////////////////////////////////////////////////////////// //
188 // make m an identity matrix
189 void oglMakeIdentity (GLdouble
* m
) {
190 pragma(inline
, true);
191 m
[0+4*0] = 1; m
[0+4*1] = 0; m
[0+4*2] = 0; m
[0+4*3] = 0;
192 m
[1+4*0] = 0; m
[1+4*1] = 1; m
[1+4*2] = 0; m
[1+4*3] = 0;
193 m
[2+4*0] = 0; m
[2+4*1] = 0; m
[2+4*2] = 1; m
[2+4*3] = 0;
194 m
[3+4*0] = 0; m
[3+4*1] = 0; m
[3+4*2] = 0; m
[3+4*3] = 1;
198 void oglMakeIdentity (GLfloat
* m
) {
199 pragma(inline
, true);
200 m
[0+4*0] = 1; m
[0+4*1] = 0; m
[0+4*2] = 0; m
[0+4*3] = 0;
201 m
[1+4*0] = 0; m
[1+4*1] = 1; m
[1+4*2] = 0; m
[1+4*3] = 0;
202 m
[2+4*0] = 0; m
[2+4*1] = 0; m
[2+4*2] = 1; m
[2+4*3] = 0;
203 m
[3+4*0] = 0; m
[3+4*1] = 0; m
[3+4*2] = 0; m
[3+4*3] = 1;
207 void oglMulMatVec (const(GLdouble
)* matrix
, const(GLdouble
)* vin
, GLdouble
* vout
) {
208 foreach (immutable i
; 0..4) {
210 vin
[0]*matrix
[0*4+i
]+
211 vin
[1]*matrix
[1*4+i
]+
212 vin
[2]*matrix
[2*4+i
]+
213 vin
[3]*matrix
[3*4+i
];
218 // inverse = invert(src)
219 bool oglMatInvert (const(GLdouble
)* src
, GLdouble
* inverse
) {
220 import core
.math
: fabs;
222 GLdouble
[4][4] temp
= void;
224 foreach (immutable i
; 0..4) {
225 foreach (immutable j
; 0..4) {
226 temp
.ptr
[i
].ptr
[j
] = src
[i
*4+j
];
230 oglMakeIdentity(inverse
);
232 foreach (immutable i
; 0..4) {
233 // look for largest element in column
235 foreach (immutable j
; i
+1..4) {
236 if (fabs(temp
.ptr
[j
].ptr
[i
]) > fabs(temp
.ptr
[i
].ptr
[i
])) swap
= j
;
241 foreach (immutable k
; 0..4) {
242 GLdouble tmp
= temp
.ptr
[i
].ptr
[k
];
243 temp
.ptr
[i
].ptr
[k
] = temp
.ptr
[swap
].ptr
[k
];
244 temp
.ptr
[swap
].ptr
[k
] = tmp
;
246 tmp
= inverse
[i
*4+k
];
247 inverse
[i
*4+k
] = inverse
[swap
*4+k
];
248 inverse
[swap
*4+k
] = tmp
;
252 if (temp
.ptr
[i
].ptr
[i
] == 0) return false; // no non-zero pivot: the matrix is singular, which shouldn't happen -- this means the user gave us a bad matrix
255 GLdouble t
= 1.0/temp
.ptr
[i
].ptr
[i
];
256 foreach (immutable k
; 0..4) {
257 temp
.ptr
[i
].ptr
[k
] *= t
;
262 foreach (immutable j
; 0..4) {
264 immutable GLdouble t
= temp
.ptr
[j
].ptr
[i
];
265 foreach (immutable k
; 0..4) {
266 temp
.ptr
[j
].ptr
[k
] -= temp
.ptr
[i
].ptr
[k
]*t
;
267 inverse
[j
*4+k
] -= inverse
[i
*4+k
]*t
;
277 void oglMulMatMat (const(GLdouble
)* a
, const(GLdouble
)* b
, GLdouble
* res
) {
278 foreach (immutable i
; 0..4) {
279 foreach (immutable j
; 0..4) {
290 // ////////////////////////////////////////////////////////////////////////// //
291 void oglOrtho2D (GLdouble left
, GLdouble right
, GLdouble bottom
, GLdouble top
) {
292 pragma(inline
, true);
293 glOrtho(left
, right
, bottom
, top
, -1, 1);
297 void oglPerspective (GLdouble fovy
, GLdouble aspect
, GLdouble zNear
, GLdouble zFar
) {
298 import core
.math
: cos
, sin
;
299 GLdouble radians
= fovy
/2.0*GL_PI
/180.0;
300 GLdouble deltaZ
= zFar
-zNear
;
301 GLdouble sine
= sin(radians
);
302 if (deltaZ
== 0 || sine
== 0 || aspect
== 0) return;
303 GLdouble cotangent
= cos(radians
)/sine
;
304 GLdouble
[4][4] m
= void;
305 oglMakeIdentity(&m
[0][0]);
306 m
.ptr
[0].ptr
[0] = cotangent
/aspect
;
307 m
.ptr
[1].ptr
[1] = cotangent
;
308 m
.ptr
[2].ptr
[2] = -(zFar
+zNear
)/deltaZ
;
309 m
.ptr
[2].ptr
[3] = -1;
310 m
.ptr
[3].ptr
[2] = -2*zNear
*zFar
/deltaZ
;
312 glMultMatrixd(&m
[0][0]);
316 void oglNormalZTests () {
317 glDepthFunc(GL_LESS
); // default would be GL_LESS
318 glClearDepth(1.0f); // default would be 1.0f
319 // OpenGL 4.5 feature; see "GL_ARB_clip_control" extension
320 glClipControl(GL_LOWER_LEFT
, GL_NEGATIVE_ONE_TO_ONE
);
321 //glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE); // actually, this is better even for "normal" cases
325 void oglReversedZTests () {
326 glDepthFunc(GL_GREATER
); // default would be GL_LESS
327 glClearDepth(0.0f); // default would be 1.0f
328 glClipControl(GL_LOWER_LEFT
, GL_ZERO_TO_ONE
);
332 // see https://nlguillemot.wordpress.com/2016/12/07/reversed-z-in-opengl/
333 void oglPerspectiveReversedZ (GLdouble fovy
, GLdouble aspect
, GLdouble zNear
) {
335 import std
.math
: tan
;
336 immutable GLdouble f
= 1.0/tan(deg2rad(fovy
)/2.0); // 1.0 / tan(X) == cotangent(X)
337 //GLdouble aspect = cast(float)GWidth/cast(float)GHeight;
338 // infinite perspective matrix reversed
339 immutable GLdouble
[16] projMat
= [
340 f
/aspect
, 0.0, 0.0, 0.0,
343 0.0, 0.0, zNear
, 0.0,
345 //glMatrixMode(GL_PROJECTION);
347 glMultMatrixd(projMat
.ptr
);
349 import core
.math
: cos
, sin
;
350 GLdouble radians
= fovy
/2.0*GL_PI
/180.0;
351 GLdouble sine
= sin(radians
);
352 if (sine
== 0 || aspect
== 0) return;
353 GLdouble cotangent
= cos(radians
)/sine
;
354 GLdouble
[16] m
= 0.0;
355 m
.ptr
[0] = cotangent
/aspect
;
356 m
.ptr
[5] = cotangent
;
359 glMultMatrixd(m
.ptr
);
365 GLdouble eyex
, GLdouble eyey
, GLdouble eyez
, GLdouble centerx
,
366 GLdouble centery
, GLdouble centerz
, GLdouble upx
, GLdouble upy
,
370 GLfloat
[3] forward
= void, side
= void, up
= void;
372 forward
.ptr
[0] = centerx
-eyex
;
373 forward
.ptr
[1] = centery
-eyey
;
374 forward
.ptr
[2] = centerz
-eyez
;
380 normalize(forward
.ptr
);
382 // side = forward x up
383 cross(forward
.ptr
, up
.ptr
, side
.ptr
);
386 // recompute up as: up = side x forward
387 cross(side
.ptr
, forward
.ptr
, up
.ptr
);
389 GLfloat
[4][4] m
= void;
390 oglMakeIdentity(&m
[0][0]);
392 m
.ptr
[0].ptr
[0] = side
.ptr
[0];
393 m
.ptr
[1].ptr
[0] = side
.ptr
[1];
394 m
.ptr
[2].ptr
[0] = side
.ptr
[2];
396 m
.ptr
[0].ptr
[1] = up
.ptr
[0];
397 m
.ptr
[1].ptr
[1] = up
.ptr
[1];
398 m
.ptr
[2].ptr
[1] = up
.ptr
[2];
400 m
.ptr
[0].ptr
[2] = -forward
.ptr
[0];
401 m
.ptr
[1].ptr
[2] = -forward
.ptr
[1];
402 m
.ptr
[2].ptr
[2] = -forward
.ptr
[2];
404 glMultMatrixf(&m
[0][0]);
405 glTranslated(-eyex
, -eyey
, -eyez
);
410 GLdouble objx
, GLdouble objy
, GLdouble objz
,
411 const(GLdouble
)* modelMatrix
,
412 const(GLdouble
)* projMatrix
,
413 const(GLint
)[] viewport
,
414 GLdouble
* winx
, GLdouble
* winy
, GLdouble
* winz
)
416 if (viewport
.length
< 4 || modelMatrix
is null || projMatrix
is null) return false;
418 GLdouble
[4] vin
= void, vout
= void;
425 oglMulMatVec(modelMatrix
, vin
.ptr
, vout
.ptr
);
426 oglMulMatVec(projMatrix
, vout
.ptr
, vin
.ptr
);
427 if (vin
.ptr
[3] == 0.0) return false;
429 if (winx
!is null || winy
!is null || winz
!is null) {
430 vin
.ptr
[0] /= vin
.ptr
[3];
431 vin
.ptr
[1] /= vin
.ptr
[3];
432 vin
.ptr
[2] /= vin
.ptr
[3];
434 // map x, y and z to range 0-1
435 vin
.ptr
[0] = vin
.ptr
[0]*0.5+0.5;
436 vin
.ptr
[1] = vin
.ptr
[1]*0.5+0.5;
437 vin
.ptr
[2] = vin
.ptr
[2]*0.5+0.5;
439 // map x,y to viewport
440 vin
.ptr
[0] = vin
.ptr
[0]*viewport
.ptr
[2]+viewport
.ptr
[0];
441 vin
.ptr
[1] = vin
.ptr
[1]*viewport
.ptr
[3]+viewport
.ptr
[1];
443 if (winx
!is null) *winx
= vin
.ptr
[0];
444 if (winy
!is null) *winy
= vin
.ptr
[1];
445 if (winz
!is null) *winz
= vin
.ptr
[2];
453 GLdouble winx
, GLdouble winy
, GLdouble winz
,
454 const(GLdouble
)* modelMatrix
,
455 const(GLdouble
)* projMatrix
,
456 const(GLint
)[] viewport
,
457 GLdouble
* objx
, GLdouble
* objy
, GLdouble
* objz
)
459 if (viewport
.length
< 4 || modelMatrix
is null || projMatrix
is null) return false;
461 GLdouble
[16] finalMatrix
= void;
462 GLdouble
[4] vin
= void, vout
= void;
464 oglMulMatMat(modelMatrix
, projMatrix
, finalMatrix
.ptr
);
465 if (!oglMatInvert(finalMatrix
.ptr
, finalMatrix
.ptr
)) return false;
472 // map x and y from window coordinates
473 vin
.ptr
[0] = (vin
.ptr
[0]-viewport
.ptr
[0])/viewport
.ptr
[2];
474 vin
.ptr
[1] = (vin
.ptr
[1]-viewport
.ptr
[1])/viewport
.ptr
[3];
476 // map to range -1 to 1
477 vin
.ptr
[0] = vin
.ptr
[0]*2.0-1.0;
478 vin
.ptr
[1] = vin
.ptr
[1]*2.0-1.0;
479 vin
.ptr
[2] = vin
.ptr
[2]*2.0-1.0;
481 oglMulMatVec(finalMatrix
.ptr
, vin
.ptr
, vout
.ptr
);
482 if (vout
.ptr
[3] == 0.0) return false;
484 if (objx
!is null || objy
!is null || objz
!is null) {
485 vout
.ptr
[0] /= vout
.ptr
[3];
486 vout
.ptr
[1] /= vout
.ptr
[3];
487 vout
.ptr
[2] /= vout
.ptr
[3];
488 if (objx
!is null) *objx
= vout
.ptr
[0];
489 if (objy
!is null) *objy
= vout
.ptr
[1];
490 if (objz
!is null) *objz
= vout
.ptr
[2];
498 GLdouble winx
, GLdouble winy
, GLdouble winz
, GLdouble clipw
,
499 const(GLdouble
)* modelMatrix
,
500 const(GLdouble
)* projMatrix
,
501 const(GLint
)[] viewport
,
502 GLclampd near
, GLclampd far
,
503 GLdouble
* objx
, GLdouble
* objy
, GLdouble
* objz
, GLdouble
* objw
)
505 if (viewport
.length
< 4 || modelMatrix
is null || projMatrix
is null) return false;
507 GLdouble
[16] finalMatrix
= void;
508 GLdouble
[4] vin
= void, vout
= void;
510 oglMulMatMat(modelMatrix
, projMatrix
, finalMatrix
.ptr
);
511 if (!oglMatInvert(finalMatrix
.ptr
, finalMatrix
.ptr
)) return false;
518 // map x and y from window coordinates
519 vin
.ptr
[0] = (vin
.ptr
[0]-viewport
.ptr
[0])/viewport
.ptr
[2];
520 vin
.ptr
[1] = (vin
.ptr
[1]-viewport
.ptr
[1])/viewport
.ptr
[3];
521 vin
.ptr
[2] = (vin
.ptr
[2]-near
)/(far
-near
);
523 // map to range -1 to 1
524 vin
.ptr
[0] = vin
.ptr
[0]*2.0-1.0;
525 vin
.ptr
[1] = vin
.ptr
[1]*2.0-1.0;
526 vin
.ptr
[2] = vin
.ptr
[2]*2.0-1.0;
528 oglMulMatVec(finalMatrix
.ptr
, vin
.ptr
, vout
.ptr
);
529 if (vout
.ptr
[3] == 0.0) return false;
531 if (objx
!is null || objy
!is null || objz
!is null && objw
!is null) {
532 if (objx
!is null) *objx
= vout
.ptr
[0];
533 if (objy
!is null) *objy
= vout
.ptr
[1];
534 if (objz
!is null) *objz
= vout
.ptr
[2];
535 if (objw
!is null) *objw
= vout
.ptr
[3];
542 bool oglPickMatrix (GLdouble x
, GLdouble y
, GLdouble deltax
, GLdouble deltay
, const(GLint
)[] viewport
) {
543 if (deltax
<= 0 || deltay
<= 0 || viewport
.length
< 4) return false;
545 // translate and scale the picked region to the entire window
546 glTranslatef((viewport
.ptr
[2]-2*(x
-viewport
.ptr
[0]))/deltax
, (viewport
.ptr
[3]-2*(y
-viewport
.ptr
[1]))/deltay
, 0);
547 glScalef(viewport
.ptr
[2]/deltax
, viewport
.ptr
[3]/deltay
, 1.0);
553 // ////////////////////////////////////////////////////////////////////////// //
554 version(LittleEndian
) {
555 public enum glFont10Width
= 10;
556 public enum glFont10Height
= 10;
558 public __gshared
immutable ushort[256*10] glFont10
= [
559 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0078,0x0084,0x0132,0x017a,0x0102,0x014a,0x0102,0x00fc,
560 0x0000,0x0000,0x0078,0x00fc,0x01ce,0x0186,0x01fe,0x01b6,0x01fe,0x00fc,0x0000,0x0000,0x0010,0x0038,0x007c,0x00fe,0x01ff,0x01ff,0x01ff,
561 0x00ee,0x0000,0x0000,0x0010,0x0038,0x007c,0x00fe,0x01ff,0x00fe,0x007c,0x0038,0x0010,0x0000,0x0038,0x0010,0x00d6,0x01ff,0x00fe,0x0038,
562 0x007c,0x0038,0x0000,0x0000,0x0038,0x0010,0x00d6,0x01ff,0x01ff,0x00fe,0x007c,0x0038,0x0010,0x0000,0x0000,0x0000,0x0030,0x0078,0x0078,
563 0x0030,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x03ff,0x03cf,0x0387,0x0387,0x03cf,0x03ff,0x03ff,0x03ff,0x0000,0x0000,0x0078,0x00cc,0x0084,
564 0x0084,0x00cc,0x0078,0x0000,0x0000,0x03ff,0x03ff,0x0387,0x0333,0x037b,0x037b,0x0333,0x0387,0x03ff,0x03ff,0x0000,0x00f0,0x0198,0x0198,
565 0x0198,0x00fa,0x001e,0x000e,0x001e,0x0000,0x0000,0x0030,0x00fc,0x0030,0x0078,0x00cc,0x00cc,0x00cc,0x0078,0x0000,0x0000,0x0060,0x00f0,
566 0x0070,0x0010,0x0014,0x0014,0x001c,0x0018,0x0010,0x0000,0x0080,0x01c4,0x00ce,0x0046,0x0042,0x0042,0x007e,0x007e,0x0000,0x0000,0x0030,
567 0x01b6,0x0078,0x01ce,0x01ce,0x0078,0x01b6,0x0030,0x0000,0x0000,0x0040,0x0060,0x0070,0x0078,0x007c,0x0078,0x0070,0x0060,0x0040,0x0000,
568 0x0004,0x000c,0x001c,0x003c,0x007c,0x003c,0x001c,0x000c,0x0004,0x0000,0x0030,0x0078,0x00fc,0x0030,0x0030,0x00fc,0x0078,0x0030,0x0000,
569 0x0000,0x0000,0x00cc,0x0000,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x0000,0x0000,0x0000,0x0036,0x0036,0x0036,0x00f6,0x01b6,0x01b6,0x00fe,
570 0x0000,0x0000,0x0000,0x007c,0x0006,0x007c,0x00c6,0x007c,0x00c0,0x007c,0x0000,0x0000,0x0000,0x01fe,0x01fe,0x01fe,0x0000,0x0000,0x0000,
571 0x0000,0x0000,0x03ff,0x0030,0x0078,0x00fc,0x0030,0x0030,0x00fc,0x0078,0x0030,0x0000,0x0000,0x0030,0x0030,0x0030,0x0030,0x0030,0x00fc,
572 0x0078,0x0030,0x0000,0x0000,0x0030,0x0078,0x00fc,0x0030,0x0030,0x0030,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x0018,0x000c,0x01fe,
573 0x000c,0x0018,0x0000,0x0000,0x0000,0x0000,0x0000,0x0060,0x00c0,0x01fe,0x00c0,0x0060,0x0000,0x0000,0x0000,0x0000,0x01fe,0x0180,0x0180,
574 0x0180,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0044,0x00c6,0x01ff,0x00c6,0x0044,0x0000,0x0000,0x0000,0x0000,0x0000,0x01ff,
575 0x00fe,0x007c,0x0038,0x0010,0x0000,0x0000,0x0000,0x0000,0x0000,0x0010,0x0038,0x007c,0x00fe,0x01ff,0x0000,0x0000,0x0000,0x0000,0x0000,
576 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0000,0x0030,0x0030,0x0078,0x0078,0x0030,0x0000,0x0000,0x0000,
577 0x0000,0x0000,0x0000,0x0000,0x006c,0x006c,0x006c,0x0000,0x0000,0x0000,0x006c,0x006c,0x01ff,0x006c,0x01ff,0x006c,0x006c,0x0000,0x0000,
578 0x0010,0x007c,0x00d6,0x0016,0x007c,0x00d0,0x00d6,0x007c,0x0010,0x0000,0x0000,0x0000,0x00c6,0x0066,0x0030,0x0018,0x00cc,0x00c6,0x0000,
579 0x0000,0x0000,0x0076,0x00cc,0x00cc,0x007e,0x00cc,0x00cc,0x0070,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0060,0x0030,0x0038,
580 0x0000,0x0000,0x0000,0x0018,0x0030,0x0060,0x0060,0x0060,0x0030,0x0018,0x0000,0x0000,0x0000,0x0060,0x0030,0x0018,0x0018,0x0018,0x0030,
581 0x0060,0x0000,0x0000,0x0000,0x0000,0x00cc,0x0078,0x01fe,0x0078,0x00cc,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x00fc,0x0030,
582 0x0030,0x0000,0x0000,0x0000,0x0060,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fc,
583 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0180,0x00c0,0x0060,
584 0x0030,0x0018,0x000c,0x0006,0x0000,0x0000,0x0000,0x007c,0x00e6,0x00f6,0x00fe,0x00de,0x00ce,0x007c,0x0000,0x0000,0x0000,0x00fc,0x0030,
585 0x0030,0x0030,0x0030,0x0070,0x0030,0x0000,0x0000,0x0000,0x00fe,0x00c6,0x0060,0x003c,0x0006,0x00c6,0x007c,0x0000,0x0000,0x0000,0x007c,
586 0x00c6,0x0006,0x001c,0x0006,0x00c6,0x007c,0x0000,0x0000,0x0000,0x001e,0x000c,0x00fe,0x00cc,0x006c,0x003c,0x001c,0x0000,0x0000,0x0000,
587 0x007c,0x00c6,0x0006,0x00fc,0x00c0,0x00c0,0x00fe,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00fc,0x00c0,0x0060,0x003c,0x0000,0x0000,
588 0x0000,0x0030,0x0030,0x0018,0x000c,0x0006,0x00c6,0x00fe,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x007c,0x00c6,0x00c6,0x007c,0x0000,
589 0x0000,0x0000,0x0078,0x000c,0x0006,0x007e,0x00c6,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0030,0x0030,0x0000,0x0000,0x0030,0x0030,0x0000,
590 0x0000,0x0000,0x0060,0x0030,0x0030,0x0000,0x0000,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x000c,0x0018,0x0030,0x0060,0x0030,0x0018,
591 0x000c,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fc,0x0000,0x00fc,0x0000,0x0000,0x0000,0x0000,0x0000,0x0060,0x0030,0x0018,0x000c,0x0018,
592 0x0030,0x0060,0x0000,0x0000,0x0030,0x0000,0x0030,0x0018,0x000c,0x000c,0x00cc,0x0078,0x0000,0x0000,0x0000,0x00fc,0x0180,0x019e,0x01b6,
593 0x019e,0x0186,0x00fc,0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00c6,0x00fe,0x00c6,0x00c6,0x007c,0x0000,0x0000,0x0000,0x00fc,0x00c6,0x00c6,
594 0x00fc,0x00c6,0x00c6,0x00fc,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c0,0x00c0,0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,0x00f8,0x00cc,
595 0x00c6,0x00c6,0x00c6,0x00cc,0x00f8,0x0000,0x0000,0x0000,0x00fe,0x00c0,0x00c0,0x00fc,0x00c0,0x00c0,0x00fe,0x0000,0x0000,0x0000,0x00c0,
596 0x00c0,0x00c0,0x00fc,0x00c0,0x00c0,0x00fe,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00ce,0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,
597 0x00c6,0x00c6,0x00c6,0x00fe,0x00c6,0x00c6,0x00c6,0x0000,0x0000,0x0000,0x0078,0x0030,0x0030,0x0030,0x0030,0x0030,0x0078,0x0000,0x0000,
598 0x0000,0x0078,0x00cc,0x00cc,0x000c,0x000c,0x000c,0x001c,0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00cc,0x00f8,0x00cc,0x00c6,0x00c6,0x0000,
599 0x0000,0x0000,0x00fe,0x00c0,0x00c0,0x00c0,0x00c0,0x00c0,0x00c0,0x0000,0x0000,0x0000,0x0186,0x0186,0x0186,0x01b6,0x01fe,0x01ce,0x0186,
600 0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00ce,0x00de,0x00f6,0x00e6,0x00c6,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x00c6,0x00c6,
601 0x007c,0x0000,0x0000,0x0000,0x00c0,0x00c0,0x00c0,0x00fc,0x00c6,0x00c6,0x00fc,0x0000,0x0000,0x000e,0x007c,0x00ce,0x00c6,0x00c6,0x00c6,
602 0x00c6,0x007c,0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00cc,0x00fc,0x00c6,0x00c6,0x00fc,0x0000,0x0000,0x0000,0x007c,0x00c6,0x0006,0x007c,
603 0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x01fe,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,
604 0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x0000,0x0000,0x0010,0x0038,0x006c,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x0000,0x0000,0x0186,0x01ce,
605 0x01fe,0x01b6,0x0186,0x0186,0x0186,0x0000,0x0000,0x0000,0x0186,0x00cc,0x0078,0x0030,0x0078,0x00cc,0x0186,0x0000,0x0000,0x0000,0x0030,
606 0x0030,0x0030,0x0078,0x00cc,0x0186,0x0186,0x0000,0x0000,0x0000,0x00fe,0x00c0,0x0060,0x0030,0x0018,0x000c,0x00fe,0x0000,0x0000,0x0000,
607 0x0078,0x0060,0x0060,0x0060,0x0060,0x0060,0x0078,0x0000,0x0000,0x0000,0x0000,0x000c,0x0018,0x0030,0x0060,0x00c0,0x0180,0x0000,0x0000,
608 0x0000,0x0078,0x0018,0x0018,0x0018,0x0018,0x0018,0x0078,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00c6,0x006c,0x0038,0x0010,0x0000,
609 0x0000,0x03ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0018,0x0030,0x0070,
610 0x0000,0x0000,0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fc,0x00c6,0x00c6,0x00c6,0x00fc,0x00c0,
611 0x00c0,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x007e,0x00c6,0x00c6,0x00c6,0x007e,
612 0x0006,0x0006,0x0000,0x0000,0x0000,0x007c,0x00c0,0x00fe,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x0060,0x0060,0x0060,0x00f8,
613 0x0060,0x0060,0x003c,0x0000,0x007c,0x0006,0x007e,0x00c6,0x00c6,0x00c6,0x007e,0x0000,0x0000,0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00c6,
614 0x00c6,0x00fc,0x00c0,0x00c0,0x0000,0x0000,0x0000,0x0078,0x0030,0x0030,0x0030,0x0070,0x0000,0x0030,0x0000,0x0070,0x0018,0x0018,0x0018,
615 0x0018,0x0018,0x0038,0x0000,0x0018,0x0000,0x0000,0x0000,0x00c6,0x00cc,0x00f8,0x00cc,0x00c6,0x00c0,0x00c0,0x0000,0x0000,0x0000,0x001c,
616 0x0030,0x0030,0x0030,0x0030,0x0030,0x0070,0x0000,0x0000,0x0000,0x0186,0x01b6,0x01b6,0x01fe,0x00cc,0x0000,0x0000,0x0000,0x0000,0x0000,
617 0x00c6,0x00c6,0x00c6,0x00c6,0x00fc,0x0000,0x0000,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0000,
618 0x00c0,0x00c0,0x00fc,0x00c6,0x00c6,0x00fc,0x0000,0x0000,0x0000,0x0000,0x0007,0x0006,0x007e,0x00c6,0x00c6,0x007e,0x0000,0x0000,0x0000,
619 0x0000,0x0000,0x00c0,0x00c0,0x00c0,0x00c6,0x00fc,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fc,0x0006,0x007c,0x00c0,0x007e,0x0000,0x0000,
620 0x0000,0x0000,0x0000,0x003c,0x0060,0x0060,0x0060,0x00f8,0x0060,0x0060,0x0000,0x0000,0x0000,0x007e,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,
621 0x0000,0x0000,0x0000,0x0000,0x0010,0x0038,0x006c,0x00c6,0x00c6,0x0000,0x0000,0x0000,0x0000,0x0000,0x00cc,0x01fe,0x01b6,0x01b6,0x0186,
622 0x0000,0x0000,0x0000,0x0000,0x0000,0x00c6,0x006c,0x0038,0x006c,0x00c6,0x0000,0x0000,0x0000,0x0000,0x007c,0x0006,0x007e,0x00c6,0x00c6,
623 0x00c6,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fc,0x0060,0x0030,0x0018,0x00fc,0x0000,0x0000,0x0000,0x0000,0x0000,0x0038,0x0060,0x0060,
624 0x00c0,0x0060,0x0060,0x0038,0x0000,0x0000,0x0030,0x0030,0x0030,0x0030,0x0000,0x0030,0x0030,0x0030,0x0030,0x0000,0x0000,0x0070,0x0018,
625 0x0018,0x000c,0x0018,0x0018,0x0070,0x0000,0x0000,0x0000,0x0000,0x0000,0x001c,0x01b6,0x00e0,0x0000,0x0000,0x0000,0x0000,0x0000,0x00fe,
626 0x00c6,0x00c6,0x00c6,0x006c,0x0038,0x0010,0x0000,0x0060,0x0030,0x007c,0x00c6,0x00c0,0x00c0,0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,
627 0x007e,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x006c,0x0000,0x0000,0x0000,0x007c,0x00c0,0x00fe,0x00c6,0x007c,0x0000,0x0030,0x0018,0x0000,
628 0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0000,0x006c,0x0038,0x0000,0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0000,0x006c,0x0000,
629 0x0000,0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0000,0x0018,0x0030,0x0000,0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0038,0x006c,
630 0x0038,0x0060,0x0030,0x007c,0x00c6,0x00c0,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x007c,0x00c0,0x00fe,0x00c6,0x007c,0x0000,
631 0x006c,0x0038,0x0000,0x0000,0x007c,0x00c0,0x00fe,0x00c6,0x007c,0x0000,0x006c,0x0000,0x0000,0x0000,0x007c,0x00c0,0x00fe,0x00c6,0x007c,
632 0x0000,0x0018,0x0030,0x0000,0x0000,0x0078,0x0030,0x0030,0x0030,0x0070,0x0000,0x00d8,0x0000,0x0000,0x0000,0x0078,0x0030,0x0030,0x0030,
633 0x0070,0x0000,0x00d8,0x0070,0x0000,0x0000,0x0078,0x0030,0x0030,0x0030,0x0070,0x0000,0x0030,0x0060,0x0000,0x0000,0x00c6,0x00c6,0x00fe,
634 0x00c6,0x007c,0x0000,0x006c,0x0000,0x0000,0x0000,0x00c6,0x00c6,0x00fe,0x00c6,0x007c,0x0038,0x006c,0x0038,0x0000,0x0000,0x00fe,0x00c0,
635 0x00fc,0x00c0,0x00fe,0x0000,0x0030,0x0018,0x0000,0x0000,0x00ee,0x01b8,0x00ff,0x003b,0x00ee,0x0000,0x0000,0x0000,0x0000,0x0000,0x019e,
636 0x0198,0x0198,0x01fe,0x0198,0x00d8,0x007e,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x006c,0x0038,0x0000,0x0000,
637 0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x006c,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x0018,0x0030,0x0000,
638 0x0000,0x007e,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x006c,0x0038,0x0000,0x0000,0x007e,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x0018,0x0030,
639 0x0000,0x007c,0x0006,0x007e,0x00c6,0x00c6,0x00c6,0x0000,0x006c,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x006c,
640 0x0000,0x0000,0x0000,0x007e,0x00c6,0x00c6,0x00c6,0x00c6,0x0000,0x006c,0x0000,0x0000,0x0010,0x007c,0x00d6,0x00d0,0x00d6,0x007c,0x0010,
641 0x0000,0x0000,0x0000,0x00fe,0x00c0,0x0060,0x0060,0x00f8,0x0060,0x0066,0x003c,0x0000,0x0000,0x0030,0x00fc,0x0030,0x00fc,0x0078,0x00cc,
642 0x0186,0x0186,0x0000,0x0000,0x019c,0x01b0,0x01b0,0x01fc,0x01b6,0x01b6,0x0186,0x01fc,0x0000,0x0000,0x00e0,0x0030,0x0030,0x0030,0x0078,
643 0x0030,0x0030,0x001c,0x0000,0x0000,0x0000,0x007e,0x00c6,0x007e,0x0006,0x007c,0x0000,0x0030,0x0018,0x0000,0x0000,0x0078,0x0030,0x0030,
644 0x0030,0x0070,0x0000,0x0060,0x0030,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x0030,0x0018,0x0000,0x0000,0x007e,0x00c6,
645 0x00c6,0x00c6,0x00c6,0x0000,0x0030,0x0018,0x0000,0x0000,0x00c6,0x00c6,0x00c6,0x00c6,0x00fc,0x0000,0x00dc,0x0076,0x0000,0x0000,0x00c6,
646 0x00ce,0x00de,0x00f6,0x00e6,0x0000,0x00dc,0x0076,0x0000,0x0000,0x0000,0x0000,0x007c,0x00cc,0x007c,0x000c,0x0078,0x0000,0x0000,0x0000,
647 0x0000,0x0000,0x0078,0x00cc,0x00cc,0x00cc,0x0078,0x0000,0x0000,0x0078,0x00cc,0x00c0,0x00c0,0x0060,0x0030,0x0000,0x0030,0x0000,0x0000,
648 0x0000,0x00c0,0x00c0,0x00c0,0x00fe,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0006,0x0006,0x0006,0x00fe,0x0000,0x0000,0x0000,0x0000,
649 0x0000,0x010e,0x008c,0x0046,0x002c,0x0090,0x0088,0x0084,0x0082,0x0000,0x0000,0x0102,0x008e,0x004a,0x002a,0x0090,0x0088,0x0084,0x0082,
650 0x0000,0x0000,0x0000,0x0030,0x0078,0x0078,0x0030,0x0030,0x0000,0x0030,0x0000,0x0000,0x0000,0x0000,0x0066,0x00cc,0x0198,0x00cc,0x0066,
651 0x0000,0x0000,0x0000,0x0000,0x0000,0x0198,0x00cc,0x0066,0x00cc,0x0198,0x0000,0x0000,0x0222,0x0088,0x0222,0x0088,0x0222,0x0088,0x0222,
652 0x0088,0x0222,0x0088,0x02aa,0x0155,0x02aa,0x0155,0x02aa,0x0155,0x02aa,0x0155,0x02aa,0x0155,0x03bb,0x02ee,0x03bb,0x02ee,0x03bb,0x02ee,
653 0x03bb,0x02ee,0x03bb,0x02ee,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x03f0,
654 0x03f0,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x03f0,0x03f0,0x0030,0x0030,0x03f0,0x03f0,0x0030,0x0030,0x00cc,0x00cc,0x00cc,0x00cc,
655 0x03cc,0x03cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x03fc,0x03fc,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x03f0,
656 0x03f0,0x0030,0x0030,0x03f0,0x03f0,0x0000,0x0000,0x00cc,0x00cc,0x03cc,0x03cc,0x000c,0x000c,0x03cc,0x03cc,0x00cc,0x00cc,0x00cc,0x00cc,
657 0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x03cc,0x03cc,0x000c,0x000c,0x03fc,0x03fc,0x0000,0x0000,0x0000,
658 0x0000,0x03fc,0x03fc,0x000c,0x000c,0x03cc,0x03cc,0x00cc,0x00cc,0x0000,0x0000,0x0000,0x0000,0x03fc,0x03fc,0x00cc,0x00cc,0x00cc,0x00cc,
659 0x0000,0x0000,0x03e0,0x03e0,0x0060,0x0060,0x03e0,0x03e0,0x0060,0x0060,0x0030,0x0030,0x0030,0x0030,0x03f0,0x03f0,0x0000,0x0000,0x0000,
660 0x0000,0x0000,0x0000,0x0000,0x0000,0x003f,0x003f,0x0030,0x0030,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x0030,0x0030,
661 0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x03ff,0x03ff,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x0030,0x0030,0x003f,0x003f,0x0030,
662 0x0030,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x0030,0x0030,0x03ff,0x03ff,
663 0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x003f,0x003f,0x0030,0x0030,0x003f,0x003f,0x0030,0x0030,0x00cc,0x00cc,0x00cc,0x00cc,0x00cf,
664 0x00cf,0x00cc,0x00cc,0x00cc,0x00cc,0x0000,0x0000,0x00ff,0x00ff,0x00c0,0x00c0,0x00cf,0x00cf,0x00cc,0x00cc,0x00cc,0x00cc,0x00cf,0x00cf,
665 0x00c0,0x00c0,0x00ff,0x00ff,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x0000,0x0000,0x03cf,0x03cf,0x00cc,0x00cc,0x00cc,0x00cc,0x03cf,
666 0x03cf,0x0000,0x0000,0x03ff,0x03ff,0x0000,0x0000,0x00cc,0x00cc,0x00cf,0x00cf,0x00c0,0x00c0,0x00cf,0x00cf,0x00cc,0x00cc,0x0000,0x0000,
667 0x03ff,0x03ff,0x0000,0x0000,0x03ff,0x03ff,0x0000,0x0000,0x00cc,0x00cc,0x03cf,0x03cf,0x0000,0x0000,0x03cf,0x03cf,0x00cc,0x00cc,0x0000,
668 0x0000,0x03ff,0x03ff,0x0000,0x0000,0x03ff,0x03ff,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x00cc,0x00cc,0x00cc,0x00cc,
669 0x0030,0x0030,0x03ff,0x03ff,0x0000,0x0000,0x03ff,0x03ff,0x0000,0x0000,0x00cc,0x00cc,0x00cc,0x00cc,0x03ff,0x03ff,0x0000,0x0000,0x0000,
670 0x0000,0x0000,0x0000,0x0000,0x0000,0x00ff,0x00ff,0x00cc,0x00cc,0x00cc,0x00cc,0x0000,0x0000,0x003f,0x003f,0x0030,0x0030,0x003f,0x003f,
671 0x0030,0x0030,0x0030,0x0030,0x003f,0x003f,0x0030,0x0030,0x003f,0x003f,0x0000,0x0000,0x00cc,0x00cc,0x00cc,0x00cc,0x00ff,0x00ff,0x0000,
672 0x0000,0x0000,0x0000,0x00cc,0x00cc,0x00cc,0x00cc,0x03cf,0x03cf,0x00cc,0x00cc,0x00cc,0x00cc,0x0030,0x0030,0x03ff,0x03ff,0x0000,0x0000,
673 0x03ff,0x03ff,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x03f0,0x03f0,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x003f,
674 0x003f,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,
675 0x03ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x03e0,0x001f,0x001f,0x001f,
676 0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x0000,0x0000,0x0000,0x0000,0x0000,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x0000,0x0000,
677 0x0076,0x00dc,0x00c8,0x00dc,0x0076,0x0000,0x0000,0x0000,0x0000,0x00c0,0x00dc,0x00c6,0x00cc,0x00d8,0x00cc,0x00cc,0x0078,0x0000,0x0000,
678 0x0000,0x00c0,0x00c0,0x00c0,0x00c0,0x00c0,0x00c6,0x00fe,0x0000,0x0000,0x0000,0x00cc,0x00cc,0x00cc,0x00cc,0x00cc,0x01fe,0x0000,0x0000,
679 0x0000,0x0000,0x00fe,0x0060,0x0030,0x0018,0x0030,0x0060,0x00fe,0x0000,0x0000,0x0000,0x0078,0x00cc,0x00cc,0x00d8,0x007e,0x0000,0x0000,
680 0x0000,0x0000,0x0180,0x0180,0x01f6,0x019c,0x018c,0x018c,0x0000,0x0000,0x0000,0x0000,0x0000,0x0018,0x0030,0x0030,0x0030,0x00fc,0x0000,
681 0x0000,0x0000,0x0000,0x0078,0x0030,0x00fc,0x01b6,0x01b6,0x00fc,0x0030,0x0078,0x0000,0x0000,0x0000,0x0078,0x00cc,0x00cc,0x00fc,0x00cc,
682 0x00cc,0x0078,0x0000,0x0000,0x0000,0x00ee,0x006c,0x00c6,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x0000,0x0000,0x007c,0x00c6,0x00c6,0x007c,
683 0x0018,0x0030,0x007c,0x0000,0x0000,0x0000,0x00ee,0x01b3,0x0193,0x019b,0x00ee,0x0000,0x0000,0x0000,0x0000,0x0180,0x00fc,0x01e6,0x01b6,
684 0x019e,0x00fc,0x0006,0x0000,0x0000,0x0000,0x0000,0x007c,0x00c0,0x0078,0x00c0,0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x00c6,0x00c6,
685 0x00c6,0x00c6,0x00c6,0x00c6,0x007c,0x0000,0x0000,0x0000,0x0000,0x00fc,0x0000,0x00fc,0x0000,0x00fc,0x0000,0x0000,0x0000,0x0000,0x00fc,
686 0x0000,0x0030,0x0030,0x00fc,0x0030,0x0030,0x0000,0x0000,0x0000,0x00fc,0x0000,0x0018,0x0030,0x0060,0x0030,0x0018,0x0000,0x0000,0x0000,
687 0x00fc,0x0000,0x0060,0x0030,0x0018,0x0030,0x0060,0x0000,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0036,0x0036,0x001c,0x0000,0x0000,
688 0x00e0,0x01b0,0x01b0,0x0030,0x0030,0x0030,0x0030,0x0030,0x0030,0x0000,0x0000,0x0000,0x0030,0x0000,0x00fc,0x0000,0x0030,0x0000,0x0000,
689 0x0000,0x0000,0x001c,0x01b6,0x00e0,0x0000,0x001c,0x01b6,0x00e0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0038,0x006c,0x006c,0x0038,
690 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0030,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0000,0x0000,
691 0x0000,0x0000,0x0008,0x0018,0x0038,0x0078,0x00d8,0x0198,0x0018,0x0018,0x001f,0x0000,0x0000,0x0000,0x0000,0x0000,0x00cc,0x00cc,0x00cc,
692 0x00cc,0x00f8,0x0000,0x0000,0x0000,0x0000,0x0000,0x007c,0x0060,0x0038,0x000c,0x0078,0x0000,0x0000,0x0000,0x0000,0x0078,0x0078,0x0078,
693 0x0078,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
697 // ////////////////////////////////////////////////////////////////////////// //
698 /// returns `fontBase` to be passed to `oglDrawFont10()`
699 public GLuint
oglCreateFont10(bool upsideDown
=false) () nothrow @trusted @nogc {
700 //glFontCreateBitmap();
701 GLuint fontBase
= glGenLists(256);
702 glPixelStorei(GL_UNPACK_ALIGNMENT
, 1);
703 foreach (immutable uint cidx
; 0..256) {
704 glNewList(fontBase
+cidx
, GL_COMPILE
);
705 static if (upsideDown
) {
709 auto fpp
= (cast(const(ushort)*)glFont10
.ptr
)+cidx
*glFont10Height
;
710 while (yofs
< glFont10Height
&& fpp
[yofs
] == 0) ++yofs
;
712 glBitmap(glFont10Width
, glFont10Height
, 0, yofs
, glFont10Width
, 0, (cast(const(ubyte*))glFont10
.ptr
)+cidx
*(glFont10Height
*2));
719 /// background is automatically transparent
720 public void oglDrawFont10(bool upsideDown
=false) (GLuint fontBase
, int x
, int y
, const(char)[] str) nothrow @trusted @nogc {
721 if (fontBase
== 0 ||
str.length
== 0) return;
722 glPushAttrib(/*GL_ENABLE_BIT|GL_CURRENT_BIT|*/GL_LIST_BIT
); // GL_ALL_ATTRIB_BITS
723 //glEnable(GL_BLEND);
724 //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
725 scope(exit
) glPopAttrib();
726 static if (!upsideDown
) {
727 GLint
[4] vport
= void;
728 glGetIntegerv(GL_VIEWPORT
, vport
.ptr
);
729 y
= vport
.ptr
[3]-y
-glFont10Height
;
732 glListBase(fontBase
);
733 glCallLists(str.length
, GL_UNSIGNED_BYTE
, cast(void*)str.ptr
);