… | |
… | |
441 | SDL_Rect **m; |
441 | SDL_Rect **m; |
442 | |
442 | |
443 | SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5); |
443 | SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5); |
444 | SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5); |
444 | SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5); |
445 | SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5); |
445 | SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5); |
446 | SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 16); |
446 | SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 1); |
447 | |
447 | |
448 | SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 64); |
448 | SDL_GL_SetAttribute (SDL_GL_BUFFER_SIZE, 15); |
449 | SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 0); |
449 | SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 0); |
450 | |
450 | |
451 | SDL_GL_SetAttribute (SDL_GL_ACCUM_RED_SIZE, 0); |
451 | SDL_GL_SetAttribute (SDL_GL_ACCUM_RED_SIZE, 0); |
452 | SDL_GL_SetAttribute (SDL_GL_ACCUM_GREEN_SIZE, 0); |
452 | SDL_GL_SetAttribute (SDL_GL_ACCUM_GREEN_SIZE, 0); |
453 | SDL_GL_SetAttribute (SDL_GL_ACCUM_BLUE_SIZE, 0); |
453 | SDL_GL_SetAttribute (SDL_GL_ACCUM_BLUE_SIZE, 0); |
… | |
… | |
469 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)av))); |
469 | XPUSHs (sv_2mortal (newRV_noinc ((SV *)av))); |
470 | |
470 | |
471 | ++m; |
471 | ++m; |
472 | } |
472 | } |
473 | } |
473 | } |
|
|
474 | |
|
|
475 | char * |
|
|
476 | SDL_GetError () |
474 | |
477 | |
475 | int |
478 | int |
476 | SDL_SetVideoMode (int w, int h, int fullscreen) |
479 | SDL_SetVideoMode (int w, int h, int fullscreen) |
477 | CODE: |
480 | CODE: |
478 | RETVAL = !!SDL_SetVideoMode ( |
481 | RETVAL = !!SDL_SetVideoMode ( |
… | |
… | |
713 | MODULE = CFClient PACKAGE = CFClient::Layout |
716 | MODULE = CFClient PACKAGE = CFClient::Layout |
714 | |
717 | |
715 | CFClient::Layout |
718 | CFClient::Layout |
716 | new (SV *class, int rgba = 0) |
719 | new (SV *class, int rgba = 0) |
717 | CODE: |
720 | CODE: |
|
|
721 | #if _WIN32 |
|
|
722 | rgba = 0;//D |
|
|
723 | #endif |
718 | New (0, RETVAL, 1, struct cf_layout); |
724 | New (0, RETVAL, 1, struct cf_layout); |
719 | |
725 | |
720 | RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context); |
726 | RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context); |
721 | RETVAL->rgba = rgba; |
727 | RETVAL->rgba = rgba; |
722 | RETVAL->r = 1.; |
728 | RETVAL->r = 1.; |
… | |
… | |
902 | |
908 | |
903 | while (p < e) |
909 | while (p < e) |
904 | { |
910 | { |
905 | uint32_t rgba = *p; |
911 | uint32_t rgba = *p; |
906 | rgba = (rgba >> 24) | (rgba << 8); |
912 | rgba = (rgba >> 24) | (rgba << 8); |
|
|
913 | #if 0 |
|
|
914 | #ifdef _WIN32 |
|
|
915 | {//D |
|
|
916 | uint8_t r = rgba >> 24; |
|
|
917 | uint8_t g = rgba >> 16; |
|
|
918 | uint8_t b = rgba >> 8; |
|
|
919 | uint8_t a = rgba >> 0; |
|
|
920 | |
|
|
921 | rgba = (rgba & 0xffffff00) | a; |
|
|
922 | } |
|
|
923 | #endif |
|
|
924 | #endif |
907 | rgba = SDL_SwapBE32 (rgba); |
925 | rgba = SDL_SwapBE32 (rgba); |
908 | *p++ = rgba; |
926 | *p++ = rgba; |
909 | } |
927 | } |
910 | } |
928 | } |
911 | |
929 | |