… | |
… | |
4 | # include <malloc.h> |
4 | # include <malloc.h> |
5 | # include <windows.h> |
5 | # include <windows.h> |
6 | # include <wininet.h> |
6 | # include <wininet.h> |
7 | # pragma warning(disable:4244) |
7 | # pragma warning(disable:4244) |
8 | # pragma warning(disable:4761) |
8 | # pragma warning(disable:4761) |
|
|
9 | #endif |
|
|
10 | |
|
|
11 | //#define DEBUG 1 |
|
|
12 | #if DEBUG |
|
|
13 | # include <valgrind/memcheck.h> |
9 | #endif |
14 | #endif |
10 | |
15 | |
11 | #include "EXTERN.h" |
16 | #include "EXTERN.h" |
12 | #include "perl.h" |
17 | #include "perl.h" |
13 | #include "XSUB.h" |
18 | #include "XSUB.h" |
… | |
… | |
582 | opengl_fontmap = pango_opengl_font_map_new (); |
587 | opengl_fontmap = pango_opengl_font_map_new (); |
583 | pango_opengl_font_map_set_default_substitute ((PangoOpenGLFontMap *)opengl_fontmap, substitute_func, 0, 0); |
588 | pango_opengl_font_map_set_default_substitute ((PangoOpenGLFontMap *)opengl_fontmap, substitute_func, 0, 0); |
584 | opengl_context = pango_opengl_font_map_create_context ((PangoOpenGLFontMap *)opengl_fontmap); |
589 | opengl_context = pango_opengl_font_map_create_context ((PangoOpenGLFontMap *)opengl_fontmap); |
585 | } |
590 | } |
586 | |
591 | |
|
|
592 | char * |
|
|
593 | SDL_GetError () |
|
|
594 | |
587 | int |
595 | int |
588 | SDL_Init (U32 flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | PARACHUTE) |
596 | SDL_Init (U32 flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | PARACHUTE) |
589 | |
597 | |
590 | void |
598 | void |
591 | SDL_Quit () |
599 | SDL_Quit () |
592 | |
600 | |
593 | void |
601 | void |
594 | SDL_ListModes () |
602 | SDL_ListModes (int rgb, int alpha) |
595 | PPCODE: |
603 | PPCODE: |
596 | { |
604 | { |
597 | SDL_Rect **m; |
605 | SDL_Rect **m; |
598 | |
606 | |
599 | SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5); |
607 | SDL_GL_SetAttribute (SDL_GL_RED_SIZE , rgb); |
600 | SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5); |
608 | SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, rgb); |
601 | SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5); |
609 | SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE , rgb); |
602 | SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 1); |
610 | SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, alpha); |
603 | |
611 | |
604 | SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 15); |
612 | SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 15); |
605 | SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 0); |
613 | SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE , 0); |
606 | |
614 | |
607 | SDL_GL_SetAttribute (SDL_GL_ACCUM_RED_SIZE, 0); |
615 | SDL_GL_SetAttribute (SDL_GL_ACCUM_RED_SIZE , 0); |
608 | SDL_GL_SetAttribute (SDL_GL_ACCUM_GREEN_SIZE, 0); |
616 | SDL_GL_SetAttribute (SDL_GL_ACCUM_GREEN_SIZE, 0); |
609 | SDL_GL_SetAttribute (SDL_GL_ACCUM_BLUE_SIZE, 0); |
617 | SDL_GL_SetAttribute (SDL_GL_ACCUM_BLUE_SIZE , 0); |
610 | SDL_GL_SetAttribute (SDL_GL_ACCUM_ALPHA_SIZE, 0); |
618 | SDL_GL_SetAttribute (SDL_GL_ACCUM_ALPHA_SIZE, 0); |
611 | |
619 | |
612 | SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); |
620 | SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); |
613 | #if SDL_VERSION_ATLEAST(1,2,10) |
621 | #if SDL_VERSION_ATLEAST(1,2,10) |
614 | SDL_GL_SetAttribute (SDL_GL_ACCELERATED_VISUAL, 1); |
622 | SDL_GL_SetAttribute (SDL_GL_ACCELERATED_VISUAL, 1); |
615 | SDL_GL_SetAttribute (SDL_GL_SWAP_CONTROL, 1); |
623 | SDL_GL_SetAttribute (SDL_GL_SWAP_CONTROL, 1); |
616 | #endif |
624 | #endif |
617 | |
625 | |
618 | SDL_EnableUNICODE (1); |
|
|
619 | SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); |
|
|
620 | |
|
|
621 | m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL); |
626 | m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL); |
622 | |
627 | |
623 | if (m && m != (SDL_Rect **)-1) |
628 | if (m && m != (SDL_Rect **)-1) |
624 | while (*m) |
629 | while (*m) |
625 | { |
630 | { |
|
|
631 | if ((*m)->w >= 640 && (*m)->h >= 480) |
|
|
632 | { |
626 | AV *av = newAV (); |
633 | AV *av = newAV (); |
627 | av_push (av, newSViv ((*m)->w)); |
634 | av_push (av, newSViv ((*m)->w)); |
628 | av_push (av, newSViv ((*m)->h)); |
635 | av_push (av, newSViv ((*m)->h)); |
|
|
636 | av_push (av, newSViv (rgb)); |
|
|
637 | av_push (av, newSViv (alpha)); |
629 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)av))); |
638 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)av))); |
|
|
639 | } |
630 | |
640 | |
631 | ++m; |
641 | ++m; |
632 | } |
642 | } |
633 | } |
643 | } |
634 | |
644 | |
635 | char * |
|
|
636 | SDL_GetError () |
|
|
637 | |
|
|
638 | int |
645 | int |
639 | SDL_SetVideoMode (int w, int h, int fullscreen) |
646 | SDL_SetVideoMode (int w, int h, int rgb, int alpha, int fullscreen) |
640 | CODE: |
647 | CODE: |
|
|
648 | { |
|
|
649 | SDL_EnableUNICODE (1); |
|
|
650 | SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); |
|
|
651 | |
|
|
652 | SDL_GL_SetAttribute (SDL_GL_RED_SIZE , rgb); |
|
|
653 | SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, rgb); |
|
|
654 | SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE , rgb); |
|
|
655 | SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, alpha); |
|
|
656 | |
641 | RETVAL = !!SDL_SetVideoMode ( |
657 | RETVAL = !!SDL_SetVideoMode ( |
642 | w, h, 0, SDL_OPENGL | (fullscreen ? SDL_FULLSCREEN : 0) |
658 | w, h, 0, SDL_OPENGL | (fullscreen ? SDL_FULLSCREEN : 0) |
643 | ); |
659 | ); |
|
|
660 | |
644 | if (RETVAL) |
661 | if (RETVAL) |
645 | { |
662 | { |
646 | av_clear (texture_av); |
663 | av_clear (texture_av); |
647 | |
664 | |
648 | SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); |
665 | SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); |
649 | # define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); |
666 | #define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); |
650 | # include "glfunc.h" |
667 | #include "glfunc.h" |
651 | # undef GL_FUNC |
668 | #undef GL_FUNC |
652 | |
|
|
653 | } |
669 | } |
|
|
670 | } |
654 | OUTPUT: |
671 | OUTPUT: |
655 | RETVAL |
672 | RETVAL |
656 | |
673 | |
657 | void |
674 | void |
658 | SDL_GL_SwapBuffers () |
675 | SDL_GL_SwapBuffers () |
659 | |
676 | |
660 | char * |
677 | char * |
661 | SDL_GetKeyName (int sym) |
678 | SDL_GetKeyName (int sym) |
662 | |
679 | |
|
|
680 | int |
|
|
681 | SDL_GetAppState () |
|
|
682 | |
663 | void |
683 | void |
664 | SDL_PollEvent () |
684 | poll_events () |
665 | PPCODE: |
685 | PPCODE: |
666 | { |
686 | { |
667 | SDL_Event ev; |
687 | SDL_Event ev; |
668 | |
688 | |
669 | while (SDL_PollEvent (&ev)) |
689 | SDL_PumpEvents (); |
|
|
690 | while (SDL_PeepEvents (&ev, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0) |
670 | { |
691 | { |
671 | HV *hv = newHV (); |
692 | HV *hv = newHV (); |
672 | hv_store (hv, "type", 4, newSViv (ev.type), 0); |
693 | hv_store (hv, "type", 4, newSViv (ev.type), 0); |
673 | |
694 | |
674 | switch (ev.type) |
695 | switch (ev.type) |
… | |
… | |
686 | hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0); |
707 | hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0); |
687 | hv_store (hv, "state", 5, newSViv (ev.active.state), 0); |
708 | hv_store (hv, "state", 5, newSViv (ev.active.state), 0); |
688 | break; |
709 | break; |
689 | |
710 | |
690 | case SDL_MOUSEMOTION: |
711 | case SDL_MOUSEMOTION: |
|
|
712 | { |
|
|
713 | int state = ev.motion.state; |
|
|
714 | int x = ev.motion.x; |
|
|
715 | int y = ev.motion.y; |
|
|
716 | int xrel = ev.motion.xrel; |
|
|
717 | int yrel = ev.motion.yrel; |
|
|
718 | |
|
|
719 | /* do simplistic event compression */ |
|
|
720 | while (SDL_PeepEvents (&ev, 1, SDL_PEEKEVENT, SDL_EVENTMASK (SDL_MOUSEMOTION)) > 0 |
|
|
721 | && state == ev.motion.state) |
|
|
722 | { |
|
|
723 | xrel += ev.motion.xrel; |
|
|
724 | yrel += ev.motion.yrel; |
|
|
725 | x = ev.motion.x; |
|
|
726 | y = ev.motion.y; |
|
|
727 | SDL_PeepEvents (&ev, 1, SDL_GETEVENT, SDL_EVENTMASK (SDL_MOUSEMOTION)); |
|
|
728 | } |
|
|
729 | |
691 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
730 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
692 | |
|
|
693 | hv_store (hv, "state", 5, newSViv (ev.motion.state), 0); |
731 | hv_store (hv, "state", 5, newSViv (state), 0); |
694 | hv_store (hv, "x", 1, newSViv (ev.motion.x), 0); |
732 | hv_store (hv, "x", 1, newSViv (x), 0); |
695 | hv_store (hv, "y", 1, newSViv (ev.motion.y), 0); |
733 | hv_store (hv, "y", 1, newSViv (y), 0); |
696 | hv_store (hv, "xrel", 4, newSViv (ev.motion.xrel), 0); |
734 | hv_store (hv, "xrel", 4, newSViv (xrel), 0); |
697 | hv_store (hv, "yrel", 4, newSViv (ev.motion.yrel), 0); |
735 | hv_store (hv, "yrel", 4, newSViv (yrel), 0); |
|
|
736 | } |
698 | break; |
737 | break; |
699 | |
738 | |
700 | case SDL_MOUSEBUTTONDOWN: |
739 | case SDL_MOUSEBUTTONDOWN: |
701 | case SDL_MOUSEBUTTONUP: |
740 | case SDL_MOUSEBUTTONUP: |
702 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
741 | hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); |
… | |
… | |
882 | ExitThread (retval); // unclean, please beam me up |
921 | ExitThread (retval); // unclean, please beam me up |
883 | #else |
922 | #else |
884 | _exit (retval); |
923 | _exit (retval); |
885 | #endif |
924 | #endif |
886 | |
925 | |
|
|
926 | void |
|
|
927 | debug () |
|
|
928 | CODE: |
|
|
929 | { |
|
|
930 | #if DEBUG |
|
|
931 | VALGRIND_DO_LEAK_CHECK; |
|
|
932 | #endif |
|
|
933 | } |
|
|
934 | |
887 | MODULE = CFPlus PACKAGE = CFPlus::Font |
935 | MODULE = CFPlus PACKAGE = CFPlus::Font |
888 | |
936 | |
889 | CFPlus::Font |
937 | CFPlus::Font |
890 | new_from_file (SV *class, char *path, int id = 0) |
938 | new_from_file (SV *class, char *path, int id = 0) |
891 | CODE: |
939 | CODE: |
… | |
… | |
1206 | flags |
1254 | flags |
1207 | ); |
1255 | ); |
1208 | |
1256 | |
1209 | MODULE = CFPlus PACKAGE = CFPlus::Texture |
1257 | MODULE = CFPlus PACKAGE = CFPlus::Texture |
1210 | |
1258 | |
|
|
1259 | int minpot (int n) |
|
|
1260 | |
1211 | void |
1261 | void |
1212 | pad2pot (SV *data_, SV *w_, SV *h_) |
1262 | pad2pot (SV *data_, SV *w_, SV *h_) |
1213 | CODE: |
1263 | CODE: |
1214 | { |
1264 | { |
1215 | int ow = SvIV (w_); |
1265 | int ow = SvIV (w_); |
… | |
… | |
1291 | { |
1341 | { |
1292 | glDisable (GL_ALPHA_TEST); |
1342 | glDisable (GL_ALPHA_TEST); |
1293 | glDisable (GL_BLEND); |
1343 | glDisable (GL_BLEND); |
1294 | } |
1344 | } |
1295 | } |
1345 | } |
|
|
1346 | |
|
|
1347 | IV texture_valid_2d (GLint internalformat, GLsizei w, GLsizei h, GLenum format, GLenum type) |
|
|
1348 | CODE: |
|
|
1349 | { |
|
|
1350 | GLint width; |
|
|
1351 | glTexImage2D (GL_PROXY_TEXTURE_2D, 0, internalformat, w, h, 0, format, type, 0); |
|
|
1352 | glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); |
|
|
1353 | RETVAL = width > 0; |
|
|
1354 | } |
|
|
1355 | OUTPUT: |
|
|
1356 | RETVAL |
1296 | |
1357 | |
1297 | MODULE = CFPlus PACKAGE = CFPlus::Map |
1358 | MODULE = CFPlus PACKAGE = CFPlus::Map |
1298 | |
1359 | |
1299 | CFPlus::Map |
1360 | CFPlus::Map |
1300 | new (SV *class) |
1361 | new (SV *class) |
… | |
… | |
1913 | glDisable (GL_BLEND); |
1974 | glDisable (GL_BLEND); |
1914 | glDisable (GL_TEXTURE_2D); |
1975 | glDisable (GL_TEXTURE_2D); |
1915 | } |
1976 | } |
1916 | |
1977 | |
1917 | void |
1978 | void |
1918 | fow_texture (CFPlus::Map self, int mx, int my, int sw, int sh) |
1979 | fow_texture (CFPlus::Map self, int mx, int my, int sw, int sh, int smoothing, const char *matrix) |
1919 | PPCODE: |
1980 | PPCODE: |
1920 | { |
1981 | { |
1921 | int x, y; |
1982 | int x, y; |
1922 | int sw4 = (sw + 3) & ~3; |
1983 | int sw4 = (sw + 3) & ~3; |
1923 | SV *darkness_sv = sv_2mortal (newSV (sw4 * sh)); |
1984 | SV *darkness_sv = sv_2mortal (newSV (sw4 * sh)); |
… | |
… | |
1943 | darkness[y * sw4 + x] = cell->darkness |
2004 | darkness[y * sw4 + x] = cell->darkness |
1944 | ? 255 - (cell->darkness - 1) |
2005 | ? 255 - (cell->darkness - 1) |
1945 | : 255 - FOW_DARKNESS; |
2006 | : 255 - FOW_DARKNESS; |
1946 | } |
2007 | } |
1947 | } |
2008 | } |
|
|
2009 | |
|
|
2010 | if (smoothing) |
|
|
2011 | { |
|
|
2012 | SV *darkness2_sv = sv_2mortal (newSV (sw4 * sh)); |
|
|
2013 | uint8_t *darkness2 = (uint8_t *)SvPVX (darkness2_sv); |
|
|
2014 | |
|
|
2015 | SvPOK_only (darkness2_sv); |
|
|
2016 | SvCUR_set (darkness2_sv, sw4 * sh); |
|
|
2017 | |
|
|
2018 | for (y = 0; y < sh; ++y) |
|
|
2019 | for (x = 0; x < sw4; ++x) |
|
|
2020 | { |
|
|
2021 | float *f = (float *)matrix; |
|
|
2022 | int dx, dy; |
|
|
2023 | float sum = 0.f; |
|
|
2024 | |
|
|
2025 | for (dy = -1; dy <= 1; ++dy) |
|
|
2026 | for (dx = -1; dx <= 1; ++dx) |
|
|
2027 | { |
|
|
2028 | unsigned int x2 = x + dx; |
|
|
2029 | unsigned int y2 = y + dy; |
|
|
2030 | |
|
|
2031 | sum += (x2 < sw && y2 < sh ? darkness [y2 * sw4 + x2] : 255) * *f++; |
|
|
2032 | } |
|
|
2033 | |
|
|
2034 | darkness2 [y * sw4 + x] = sum > 255. ? 255. : sum; |
|
|
2035 | } |
|
|
2036 | |
|
|
2037 | darkness_sv = darkness2_sv; |
|
|
2038 | } |
1948 | |
2039 | |
1949 | EXTEND (SP, 3); |
2040 | EXTEND (SP, 3); |
1950 | PUSHs (sv_2mortal (newSViv (sw4))); |
2041 | PUSHs (sv_2mortal (newSViv (sw4))); |
1951 | PUSHs (sv_2mortal (newSViv (sh))); |
2042 | PUSHs (sv_2mortal (newSViv (sh))); |
1952 | PUSHs (darkness_sv); |
2043 | PUSHs (darkness_sv); |
… | |
… | |
2126 | CODE: |
2217 | CODE: |
2127 | RETVAL = Mix_VolumeMusic (volume); |
2218 | RETVAL = Mix_VolumeMusic (volume); |
2128 | OUTPUT: |
2219 | OUTPUT: |
2129 | RETVAL |
2220 | RETVAL |
2130 | |
2221 | |
|
|
2222 | int |
|
|
2223 | fade_out (int ms) |
|
|
2224 | CODE: |
|
|
2225 | RETVAL = Mix_FadeOutMusic (ms); |
|
|
2226 | OUTPUT: |
|
|
2227 | RETVAL |
|
|
2228 | |
2131 | CFPlus::MixMusic |
2229 | CFPlus::MixMusic |
2132 | new_from_file (SV *class, char *path) |
2230 | new_from_file (SV *class, char *path) |
2133 | CODE: |
2231 | CODE: |
2134 | RETVAL = Mix_LoadMUS (path); |
2232 | RETVAL = Mix_LoadMUS (path); |
2135 | OUTPUT: |
2233 | OUTPUT: |
… | |
… | |
2142 | |
2240 | |
2143 | int |
2241 | int |
2144 | play (CFPlus::MixMusic self, int loops = -1) |
2242 | play (CFPlus::MixMusic self, int loops = -1) |
2145 | CODE: |
2243 | CODE: |
2146 | RETVAL = Mix_PlayMusic (self, loops); |
2244 | RETVAL = Mix_PlayMusic (self, loops); |
|
|
2245 | OUTPUT: |
|
|
2246 | RETVAL |
|
|
2247 | |
|
|
2248 | int |
|
|
2249 | fade_in_pos (CFPlus::MixMusic self, int loops, int ms, double position) |
|
|
2250 | CODE: |
|
|
2251 | RETVAL = Mix_FadeInMusicPos (self, loops, ms, position); |
2147 | OUTPUT: |
2252 | OUTPUT: |
2148 | RETVAL |
2253 | RETVAL |
2149 | |
2254 | |
2150 | MODULE = CFPlus PACKAGE = CFPlus::OpenGL |
2255 | MODULE = CFPlus PACKAGE = CFPlus::OpenGL |
2151 | |
2256 | |
… | |
… | |
2155 | static const struct { |
2260 | static const struct { |
2156 | const char *name; |
2261 | const char *name; |
2157 | IV iv; |
2262 | IV iv; |
2158 | } *civ, const_iv[] = { |
2263 | } *civ, const_iv[] = { |
2159 | # define const_iv(name) { # name, (IV)name } |
2264 | # define const_iv(name) { # name, (IV)name } |
|
|
2265 | const_iv (GL_VENDOR), |
|
|
2266 | const_iv (GL_VERSION), |
|
|
2267 | const_iv (GL_EXTENSIONS), |
2160 | const_iv (GL_COLOR_MATERIAL), |
2268 | const_iv (GL_COLOR_MATERIAL), |
2161 | const_iv (GL_SMOOTH), |
2269 | const_iv (GL_SMOOTH), |
2162 | const_iv (GL_FLAT), |
2270 | const_iv (GL_FLAT), |
2163 | const_iv (GL_DITHER), |
2271 | const_iv (GL_DITHER), |
2164 | const_iv (GL_BLEND), |
2272 | const_iv (GL_BLEND), |
… | |
… | |
2191 | const_iv (GL_LUMINANCE), |
2299 | const_iv (GL_LUMINANCE), |
2192 | const_iv (GL_LUMINANCE_ALPHA), |
2300 | const_iv (GL_LUMINANCE_ALPHA), |
2193 | const_iv (GL_FLOAT), |
2301 | const_iv (GL_FLOAT), |
2194 | const_iv (GL_UNSIGNED_INT_8_8_8_8_REV), |
2302 | const_iv (GL_UNSIGNED_INT_8_8_8_8_REV), |
2195 | const_iv (GL_COMPILE), |
2303 | const_iv (GL_COMPILE), |
|
|
2304 | const_iv (GL_PROXY_TEXTURE_1D), |
|
|
2305 | const_iv (GL_PROXY_TEXTURE_2D), |
2196 | const_iv (GL_TEXTURE_1D), |
2306 | const_iv (GL_TEXTURE_1D), |
2197 | const_iv (GL_TEXTURE_2D), |
2307 | const_iv (GL_TEXTURE_2D), |
2198 | const_iv (GL_TEXTURE_ENV), |
2308 | const_iv (GL_TEXTURE_ENV), |
2199 | const_iv (GL_TEXTURE_MAG_FILTER), |
2309 | const_iv (GL_TEXTURE_MAG_FILTER), |
2200 | const_iv (GL_TEXTURE_MIN_FILTER), |
2310 | const_iv (GL_TEXTURE_MIN_FILTER), |
… | |
… | |
2266 | CODE: |
2376 | CODE: |
2267 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
2377 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
2268 | OUTPUT: |
2378 | OUTPUT: |
2269 | RETVAL |
2379 | RETVAL |
2270 | |
2380 | |
|
|
2381 | const char *glGetString (GLenum pname) |
|
|
2382 | |
|
|
2383 | GLint glGetInteger (GLenum pname) |
|
|
2384 | CODE: |
|
|
2385 | glGetIntegerv (pname, &RETVAL); |
|
|
2386 | OUTPUT: |
|
|
2387 | RETVAL |
|
|
2388 | |
|
|
2389 | GLdouble glGetDouble (GLenum pname) |
|
|
2390 | CODE: |
|
|
2391 | glGetDoublev (pname, &RETVAL); |
|
|
2392 | OUTPUT: |
|
|
2393 | RETVAL |
|
|
2394 | |
2271 | int glGetError () |
2395 | int glGetError () |
2272 | |
2396 | |
2273 | void glFinish () |
2397 | void glFinish () |
2274 | |
2398 | |
2275 | void glClear (int mask) |
2399 | void glClear (int mask) |
… | |
… | |
2397 | |
2521 | |
2398 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
2522 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
2399 | |
2523 | |
2400 | void glDrawPixels (int width, int height, int format, int type, char *pixels) |
2524 | void glDrawPixels (int width, int height, int format, int type, char *pixels) |
2401 | |
2525 | |
|
|
2526 | void glPixelZoom (float x, float y) |
|
|
2527 | |
2402 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
2528 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
2403 | |
2529 | |
2404 | int glGenTexture () |
2530 | int glGenTexture () |
2405 | CODE: |
2531 | CODE: |
2406 | RETVAL = gen_texture (); |
2532 | RETVAL = gen_texture (); |