ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.94 by root, Tue May 23 18:57:35 2006 UTC vs.
Revision 1.97 by root, Fri May 26 18:28:23 2006 UTC

565 CODE: 565 CODE:
566#ifndef _WIN32 566#ifndef _WIN32
567 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); 567 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val));
568#endif 568#endif
569 569
570char *
571gl_vendor ()
572 CODE:
573 RETVAL = (char *)glGetString (GL_VENDOR);
574 OUTPUT:
575 RETVAL
576
577char *
578gl_version ()
579 CODE:
580 RETVAL = (char *)glGetString (GL_VERSION);
581 OUTPUT:
582 RETVAL
583
584char *
585gl_extensions ()
586 CODE:
587 RETVAL = (char *)glGetString (GL_EXTENSIONS);
588 OUTPUT:
589 RETVAL
590
591void 570void
592add_font (char *file) 571add_font (char *file)
593 CODE: 572 CODE:
594 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ 573 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */
595#ifdef _WIN32 574#ifdef _WIN32
731 710
732CFClient::Layout 711CFClient::Layout
733new (SV *class, int rgba = 0) 712new (SV *class, int rgba = 0)
734 CODE: 713 CODE:
735#if _WIN32 714#if _WIN32
736 rgba = 0;//D 715 //rgba = 0;//D make stext nicer, breaks TextView
737#endif 716#endif
738 New (0, RETVAL, 1, struct cf_layout); 717 New (0, RETVAL, 1, struct cf_layout);
739 718
740 RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context); 719 RETVAL->pl = pango_layout_new (rgba ? cairo_context : ft2_context);
741 RETVAL->rgba = rgba; 720 RETVAL->rgba = rgba;
1097 tex->r = r; 1076 tex->r = r;
1098 tex->g = g; 1077 tex->g = g;
1099 tex->b = b; 1078 tex->b = b;
1100 tex->a = a; 1079 tex->a = a;
1101 } 1080 }
1081
1082 // somewhat hackish, but for textures that require it, it really
1083 // improves the look, and most others don't suffer.
1084 glBindTexture (GL_TEXTURE_2D, name);
1085 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
1086 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
1102} 1087}
1103 1088
1104int 1089int
1105ox (CFClient::Map self) 1090ox (CFClient::Map self)
1106 ALIAS: 1091 ALIAS:
1618 1603
1619 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 1604 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
1620 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 1605 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
1621} 1606}
1622 1607
1608char *
1609gl_vendor ()
1610 CODE:
1611 RETVAL = (char *)glGetString (GL_VENDOR);
1612 OUTPUT:
1613 RETVAL
1614
1615char *
1616gl_version ()
1617 CODE:
1618 RETVAL = (char *)glGetString (GL_VERSION);
1619 OUTPUT:
1620 RETVAL
1621
1622char *
1623gl_extensions ()
1624 CODE:
1625 RETVAL = (char *)glGetString (GL_EXTENSIONS);
1626 OUTPUT:
1627 RETVAL
1628
1623int glGetError () 1629int glGetError ()
1624 1630
1625void glClear (int mask) 1631void glClear (int mask)
1626 1632
1627void glClearColor (float r, float g, float b, float a = 1.0) 1633void glClearColor (float r, float g, float b, float a = 1.0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines