… | |
… | |
486 | RETVAL |
486 | RETVAL |
487 | |
487 | |
488 | void |
488 | void |
489 | SDL_GL_SwapBuffers () |
489 | SDL_GL_SwapBuffers () |
490 | |
490 | |
|
|
491 | char * |
|
|
492 | SDL_GetKeyName (int sym) |
|
|
493 | |
491 | void |
494 | void |
492 | SDL_PollEvent () |
495 | SDL_PollEvent () |
493 | PPCODE: |
496 | PPCODE: |
494 | { |
497 | { |
495 | SDL_Event ev; |
498 | SDL_Event ev; |
… | |
… | |
513 | hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0); |
516 | hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0); |
514 | hv_store (hv, "state", 5, newSViv (ev.active.state), 0); |
517 | hv_store (hv, "state", 5, newSViv (ev.active.state), 0); |
515 | break; |
518 | break; |
516 | |
519 | |
517 | case SDL_MOUSEMOTION: |
520 | case SDL_MOUSEMOTION: |
|
|
521 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
|
|
522 | |
518 | hv_store (hv, "state", 5, newSViv (ev.motion.state), 0); |
523 | hv_store (hv, "state", 5, newSViv (ev.motion.state), 0); |
519 | hv_store (hv, "x", 1, newSViv (ev.motion.x), 0); |
524 | hv_store (hv, "x", 1, newSViv (ev.motion.x), 0); |
520 | hv_store (hv, "y", 1, newSViv (ev.motion.y), 0); |
525 | hv_store (hv, "y", 1, newSViv (ev.motion.y), 0); |
521 | hv_store (hv, "xrel", 4, newSViv (ev.motion.xrel), 0); |
526 | hv_store (hv, "xrel", 4, newSViv (ev.motion.xrel), 0); |
522 | hv_store (hv, "yrel", 4, newSViv (ev.motion.yrel), 0); |
527 | hv_store (hv, "yrel", 4, newSViv (ev.motion.yrel), 0); |
523 | break; |
528 | break; |
524 | |
529 | |
525 | case SDL_MOUSEBUTTONDOWN: |
530 | case SDL_MOUSEBUTTONDOWN: |
526 | case SDL_MOUSEBUTTONUP: |
531 | case SDL_MOUSEBUTTONUP: |
|
|
532 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
|
|
533 | |
527 | hv_store (hv, "button", 6, newSViv (ev.button.button), 0); |
534 | hv_store (hv, "button", 6, newSViv (ev.button.button), 0); |
528 | hv_store (hv, "state", 5, newSViv (ev.button.state), 0); |
535 | hv_store (hv, "state", 5, newSViv (ev.button.state), 0); |
529 | hv_store (hv, "x", 1, newSViv (ev.button.x), 0); |
536 | hv_store (hv, "x", 1, newSViv (ev.button.x), 0); |
530 | hv_store (hv, "y", 1, newSViv (ev.button.y), 0); |
537 | hv_store (hv, "y", 1, newSViv (ev.button.y), 0); |
531 | break; |
538 | break; |
… | |
… | |
557 | lowdelay (int fd, int val = 1) |
564 | lowdelay (int fd, int val = 1) |
558 | CODE: |
565 | CODE: |
559 | #ifndef _WIN32 |
566 | #ifndef _WIN32 |
560 | setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); |
567 | setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); |
561 | #endif |
568 | #endif |
|
|
569 | |
|
|
570 | char * |
|
|
571 | gl_vendor () |
|
|
572 | CODE: |
|
|
573 | RETVAL = (char *)glGetString (GL_VENDOR); |
|
|
574 | OUTPUT: |
|
|
575 | RETVAL |
562 | |
576 | |
563 | char * |
577 | char * |
564 | gl_version () |
578 | gl_version () |
565 | CODE: |
579 | CODE: |
566 | RETVAL = (char *)glGetString (GL_VERSION); |
580 | RETVAL = (char *)glGetString (GL_VERSION); |
… | |
… | |
717 | |
731 | |
718 | CFClient::Layout |
732 | CFClient::Layout |
719 | new (SV *class, int rgba = 0) |
733 | new (SV *class, int rgba = 0) |
720 | CODE: |
734 | CODE: |
721 | #if _WIN32 |
735 | #if _WIN32 |
722 | rgba = 0;//D |
736 | //rgba = 0;//D make stext nicer, breaks TextView |
723 | #endif |
737 | #endif |
724 | New (0, RETVAL, 1, struct cf_layout); |
738 | New (0, RETVAL, 1, struct cf_layout); |
725 | |
739 | |
726 | RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context); |
740 | RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context); |
727 | RETVAL->rgba = rgba; |
741 | RETVAL->rgba = rgba; |
… | |
… | |
1083 | tex->r = r; |
1097 | tex->r = r; |
1084 | tex->g = g; |
1098 | tex->g = g; |
1085 | tex->b = b; |
1099 | tex->b = b; |
1086 | tex->a = a; |
1100 | tex->a = a; |
1087 | } |
1101 | } |
|
|
1102 | |
|
|
1103 | // somewhat hackish, but for textures that require it, it really |
|
|
1104 | // improves the look, and most others don't suffer. |
|
|
1105 | glBindTexture (GL_TEXTURE_2D, name); |
|
|
1106 | glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); |
|
|
1107 | glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); |
1088 | } |
1108 | } |
1089 | |
1109 | |
1090 | int |
1110 | int |
1091 | ox (CFClient::Map self) |
1111 | ox (CFClient::Map self) |
1092 | ALIAS: |
1112 | ALIAS: |
… | |
… | |
1676 | |
1696 | |
1677 | void glDrawElements (int mode, int count, int type, char *indices) |
1697 | void glDrawElements (int mode, int count, int type, char *indices) |
1678 | |
1698 | |
1679 | # 1.2 void glDrawRangeElements (int mode, int start, int end |
1699 | # 1.2 void glDrawRangeElements (int mode, int start, int end |
1680 | |
1700 | |
|
|
1701 | void glRasterPos (float x, float y, float z = 0.) |
|
|
1702 | CODE: |
|
|
1703 | glRasterPos3f (0, 0, z); |
|
|
1704 | glBitmap (0, 0, 0, 0, x, y, 0); |
|
|
1705 | |
1681 | void glVertex (float x, float y, float z = 0.) |
1706 | void glVertex (float x, float y, float z = 0.) |
1682 | CODE: |
1707 | CODE: |
1683 | glVertex3f (x, y, z); |
1708 | glVertex3f (x, y, z); |
1684 | |
1709 | |
1685 | void glTexCoord (float s, float t) |
1710 | void glTexCoord (float s, float t) |
… | |
… | |
1712 | |
1737 | |
1713 | void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type, char *data) |
1738 | void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type, char *data) |
1714 | |
1739 | |
1715 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
1740 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
1716 | |
1741 | |
1717 | void glRasterPos (int x, int y) |
1742 | void glDrawPixels (int width, int height, int format, int type, char *pixels) |
1718 | CODE: |
|
|
1719 | glRasterPos2i (x, y); |
|
|
1720 | |
1743 | |
1721 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
1744 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
1722 | |
1745 | |
1723 | int glGenTexture () |
1746 | int glGenTexture () |
1724 | CODE: |
1747 | CODE: |