Changeset 167


Ignore:
Timestamp:
07/17/13 04:14:38 (12 years ago)
Author:
epyon
Message:
  • freetype2 - using new function loading method
  • gl - using new function loading method
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/lib/freetype2.hh

    r24 r167  
    3737#else
    3838#       define NV_FREETYPE_API extern
    39 #endif
    40 
    41 #if defined(NV_FREETYPE_DYNAMIC)
    42 #       define NV_FREETYPE_FUN( rtype, fname, fparams ) NV_FREETYPE_API rtype (NV_FREETYPE_APIENTRY *fname) fparams
    43 #else
    44 #       define NV_FREETYPE_FUN( rtype, fname, fparams ) NV_FREETYPE_API rtype NV_FREETYPE_APIENTRY fname fparams
    4539#endif
    4640
     
    10751069  } FT_StrokerBorder;
    10761070
    1077 NV_FREETYPE_FUN( FT_Error, FT_Init_FreeType, ( FT_Library  *alibrary ) );
    1078 NV_FREETYPE_FUN( FT_Error, FT_Done_FreeType, ( FT_Library  library ) );
    1079 NV_FREETYPE_FUN( FT_Error, FT_New_Face, ( FT_Library library, const char*  filepathname, FT_Long face_index, FT_Face *aface ) );
    1080 NV_FREETYPE_FUN( FT_Error, FT_New_Memory_Face, ( FT_Library library, const FT_Byte*  file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface ) );
    1081 NV_FREETYPE_FUN( FT_Error, FT_Open_Face, ( FT_Library library, const FT_Open_Args*  args, FT_Long face_index, FT_Face *aface ) );
    1082 NV_FREETYPE_FUN( FT_Error, FT_Attach_File, ( FT_Face face, const char*  filepathname ) );
    1083 NV_FREETYPE_FUN( FT_Error, FT_Attach_Stream, ( FT_Face face, FT_Open_Args* parameters ) );
    1084 NV_FREETYPE_FUN( FT_Error, FT_Reference_Face, ( FT_Face  face ) );
    1085 NV_FREETYPE_FUN( FT_Error, FT_Done_Face, ( FT_Face  face ) );
    1086 NV_FREETYPE_FUN( FT_Error, FT_Select_Size, ( FT_Face face, FT_Int strike_index ) );
    1087 NV_FREETYPE_FUN( FT_Error, FT_Request_Size, ( FT_Face face, FT_Size_Request req ) );
    1088 NV_FREETYPE_FUN( FT_Error, FT_Set_Char_Size, ( FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution ) );
    1089 NV_FREETYPE_FUN( FT_Error, FT_Set_Pixel_Sizes, ( FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height ) );
    1090 NV_FREETYPE_FUN( FT_Error, FT_Load_Glyph, ( FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags ) );
    1091 NV_FREETYPE_FUN( FT_Error, FT_Load_Char, ( FT_Face face, FT_ULong char_code, FT_Int32 load_flags ) );
    1092 NV_FREETYPE_FUN( void, FT_Set_Transform, ( FT_Face face, FT_Matrix* matrix, FT_Vector* delta ) );
    1093 NV_FREETYPE_FUN( FT_Error, FT_Render_Glyph, ( FT_GlyphSlot slot, FT_Render_Mode render_mode ) );
    1094 NV_FREETYPE_FUN( FT_Error, FT_Get_Kerning, ( FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning ) );
    1095 NV_FREETYPE_FUN( FT_Error, FT_Get_Track_Kerning, ( FT_Face face, FT_Fixed point_size, FT_Int degree, FT_Fixed* akerning ) );
    1096 NV_FREETYPE_FUN( FT_Error, FT_Get_Glyph_Name, ( FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ) );
    1097 NV_FREETYPE_FUN( const char*, FT_Get_Postscript_Name, ( FT_Face face ) );
    1098 NV_FREETYPE_FUN( FT_Error, FT_Select_Charmap, ( FT_Face face, FT_Encoding  encoding ) );
    1099 NV_FREETYPE_FUN( FT_Error, FT_Set_Charmap, ( FT_Face face, FT_CharMap charmap ) );
    1100 NV_FREETYPE_FUN( FT_Int, FT_Get_Charmap_Index, ( FT_CharMap charmap ) );
    1101 NV_FREETYPE_FUN( FT_UInt, FT_Get_Char_Index, ( FT_Face face, FT_ULong charcode ) );
    1102 NV_FREETYPE_FUN( FT_ULong, FT_Get_First_Char, ( FT_Face face, FT_UInt *agindex ) );
    1103 NV_FREETYPE_FUN( FT_ULong, FT_Get_Next_Char, ( FT_Face face, FT_ULong char_code, FT_UInt *agindex ) );
    1104 NV_FREETYPE_FUN( FT_UInt, FT_Get_Name_Index, ( FT_Face face, FT_String* glyph_name ) );
    1105 NV_FREETYPE_FUN( FT_Error, FT_Get_SubGlyph_Info, ( FT_GlyphSlot glyph, FT_UInt sub_index, FT_Int *p_index, FT_UInt *p_flags, FT_Int *p_arg1, FT_Int *p_arg2, FT_Matrix *p_transform ) );
    1106 NV_FREETYPE_FUN( FT_UShort, FT_Get_FSType_Flags, ( FT_Face  face ) );
    1107 NV_FREETYPE_FUN( FT_UInt, FT_Face_GetCharVariantIndex, ( FT_Face face, FT_ULong charcode, FT_ULong variantSelector ) );
    1108 NV_FREETYPE_FUN( FT_Int, FT_Face_GetCharVariantIsDefault, ( FT_Face face, FT_ULong charcode, FT_ULong variantSelector ) );
    1109 NV_FREETYPE_FUN( FT_UInt32*, FT_Face_GetVariantSelectors, ( FT_Face face ) );
    1110 NV_FREETYPE_FUN( FT_UInt32*, FT_Face_GetVariantsOfChar, ( FT_Face face, FT_ULong charcode ) );
    1111 NV_FREETYPE_FUN( FT_UInt32*, FT_Face_GetCharsOfVariant, ( FT_Face face, FT_ULong variantSelector ) );
    1112 NV_FREETYPE_FUN( FT_Long, FT_MulFix, ( FT_Long  a, FT_Long  b ) );
    1113 NV_FREETYPE_FUN( FT_Long, FT_DivFix, ( FT_Long  a, FT_Long  b ) );
    1114 NV_FREETYPE_FUN( FT_Fixed, FT_RoundFix, ( FT_Fixed  a ) );
    1115 NV_FREETYPE_FUN( FT_Fixed, FT_CeilFix, ( FT_Fixed  a ) );
    1116 NV_FREETYPE_FUN( FT_Fixed, FT_FloorFix, ( FT_Fixed  a ) );
    1117 NV_FREETYPE_FUN( void, FT_Vector_Transform, ( FT_Vector* vec, const FT_Matrix*  matrix ) );
    1118 NV_FREETYPE_FUN( void, FT_Library_Version, ( FT_Library library, FT_Int *amajor, FT_Int *aminor, FT_Int *apatch ) );
    1119 NV_FREETYPE_FUN( FT_Error, FT_Get_Glyph, ( FT_GlyphSlot slot, FT_Glyph *aglyph ) );
    1120 NV_FREETYPE_FUN( FT_Error, FT_Glyph_Copy, ( FT_Glyph source, FT_Glyph *target ) );
    1121 NV_FREETYPE_FUN( FT_Error, FT_Glyph_Transform, ( FT_Glyph glyph, FT_Matrix* matrix, FT_Vector* delta ) );
    1122 NV_FREETYPE_FUN( void, FT_Glyph_Get_CBox, ( FT_Glyph glyph, FT_UInt bbox_mode, FT_BBox  *acbox ) );
    1123 NV_FREETYPE_FUN( FT_Error, FT_Glyph_To_Bitmap, ( FT_Glyph* the_glyph, FT_Render_Mode render_mode, FT_Vector* origin, FT_Bool destroy ) );
    1124 NV_FREETYPE_FUN( void, FT_Done_Glyph, ( FT_Glyph  glyph ) );
    1125 NV_FREETYPE_FUN( void, FT_Matrix_Multiply, ( const FT_Matrix*  a, FT_Matrix*        b ) );
    1126 NV_FREETYPE_FUN( FT_Error, FT_Matrix_Invert, ( FT_Matrix*  matrix ) );
    1127 NV_FREETYPE_FUN( FT_Renderer, FT_Get_Renderer, ( FT_Library library, FT_Glyph_Format format ) );
    1128 NV_FREETYPE_FUN( FT_Error, FT_Set_Renderer, ( FT_Library library, FT_Renderer renderer, FT_UInt num_params, FT_Parameter* parameters ) );
    1129 NV_FREETYPE_FUN( FT_Error, FT_Add_Module, ( FT_Library library, const FT_Module_Class*  clazz ) );
    1130 NV_FREETYPE_FUN( FT_Module, FT_Get_Module, ( FT_Library library, const char*  module_name ) );
    1131 NV_FREETYPE_FUN( FT_Error, FT_Remove_Module, ( FT_Library  library, FT_Module   module ) );
    1132 NV_FREETYPE_FUN( FT_Error, FT_Reference_Library, ( FT_Library  library ) );
    1133 NV_FREETYPE_FUN( FT_Error, FT_New_Library, ( FT_Memory memory, FT_Library  *alibrary ) );
    1134 NV_FREETYPE_FUN( FT_Error, FT_Done_Library, ( FT_Library  library ) );
    1135 NV_FREETYPE_FUN( void, FT_Set_Debug_Hook, ( FT_Library library, FT_UInt hook_index, FT_DebugHook_Func  debug_hook ) );
    1136 NV_FREETYPE_FUN( void, FT_Add_Default_Modules, ( FT_Library  library ) );
    1137 NV_FREETYPE_FUN( FT_TrueTypeEngineType, FT_Get_TrueType_Engine_Type, ( FT_Library  library ) );
    1138 NV_FREETYPE_FUN( FT_Error, FT_Get_Advance, ( FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance ) );
    1139 NV_FREETYPE_FUN( FT_Error, FT_Get_Advances, ( FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 load_flags, FT_Fixed *padvances ) );
    1140 NV_FREETYPE_FUN( FT_Error, FT_Outline_Decompose, ( FT_Outline* outline, const FT_Outline_Funcs*  func_interface, void* user ) );
    1141 NV_FREETYPE_FUN( FT_Error, FT_Outline_New, ( FT_Library library, FT_UInt numPoints, FT_Int numContours, FT_Outline  *anoutline ) );
    1142 NV_FREETYPE_FUN( FT_Error, FT_Outline_New_Internal, ( FT_Memory memory, FT_UInt numPoints, FT_Int numContours, FT_Outline  *anoutline ) );
    1143 NV_FREETYPE_FUN( FT_Error, FT_Outline_Done, ( FT_Library library, FT_Outline*  outline ) );
    1144 NV_FREETYPE_FUN( FT_Error, FT_Outline_Done_Internal, ( FT_Memory memory, FT_Outline* outline ) );
    1145 NV_FREETYPE_FUN( FT_Error, FT_Outline_Check, ( FT_Outline*  outline ) );
    1146 NV_FREETYPE_FUN( void, FT_Outline_Get_CBox, ( const FT_Outline* outline, FT_BBox *acbox ) );
    1147 NV_FREETYPE_FUN( void, FT_Outline_Translate, ( const FT_Outline* outline, FT_Pos xOffset, FT_Pos yOffset ) );
    1148 NV_FREETYPE_FUN( FT_Error, FT_Outline_Copy, ( const FT_Outline* source, FT_Outline *target ) );
    1149 NV_FREETYPE_FUN( void, FT_Outline_Transform, ( const FT_Outline* outline, const FT_Matrix* matrix ) );
    1150 NV_FREETYPE_FUN( FT_Error, FT_Outline_Embolden, ( FT_Outline* outline, FT_Pos strength ) );
    1151 NV_FREETYPE_FUN( void, FT_Outline_Reverse, ( FT_Outline*  outline ) );
    1152 NV_FREETYPE_FUN( FT_Error, FT_Outline_Get_Bitmap, ( FT_Library library, FT_Outline* outline, const FT_Bitmap *abitmap ) );
    1153 NV_FREETYPE_FUN( FT_Error, FT_Outline_Render, ( FT_Library library, FT_Outline* outline, FT_Raster_Params* params ) );
    1154 NV_FREETYPE_FUN( FT_Orientation, FT_Outline_Get_Orientation, ( FT_Outline*  outline ) );
    1155 NV_FREETYPE_FUN( FT_Error, FT_Outline_Get_BBox, ( FT_Outline* outline, FT_BBox *abbox ) );
    1156 NV_FREETYPE_FUN( void, FT_Bitmap_New, ( FT_Bitmap  *abitmap ) );
    1157 NV_FREETYPE_FUN( FT_Error, FT_Bitmap_Copy, ( FT_Library library, const FT_Bitmap *source, FT_Bitmap *target ) );
    1158 NV_FREETYPE_FUN( FT_Error, FT_Bitmap_Embolden, ( FT_Library library, FT_Bitmap* bitmap, FT_Pos xStrength, FT_Pos yStrength ) );
    1159 NV_FREETYPE_FUN( FT_Error, FT_Bitmap_Convert, ( FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment ) );
    1160 NV_FREETYPE_FUN( FT_Error, FT_GlyphSlot_Own_Bitmap, ( FT_GlyphSlot  slot ) );
    1161 NV_FREETYPE_FUN( FT_Error, FT_Bitmap_Done, ( FT_Library library, FT_Bitmap *bitmap ) );
    1162 NV_FREETYPE_FUN( FT_Error, FT_Get_BDF_Charset_ID, ( FT_Face face, const char* *acharset_encoding, const char* *acharset_registry ) );
    1163 NV_FREETYPE_FUN( FT_Error, FT_Get_BDF_Property, ( FT_Face face, const char* prop_name, BDF_PropertyRec *aproperty ) );
    1164 NV_FREETYPE_FUN( FT_Error, FT_Get_CID_Registry_Ordering_Supplement, ( FT_Face face, const char* *registry, const char* *ordering, FT_Int *supplement ) );
    1165 NV_FREETYPE_FUN( FT_Error, FT_Get_CID_Is_Internally_CID_Keyed, ( FT_Face face, FT_Bool *is_cid ) );
    1166 NV_FREETYPE_FUN( FT_Error, FT_Get_CID_From_Glyph_Index, ( FT_Face face, FT_UInt glyph_index, FT_UInt *cid ) );
    1167 NV_FREETYPE_FUN( FT_Error, FT_Get_PFR_Metrics, ( FT_Face face, FT_UInt *aoutline_resolution, FT_UInt   *ametrics_resolution, FT_Fixed  *ametrics_x_scale, FT_Fixed  *ametrics_y_scale ) );
    1168 NV_FREETYPE_FUN( FT_Error, FT_Get_PFR_Kerning, ( FT_Face face, FT_UInt left, FT_UInt right, FT_Vector  *avector ) );
    1169 NV_FREETYPE_FUN( FT_Error, FT_Get_PFR_Advance, ( FT_Face face, FT_UInt gindex, FT_Pos *aadvance ) );
    1170 NV_FREETYPE_FUN( FT_Int, FT_Get_Gasp, ( FT_Face face, FT_UInt ppem ) );
    1171 NV_FREETYPE_FUN( FT_Error, FT_New_Size, ( FT_Face face, FT_Size* size ) );
    1172 NV_FREETYPE_FUN( FT_Error, FT_Done_Size, ( FT_Size size ) );
    1173 NV_FREETYPE_FUN( FT_Error, FT_Activate_Size, ( FT_Size  size ) );
    1174 NV_FREETYPE_FUN( FT_UInt, FT_Get_Sfnt_Name_Count, ( FT_Face  face ) );
    1175 NV_FREETYPE_FUN( FT_Error, FT_Get_Sfnt_Name, ( FT_Face face, FT_UInt idx, FT_SfntName  *aname ) );
    1176 
    1177 NV_FREETYPE_FUN( FT_StrokerBorder, FT_Outline_GetInsideBorder, ( FT_Outline* outline ) );
    1178 NV_FREETYPE_FUN( FT_StrokerBorder, FT_Outline_GetOutsideBorder, ( FT_Outline* outline ) );
    1179 NV_FREETYPE_FUN( FT_Error, FT_Stroker_New, ( FT_Library library, FT_Stroker *astroker ) );
    1180 NV_FREETYPE_FUN( void, FT_Stroker_Set, ( FT_Stroker stroker, FT_Fixed radius, FT_Stroker_LineCap line_cap, FT_Stroker_LineJoin line_join, FT_Fixed miter_limit ) );
    1181 NV_FREETYPE_FUN( void, FT_Stroker_Rewind, ( FT_Stroker stroker ) );
    1182 NV_FREETYPE_FUN( FT_Error, FT_Stroker_ParseOutline, ( FT_Stroker stroker, FT_Outline* outline, FT_Bool opened ) );
    1183 NV_FREETYPE_FUN( FT_Error, FT_Stroker_BeginSubPath, ( FT_Stroker stroker, FT_Vector* to, FT_Bool open ) );
    1184 NV_FREETYPE_FUN( FT_Error, FT_Stroker_EndSubPath, ( FT_Stroker stroker ) );
    1185 NV_FREETYPE_FUN( FT_Error, FT_Stroker_LineTo, ( FT_Stroker stroker, FT_Vector* to ) );
    1186 NV_FREETYPE_FUN( FT_Error, FT_Stroker_ConicTo, ( FT_Stroker stroker, FT_Vector* control, FT_Vector* to ) );
    1187 NV_FREETYPE_FUN( FT_Error, FT_Stroker_CubicTo, ( FT_Stroker stroker, FT_Vector* control1, FT_Vector* control2, FT_Vector* to ) );
    1188 NV_FREETYPE_FUN( FT_Error, FT_Stroker_GetBorderCounts, ( FT_Stroker stroker, FT_StrokerBorder border, FT_UInt *anum_points, FT_UInt *anum_contours ) );
    1189 NV_FREETYPE_FUN( void, FT_Stroker_ExportBorder, ( FT_Stroker stroker, FT_StrokerBorder border, FT_Outline* outline ) );
    1190 NV_FREETYPE_FUN( FT_Error, FT_Stroker_GetCounts, ( FT_Stroker stroker, FT_UInt *anum_points, FT_UInt *anum_contours ) );
    1191 NV_FREETYPE_FUN( void, FT_Stroker_Export, ( FT_Stroker stroker, FT_Outline* outline ) );
    1192 NV_FREETYPE_FUN( void, FT_Stroker_Done, ( FT_Stroker stroker ) );
    1193 NV_FREETYPE_FUN( FT_Error, FT_Glyph_Stroke, ( FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool destroy ) );
    1194 NV_FREETYPE_FUN( FT_Error, FT_Glyph_StrokeBorder, ( FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool inside, FT_Bool destroy ) );
    1195 
    1196 NV_FREETYPE_FUN( FT_Fixed, FT_Sin, ( FT_Angle angle ) );
    1197 NV_FREETYPE_FUN( FT_Fixed, FT_Cos, ( FT_Angle angle ) );
    1198 NV_FREETYPE_FUN( FT_Fixed, FT_Tan, ( FT_Angle angle ) );
    1199 NV_FREETYPE_FUN( FT_Angle, FT_Atan2, ( FT_Fixed x, FT_Fixed  y ) );
    1200 NV_FREETYPE_FUN( FT_Angle, FT_Angle_Diff, ( FT_Angle angle1, FT_Angle  angle2 ) );
    1201 NV_FREETYPE_FUN( void, FT_Vector_Unit, ( FT_Vector* vec, FT_Angle angle ) );
    1202 NV_FREETYPE_FUN( void, FT_Vector_Rotate, ( FT_Vector* vec, FT_Angle angle ) );
    1203 NV_FREETYPE_FUN( FT_Fixed, FT_Vector_Length, ( FT_Vector* vec ) );
    1204 NV_FREETYPE_FUN( void, FT_Vector_Polarize, ( FT_Vector* vec, FT_Fixed *length, FT_Angle *angle ) );
    1205 NV_FREETYPE_FUN( void, FT_Vector_From_Polar, ( FT_Vector* vec, FT_Fixed length, FT_Angle angle ) );
    1206 NV_FREETYPE_FUN( FT_Error, FT_Library_SetLcdFilter, ( FT_Library library, FT_LcdFilter  filter ) );
    1207 NV_FREETYPE_FUN( FT_Error, FT_Library_SetLcdFilterWeights, ( FT_Library library, unsigned char *weights ) );
     1071#if defined(NV_FREETYPE_DYNAMIC)
     1072#       define NV_FREETYPE_FUN( rtype, fname, fparams ) NV_FREETYPE_API rtype (NV_FREETYPE_APIENTRY *fname) fparams
     1073#else
     1074#       define NV_FREETYPE_FUN( rtype, fname, fparams ) NV_FREETYPE_API rtype NV_FREETYPE_APIENTRY fname fparams
     1075#endif
     1076
     1077#include <nv/lib/detail/freetype2_functions.inc>
     1078
     1079#undef NV_FREETYPE_FUN
    12081080}
    12091081
  • trunk/nv/lib/gl.hh

    r160 r167  
    3737#else
    3838#       define NV_GL_API extern
    39 #endif
    40 
    41 #if defined(NV_GL_DYNAMIC)
    42 #       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype ( NV_GL_APIENTRY *fname) fparams
    43 #else
    44 #       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype NV_GL_APIENTRY fname fparams
    4539#endif
    4640
     
    509503#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
    510504
    511 /* OpenGL 1.1 non-deprecated functions */
    512 NV_GL_FUN( void , glCullFace , ( GLenum ) );
    513 NV_GL_FUN( void , glFrontFace , ( GLenum ) );
    514 NV_GL_FUN( void , glHint , ( GLenum, GLenum ) );
    515 NV_GL_FUN( void , glLineWidth , ( GLfloat ) );
    516 NV_GL_FUN( void , glPointSize , ( GLfloat ) );
    517 NV_GL_FUN( void , glPolygonMode , ( GLenum, GLenum ) );
    518 NV_GL_FUN( void , glScissor , ( GLint , GLint , GLsizei , GLsizei ) );
    519 NV_GL_FUN( void , glTexParameterf , ( GLenum , GLenum , GLfloat ) );
    520 NV_GL_FUN( void , glTexParameterfv , ( GLenum , GLenum , const GLfloat *) );
    521 NV_GL_FUN( void , glTexParameteri , ( GLenum , GLenum , GLint ) );
    522 NV_GL_FUN( void , glTexParameteriv , ( GLenum , GLenum , const GLint *) );
    523 NV_GL_FUN( void , glTexImage1D , ( GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *) );
    524 NV_GL_FUN( void , glTexImage2D , ( GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *) );
    525 NV_GL_FUN( void , glDrawBuffer , ( GLenum ) );
    526 NV_GL_FUN( void , glClear , ( GLbitfield ) );
    527 NV_GL_FUN( void , glClearColor , ( GLfloat , GLfloat , GLfloat , GLfloat ) );
    528 NV_GL_FUN( void , glClearStencil , ( GLint ) );
    529 NV_GL_FUN( void , glClearDepth , ( GLdouble ) );
    530 NV_GL_FUN( void , glStencilMask , ( GLuint ) );
    531 NV_GL_FUN( void , glColorMask , ( GLboolean , GLboolean , GLboolean , GLboolean ) );
    532 NV_GL_FUN( void , glDepthMask , ( GLboolean ) );
    533 NV_GL_FUN( void , glDisable , ( GLenum ) );
    534 NV_GL_FUN( void , glEnable , ( GLenum ) );
    535 NV_GL_FUN( void , glFinish , ( void ) );
    536 NV_GL_FUN( void , glFlush , ( void ) );
    537 NV_GL_FUN( void , glBlendFunc , ( GLenum, GLenum ) );
    538 NV_GL_FUN( void , glLogicOp , ( GLenum ) );
    539 NV_GL_FUN( void , glStencilFunc , ( GLenum , GLint , GLuint ) );
    540 NV_GL_FUN( void , glStencilOp , ( GLenum , GLenum , GLenum ) );
    541 NV_GL_FUN( void , glDepthFunc , ( GLenum ) );
    542 NV_GL_FUN( void , glPixelStoref , ( GLenum , GLfloat ) );
    543 NV_GL_FUN( void , glPixelStorei , ( GLenum , GLint ) );
    544 NV_GL_FUN( void , glReadBuffer , ( GLenum ) );
    545 NV_GL_FUN( void , glReadPixels , ( GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , GLvoid *) );
    546 NV_GL_FUN( void , glGetBooleanv , ( GLenum , GLboolean *) );
    547 NV_GL_FUN( void , glGetDoublev , ( GLenum , GLdouble *) );
    548 NV_GL_FUN( GLenum , glGetError , ( void ) );
    549 NV_GL_FUN( void , glGetFloatv , ( GLenum , GLfloat *) );
    550 NV_GL_FUN( void , glGetIntegerv , ( GLenum , GLint *) );
    551 NV_GL_FUN( const GLubyte * , glGetString , ( GLenum ) );
    552 NV_GL_FUN( void , glGetTexImage , ( GLenum , GLint , GLenum , GLenum , GLvoid *) );
    553 NV_GL_FUN( void , glGetTexParameterfv , ( GLenum , GLenum , GLfloat *) );
    554 NV_GL_FUN( void , glGetTexParameteriv , ( GLenum , GLenum , GLint *) );
    555 NV_GL_FUN( void , glGetTexLevelParameterfv , ( GLenum , GLint , GLenum , GLfloat *) );
    556 NV_GL_FUN( void , glGetTexLevelParameteriv , ( GLenum , GLint , GLenum , GLint *) );
    557 NV_GL_FUN( GLboolean , glIsEnabled , ( GLenum ) );
    558 NV_GL_FUN( void , glDepthRange , ( GLdouble , GLdouble ) );
    559 NV_GL_FUN( void , glViewport , ( GLint , GLint , GLsizei , GLsizei ) );
    560 NV_GL_FUN( void , glDrawArrays , ( GLenum , GLint , GLsizei ) );
    561 NV_GL_FUN( void , glDrawElements , ( GLenum , GLsizei , GLenum , const GLvoid *) );
    562 NV_GL_FUN( void , glGetPointerv , ( GLenum , GLvoid* *) );
    563 NV_GL_FUN( void , glPolygonOffset , ( GLfloat , GLfloat ) );
    564 NV_GL_FUN( void , glCopyTexImage1D , ( GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint ) );
    565 NV_GL_FUN( void , glCopyTexImage2D , ( GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint ) );
    566 NV_GL_FUN( void , glCopyTexSubImage1D , ( GLenum , GLint , GLint , GLint , GLint , GLsizei ) );
    567 NV_GL_FUN( void , glCopyTexSubImage2D , ( GLenum , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei ) );
    568 NV_GL_FUN( void , glTexSubImage1D , ( GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *) );
    569 NV_GL_FUN( void , glTexSubImage2D , ( GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *) );
    570 NV_GL_FUN( void , glBindTexture , ( GLenum , GLuint ) );
    571 NV_GL_FUN( void , glDeleteTextures , ( GLsizei , const GLuint *) );
    572 NV_GL_FUN( void , glGenTextures , ( GLsizei , GLuint *) );
    573 NV_GL_FUN( GLboolean , glIsTexture , ( GLuint ) );
    574 NV_GL_FUN( void , glIndexub , ( GLubyte ) );
    575 NV_GL_FUN( void , glIndexubv , ( const GLubyte *) );
    576 
    577 /* OpenGL 1.2 non-deprecated functions */
    578 NV_GL_FUN( void , glBlendColor , ( GLfloat , GLfloat , GLfloat , GLfloat ) );
    579 NV_GL_FUN( void , glBlendEquation , ( GLenum ) );
    580 NV_GL_FUN( void , glDrawRangeElements , ( GLenum , GLuint , GLuint , GLsizei , GLenum , const GLvoid *) );
    581 NV_GL_FUN( void , glTexSubImage3D , ( GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *) );
    582 NV_GL_FUN( void , glCopyTexSubImage3D , ( GLenum , GLint , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei ) );
    583 
    584 /* OpenGL 1.3 non-deprecated functions */
    585 NV_GL_FUN( void , glActiveTexture , ( GLenum ) );
    586 NV_GL_FUN( void , glSampleCoverage , ( GLfloat , GLboolean ) );
    587 NV_GL_FUN( void , glCompressedTexImage3D , ( GLenum , GLint , GLenum , GLsizei , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *) );
    588 NV_GL_FUN( void , glCompressedTexImage2D , ( GLenum , GLint , GLenum , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *) );
    589 NV_GL_FUN( void , glCompressedTexImage1D , ( GLenum , GLint , GLenum , GLsizei , GLint , GLsizei , const GLvoid *) );
    590 NV_GL_FUN( void , glCompressedTexSubImage3D , ( GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *) );
    591 NV_GL_FUN( void , glCompressedTexSubImage2D , ( GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *) );
    592 NV_GL_FUN( void , glCompressedTexSubImage1D , ( GLenum , GLint , GLint , GLsizei , GLenum , GLsizei , const GLvoid *) );
    593 NV_GL_FUN( void , glGetCompressedTexImage , ( GLenum , GLint , GLvoid *) );
    594 
    595 /* OpenGL 1.4 non-deprecated functions */
    596 NV_GL_FUN( void , glBlendFuncSeparate , ( GLenum , GLenum , GLenum , GLenum ) );
    597 NV_GL_FUN( void , glMultiDrawArrays , ( GLenum , const GLint *, const GLsizei *, GLsizei ) );
    598 NV_GL_FUN( void , glMultiDrawElements , ( GLenum , const GLsizei *, GLenum , const GLvoid* const *, GLsizei ) );
    599 NV_GL_FUN( void , glPointParameterf , ( GLenum , GLfloat ) );
    600 NV_GL_FUN( void , glPointParameterfv , ( GLenum , const GLfloat *) );
    601 NV_GL_FUN( void , glPointParameteri , ( GLenum , GLint ) );
    602 NV_GL_FUN( void , glPointParameteriv , ( GLenum , const GLint *) );
    603 
    604 /* OpenGL 1.5 non-deprecated functions */
    605 NV_GL_FUN( void , glGenQueries , ( GLsizei , GLuint *) );
    606 NV_GL_FUN( void , glDeleteQueries , ( GLsizei , const GLuint *) );
    607 NV_GL_FUN( GLboolean , glIsQuery , ( GLuint ) );
    608 NV_GL_FUN( void , glBeginQuery , ( GLenum , GLuint ) );
    609 NV_GL_FUN( void , glEndQuery , ( GLenum ) );
    610 NV_GL_FUN( void , glGetQueryiv , ( GLenum , GLenum , GLint *) );
    611 NV_GL_FUN( void , glGetQueryObjectiv , ( GLuint , GLenum , GLint *) );
    612 NV_GL_FUN( void , glGetQueryObjectuiv , ( GLuint , GLenum , GLuint *) );
    613 NV_GL_FUN( void , glBindBuffer , ( GLenum , GLuint ) );
    614 NV_GL_FUN( void , glDeleteBuffers , ( GLsizei , const GLuint *) );
    615 NV_GL_FUN( void , glGenBuffers , ( GLsizei , GLuint *) );
    616 NV_GL_FUN( GLboolean , glIsBuffer , ( GLuint ) );
    617 NV_GL_FUN( void , glBufferData , ( GLenum , GLsizeiptr , const GLvoid *, GLenum ) );
    618 NV_GL_FUN( void , glBufferSubData , ( GLenum , GLintptr , GLsizeiptr , const GLvoid *) );
    619 NV_GL_FUN( void , glGetBufferSubData , ( GLenum , GLintptr , GLsizeiptr , GLvoid *) );
    620 NV_GL_FUN( GLvoid* , glMapBuffer , ( GLenum , GLenum ) );
    621 NV_GL_FUN( GLboolean , glUnmapBuffer , ( GLenum ) );
    622 NV_GL_FUN( void , glGetBufferParameteriv , ( GLenum , GLenum , GLint *) );
    623 NV_GL_FUN( void , glGetBufferPointerv , ( GLenum , GLenum , GLvoid* *) );
    624 
    625 /* OpenGL 2.0 non-deprecated functions */
    626 NV_GL_FUN( void , glBlendEquationSeparate , ( GLenum , GLenum ) );
    627 NV_GL_FUN( void , glDrawBuffers , ( GLsizei , const GLenum *) );
    628 NV_GL_FUN( void , glStencilOpSeparate , ( GLenum , GLenum , GLenum , GLenum ) );
    629 NV_GL_FUN( void , glStencilFuncSeparate , ( GLenum , GLenum , GLint , GLuint ) );
    630 NV_GL_FUN( void , glStencilMaskSeparate , ( GLenum , GLuint ) );
    631 NV_GL_FUN( void , glAttachShader , ( GLuint , GLuint ) );
    632 NV_GL_FUN( void , glBindAttribLocation , ( GLuint , GLuint , const GLchar *) );
    633 NV_GL_FUN( void , glCompileShader , ( GLuint ) );
    634 NV_GL_FUN( GLuint , glCreateProgram , ( void ) );
    635 NV_GL_FUN( GLuint , glCreateShader , ( GLenum ) );
    636 NV_GL_FUN( void , glDeleteProgram , ( GLuint ) );
    637 NV_GL_FUN( void , glDeleteShader , ( GLuint ) );
    638 NV_GL_FUN( void , glDetachShader , ( GLuint, GLuint ) );
    639 NV_GL_FUN( void , glDisableVertexAttribArray , ( GLuint ) );
    640 NV_GL_FUN( void , glEnableVertexAttribArray , ( GLuint ) );
    641 NV_GL_FUN( void , glGetActiveAttrib , ( GLuint , GLuint , GLsizei , GLsizei *, GLint *, GLenum *, GLchar *) );
    642 NV_GL_FUN( void , glGetActiveUniform , ( GLuint , GLuint , GLsizei , GLsizei *, GLint *, GLenum *, GLchar *) );
    643 NV_GL_FUN( void , glGetAttachedShaders , ( GLuint , GLsizei , GLsizei *, GLuint *) );
    644 NV_GL_FUN( GLint , glGetAttribLocation , ( GLuint , const GLchar *) );
    645 NV_GL_FUN( void , glGetProgramiv , ( GLuint , GLenum , GLint *) );
    646 NV_GL_FUN( void , glGetProgramInfoLog , ( GLuint , GLsizei , GLsizei *, GLchar *) );
    647 NV_GL_FUN( void , glGetShaderiv , ( GLuint , GLenum , GLint *) );
    648 NV_GL_FUN( void , glGetShaderInfoLog , ( GLuint , GLsizei , GLsizei *, GLchar *) );
    649 NV_GL_FUN( void , glGetShaderSource , ( GLuint , GLsizei , GLsizei *, GLchar *) );
    650 NV_GL_FUN( GLint , glGetUniformLocation , ( GLuint , const GLchar *) );
    651 NV_GL_FUN( void , glGetUniformfv , ( GLuint , GLint , GLfloat *) );
    652 NV_GL_FUN( void , glGetUniformiv , ( GLuint , GLint , GLint *) );
    653 NV_GL_FUN( void , glGetVertexAttribdv , ( GLuint , GLenum , GLdouble *) );
    654 NV_GL_FUN( void , glGetVertexAttribfv , ( GLuint , GLenum , GLfloat *) );
    655 NV_GL_FUN( void , glGetVertexAttribiv , ( GLuint , GLenum , GLint *) );
    656 NV_GL_FUN( void , glGetVertexAttribPointerv , ( GLuint , GLenum , GLvoid* *) );
    657 NV_GL_FUN( GLboolean , glIsProgram , ( GLuint ) );
    658 NV_GL_FUN( GLboolean , glIsShader , ( GLuint ) );
    659 NV_GL_FUN( void , glLinkProgram , ( GLuint ) );
    660 NV_GL_FUN( void , glShaderSource , ( GLuint , GLsizei , const GLchar* const *, const GLint *) );
    661 NV_GL_FUN( void , glUseProgram , ( GLuint ) );
    662 NV_GL_FUN( void , glUniform1f , ( GLint , GLfloat ) );
    663 NV_GL_FUN( void , glUniform2f , ( GLint , GLfloat , GLfloat ) );
    664 NV_GL_FUN( void , glUniform3f , ( GLint , GLfloat , GLfloat , GLfloat ) );
    665 NV_GL_FUN( void , glUniform4f , ( GLint , GLfloat , GLfloat , GLfloat , GLfloat ) );
    666 NV_GL_FUN( void , glUniform1i , ( GLint , GLint ) );
    667 NV_GL_FUN( void , glUniform2i , ( GLint , GLint , GLint ) );
    668 NV_GL_FUN( void , glUniform3i , ( GLint , GLint , GLint , GLint ) );
    669 NV_GL_FUN( void , glUniform4i , ( GLint , GLint , GLint , GLint , GLint ) );
    670 NV_GL_FUN( void , glUniform1fv , ( GLint , GLsizei , const GLfloat *) );
    671 NV_GL_FUN( void , glUniform2fv , ( GLint , GLsizei , const GLfloat *) );
    672 NV_GL_FUN( void , glUniform3fv , ( GLint , GLsizei , const GLfloat *) );
    673 NV_GL_FUN( void , glUniform4fv , ( GLint , GLsizei , const GLfloat *) );
    674 NV_GL_FUN( void , glUniform1iv , ( GLint , GLsizei , const GLint *) );
    675 NV_GL_FUN( void , glUniform2iv , ( GLint , GLsizei , const GLint *) );
    676 NV_GL_FUN( void , glUniform3iv , ( GLint , GLsizei , const GLint *) );
    677 NV_GL_FUN( void , glUniform4iv , ( GLint , GLsizei , const GLint *) );
    678 NV_GL_FUN( void , glUniformMatrix2fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    679 NV_GL_FUN( void , glUniformMatrix3fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    680 NV_GL_FUN( void , glUniformMatrix4fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    681 NV_GL_FUN( void , glValidateProgram , ( GLuint ) );
    682 NV_GL_FUN( void , glVertexAttribPointer , ( GLuint , GLint , GLenum , GLboolean , GLsizei , const GLvoid *) );
    683 
    684 /* OpenGL 2.1 non-deprecated functions */
    685 NV_GL_FUN( void , glUniformMatrix2x3fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    686 NV_GL_FUN( void , glUniformMatrix3x2fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    687 NV_GL_FUN( void , glUniformMatrix2x4fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    688 NV_GL_FUN( void , glUniformMatrix4x2fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    689 NV_GL_FUN( void , glUniformMatrix3x4fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    690 NV_GL_FUN( void , glUniformMatrix4x3fv , ( GLint , GLsizei , GLboolean , const GLfloat *) );
    691 
     505#if defined(NV_GL_DYNAMIC)
     506#       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype ( NV_GL_APIENTRY *fname) fparams
     507#else
     508#       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype NV_GL_APIENTRY fname fparams
     509#endif
     510#define NV_GL_FUN_EXT NV_GL_FUN
     511
     512#include <nv/lib/detail/gl_functions.inc>
     513
     514#undef NV_GL_FUN_EXT
    692515#undef NV_GL_FUN
    693516
  • trunk/src/lib/freetype2.cc

    r109 r167  
    1111#include "nv/library.hh"
    1212
    13 FT_Error (NV_FREETYPE_APIENTRY *FT_Init_FreeType) (  FT_Library  *alibrary  ) = nullptr;
    14 FT_Error (NV_FREETYPE_APIENTRY *FT_Done_FreeType) (  FT_Library  library  ) = nullptr;
    15 FT_Error (NV_FREETYPE_APIENTRY *FT_New_Face) (  FT_Library library, const char*  filepathname, FT_Long face_index, FT_Face *aface  ) = nullptr;
    16 FT_Error (NV_FREETYPE_APIENTRY *FT_New_Memory_Face) (  FT_Library library, const FT_Byte*  file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface  ) = nullptr;
    17 FT_Error (NV_FREETYPE_APIENTRY *FT_Open_Face) (  FT_Library library, const FT_Open_Args*  args, FT_Long face_index, FT_Face *aface  ) = nullptr;
    18 FT_Error (NV_FREETYPE_APIENTRY *FT_Attach_File) (  FT_Face face, const char*  filepathname  ) = nullptr;
    19 FT_Error (NV_FREETYPE_APIENTRY *FT_Attach_Stream) (  FT_Face face, FT_Open_Args* parameters  ) = nullptr;
    20 FT_Error (NV_FREETYPE_APIENTRY *FT_Reference_Face) (  FT_Face  face  ) = nullptr;
    21 FT_Error (NV_FREETYPE_APIENTRY *FT_Done_Face) (  FT_Face  face  ) = nullptr;
    22 FT_Error (NV_FREETYPE_APIENTRY *FT_Select_Size) (  FT_Face face, FT_Int strike_index  ) = nullptr;
    23 FT_Error (NV_FREETYPE_APIENTRY *FT_Request_Size) (  FT_Face face, FT_Size_Request req  ) = nullptr;
    24 FT_Error (NV_FREETYPE_APIENTRY *FT_Set_Char_Size) (  FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution  ) = nullptr;
    25 FT_Error (NV_FREETYPE_APIENTRY *FT_Set_Pixel_Sizes) (  FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height  ) = nullptr;
    26 FT_Error (NV_FREETYPE_APIENTRY *FT_Load_Glyph) (  FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags  ) = nullptr;
    27 FT_Error (NV_FREETYPE_APIENTRY *FT_Load_Char) (  FT_Face face, FT_ULong char_code, FT_Int32 load_flags  ) = nullptr;
    28 void (NV_FREETYPE_APIENTRY *FT_Set_Transform) (  FT_Face face, FT_Matrix* matrix, FT_Vector* delta  ) = nullptr;
    29 FT_Error (NV_FREETYPE_APIENTRY *FT_Render_Glyph) (  FT_GlyphSlot slot, FT_Render_Mode render_mode  ) = nullptr;
    30 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Kerning) (  FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning  ) = nullptr;
    31 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Track_Kerning) (  FT_Face face, FT_Fixed point_size, FT_Int degree, FT_Fixed* akerning  ) = nullptr;
    32 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Glyph_Name) (  FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max  ) = nullptr;
    33 const char* (NV_FREETYPE_APIENTRY *FT_Get_Postscript_Name) (  FT_Face face  ) = nullptr;
    34 FT_Error (NV_FREETYPE_APIENTRY *FT_Select_Charmap) (  FT_Face face, FT_Encoding  encoding  ) = nullptr;
    35 FT_Error (NV_FREETYPE_APIENTRY *FT_Set_Charmap) (  FT_Face face, FT_CharMap charmap  ) = nullptr;
    36 FT_Int (NV_FREETYPE_APIENTRY *FT_Get_Charmap_Index) (  FT_CharMap charmap  ) = nullptr;
    37 FT_UInt (NV_FREETYPE_APIENTRY *FT_Get_Char_Index) (  FT_Face face, FT_ULong charcode  ) = nullptr;
    38 FT_ULong (NV_FREETYPE_APIENTRY *FT_Get_First_Char) (  FT_Face face, FT_UInt *agindex  ) = nullptr;
    39 FT_ULong (NV_FREETYPE_APIENTRY *FT_Get_Next_Char) (  FT_Face face, FT_ULong char_code, FT_UInt *agindex  ) = nullptr;
    40 FT_UInt (NV_FREETYPE_APIENTRY *FT_Get_Name_Index) (  FT_Face face, FT_String* glyph_name  ) = nullptr;
    41 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_SubGlyph_Info) (  FT_GlyphSlot glyph, FT_UInt sub_index, FT_Int *p_index, FT_UInt *p_flags, FT_Int *p_arg1, FT_Int *p_arg2, FT_Matrix *p_transform  ) = nullptr;
    42 FT_UShort (NV_FREETYPE_APIENTRY *FT_Get_FSType_Flags) (  FT_Face  face  ) = nullptr;
    43 FT_UInt (NV_FREETYPE_APIENTRY *FT_Face_GetCharVariantIndex) (  FT_Face face, FT_ULong charcode, FT_ULong variantSelector  ) = nullptr;
    44 FT_Int (NV_FREETYPE_APIENTRY *FT_Face_GetCharVariantIsDefault) (  FT_Face face, FT_ULong charcode, FT_ULong variantSelector  ) = nullptr;
    45 FT_UInt32* (NV_FREETYPE_APIENTRY *FT_Face_GetVariantSelectors) (  FT_Face face  ) = nullptr;
    46 FT_UInt32* (NV_FREETYPE_APIENTRY *FT_Face_GetVariantsOfChar) (  FT_Face face, FT_ULong charcode  ) = nullptr;
    47 FT_UInt32* (NV_FREETYPE_APIENTRY *FT_Face_GetCharsOfVariant) (  FT_Face face, FT_ULong variantSelector  ) = nullptr;
    48 FT_Long (NV_FREETYPE_APIENTRY *FT_MulFix) (  FT_Long  a, FT_Long  b  ) = nullptr;
    49 FT_Long (NV_FREETYPE_APIENTRY *FT_DivFix) (  FT_Long  a, FT_Long  b  ) = nullptr;
    50 FT_Fixed (NV_FREETYPE_APIENTRY *FT_RoundFix) (  FT_Fixed  a  ) = nullptr;
    51 FT_Fixed (NV_FREETYPE_APIENTRY *FT_CeilFix) (  FT_Fixed  a  ) = nullptr;
    52 FT_Fixed (NV_FREETYPE_APIENTRY *FT_FloorFix) (  FT_Fixed  a  ) = nullptr;
    53 void (NV_FREETYPE_APIENTRY *FT_Vector_Transform) (  FT_Vector* vec, const FT_Matrix*  matrix  ) = nullptr;
    54 void (NV_FREETYPE_APIENTRY *FT_Library_Version) (  FT_Library library, FT_Int *amajor, FT_Int *aminor, FT_Int *apatch  ) = nullptr;
    55 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Glyph) (  FT_GlyphSlot slot, FT_Glyph *aglyph  ) = nullptr;
    56 FT_Error (NV_FREETYPE_APIENTRY *FT_Glyph_Copy) (  FT_Glyph source, FT_Glyph *target  ) = nullptr;
    57 FT_Error (NV_FREETYPE_APIENTRY *FT_Glyph_Transform) (  FT_Glyph glyph, FT_Matrix* matrix, FT_Vector* delta  ) = nullptr;
    58 void (NV_FREETYPE_APIENTRY *FT_Glyph_Get_CBox) (  FT_Glyph glyph, FT_UInt bbox_mode, FT_BBox  *acbox  ) = nullptr;
    59 FT_Error (NV_FREETYPE_APIENTRY *FT_Glyph_To_Bitmap) (  FT_Glyph* the_glyph, FT_Render_Mode render_mode, FT_Vector* origin, FT_Bool destroy  ) = nullptr;
    60 void (NV_FREETYPE_APIENTRY *FT_Done_Glyph) (  FT_Glyph  glyph  ) = nullptr;
    61 void (NV_FREETYPE_APIENTRY *FT_Matrix_Multiply) (  const FT_Matrix*  a, FT_Matrix*        b  ) = nullptr;
    62 FT_Error (NV_FREETYPE_APIENTRY *FT_Matrix_Invert) (  FT_Matrix*  matrix  ) = nullptr;
    63 FT_Renderer (NV_FREETYPE_APIENTRY *FT_Get_Renderer) (  FT_Library library, FT_Glyph_Format format  ) = nullptr;
    64 FT_Error (NV_FREETYPE_APIENTRY *FT_Set_Renderer) (  FT_Library library, FT_Renderer renderer, FT_UInt num_params, FT_Parameter* parameters  ) = nullptr;
    65 FT_Error (NV_FREETYPE_APIENTRY *FT_Add_Module) (  FT_Library library, const FT_Module_Class*  clazz  ) = nullptr;
    66 FT_Module (NV_FREETYPE_APIENTRY *FT_Get_Module) (  FT_Library library, const char*  module_name  ) = nullptr;
    67 FT_Error (NV_FREETYPE_APIENTRY *FT_Remove_Module) (  FT_Library  library, FT_Module   module  ) = nullptr;
    68 FT_Error (NV_FREETYPE_APIENTRY *FT_Reference_Library) (  FT_Library  library  ) = nullptr;
    69 FT_Error (NV_FREETYPE_APIENTRY *FT_New_Library) (  FT_Memory memory, FT_Library  *alibrary  ) = nullptr;
    70 FT_Error (NV_FREETYPE_APIENTRY *FT_Done_Library) (  FT_Library  library  ) = nullptr;
    71 void (NV_FREETYPE_APIENTRY *FT_Set_Debug_Hook) (  FT_Library library, FT_UInt hook_index, FT_DebugHook_Func  debug_hook  ) = nullptr;
    72 void (NV_FREETYPE_APIENTRY *FT_Add_Default_Modules) (  FT_Library  library  ) = nullptr;
    73 FT_TrueTypeEngineType (NV_FREETYPE_APIENTRY *FT_Get_TrueType_Engine_Type) (  FT_Library  library  ) = nullptr;
    74 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Advance) (  FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance  ) = nullptr;
    75 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Advances) (  FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 load_flags, FT_Fixed *padvances  ) = nullptr;
    76 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Decompose) (  FT_Outline* outline, const FT_Outline_Funcs*  func_interface, void* user  ) = nullptr;
    77 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_New) (  FT_Library library, FT_UInt numPoints, FT_Int numContours, FT_Outline  *anoutline  ) = nullptr;
    78 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_New_Internal) (  FT_Memory memory, FT_UInt numPoints, FT_Int numContours, FT_Outline  *anoutline  ) = nullptr;
    79 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Done) (  FT_Library library, FT_Outline*  outline  ) = nullptr;
    80 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Done_Internal) (  FT_Memory memory, FT_Outline* outline  ) = nullptr;
    81 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Check) (  FT_Outline*  outline  ) = nullptr;
    82 void (NV_FREETYPE_APIENTRY *FT_Outline_Get_CBox) (  const FT_Outline* outline, FT_BBox *acbox  ) = nullptr;
    83 void (NV_FREETYPE_APIENTRY *FT_Outline_Translate) (  const FT_Outline* outline, FT_Pos xOffset, FT_Pos yOffset  ) = nullptr;
    84 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Copy) (  const FT_Outline* source, FT_Outline *target  ) = nullptr;
    85 void (NV_FREETYPE_APIENTRY *FT_Outline_Transform) (  const FT_Outline* outline, const FT_Matrix* matrix  ) = nullptr;
    86 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Embolden) (  FT_Outline* outline, FT_Pos strength  ) = nullptr;
    87 void (NV_FREETYPE_APIENTRY *FT_Outline_Reverse) (  FT_Outline*  outline  ) = nullptr;
    88 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Get_Bitmap) (  FT_Library library, FT_Outline* outline, const FT_Bitmap *abitmap  ) = nullptr;
    89 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Render) (  FT_Library library, FT_Outline* outline, FT_Raster_Params* params  ) = nullptr;
    90 FT_Orientation (NV_FREETYPE_APIENTRY *FT_Outline_Get_Orientation) (  FT_Outline*  outline  ) = nullptr;
    91 FT_Error (NV_FREETYPE_APIENTRY *FT_Outline_Get_BBox) (  FT_Outline* outline, FT_BBox *abbox  ) = nullptr;
    92 void (NV_FREETYPE_APIENTRY *FT_Bitmap_New) (  FT_Bitmap  *abitmap  ) = nullptr;
    93 FT_Error (NV_FREETYPE_APIENTRY *FT_Bitmap_Copy) (  FT_Library library, const FT_Bitmap *source, FT_Bitmap *target  ) = nullptr;
    94 FT_Error (NV_FREETYPE_APIENTRY *FT_Bitmap_Embolden) (  FT_Library library, FT_Bitmap* bitmap, FT_Pos xStrength, FT_Pos yStrength  ) = nullptr;
    95 FT_Error (NV_FREETYPE_APIENTRY *FT_Bitmap_Convert) (  FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment  ) = nullptr;
    96 FT_Error (NV_FREETYPE_APIENTRY *FT_GlyphSlot_Own_Bitmap) (  FT_GlyphSlot  slot  ) = nullptr;
    97 FT_Error (NV_FREETYPE_APIENTRY *FT_Bitmap_Done) (  FT_Library library, FT_Bitmap *bitmap  ) = nullptr;
    98 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_BDF_Charset_ID) (  FT_Face face, const char* *acharset_encoding, const char* *acharset_registry  ) = nullptr;
    99 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_BDF_Property) (  FT_Face face, const char* prop_name, BDF_PropertyRec *aproperty  ) = nullptr;
    100 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_CID_Registry_Ordering_Supplement) (  FT_Face face, const char* *registry, const char* *ordering, FT_Int *supplement  ) = nullptr;
    101 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_CID_Is_Internally_CID_Keyed) (  FT_Face face, FT_Bool *is_cid  ) = nullptr;
    102 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_CID_From_Glyph_Index) (  FT_Face face, FT_UInt glyph_index, FT_UInt *cid  ) = nullptr;
    103 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_PFR_Metrics) (  FT_Face face, FT_UInt *aoutline_resolution, FT_UInt   *ametrics_resolution, FT_Fixed  *ametrics_x_scale, FT_Fixed  *ametrics_y_scale  ) = nullptr;
    104 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_PFR_Kerning) (  FT_Face face, FT_UInt left, FT_UInt right, FT_Vector  *avector  ) = nullptr;
    105 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_PFR_Advance) (  FT_Face face, FT_UInt gindex, FT_Pos *aadvance  ) = nullptr;
    106 FT_Int (NV_FREETYPE_APIENTRY *FT_Get_Gasp) (  FT_Face face, FT_UInt ppem  ) = nullptr;
    107 FT_Error (NV_FREETYPE_APIENTRY *FT_New_Size) (  FT_Face face, FT_Size* size  ) = nullptr;
    108 FT_Error (NV_FREETYPE_APIENTRY *FT_Done_Size) (  FT_Size size  ) = nullptr;
    109 FT_Error (NV_FREETYPE_APIENTRY *FT_Activate_Size) (  FT_Size  size  ) = nullptr;
    110 FT_UInt (NV_FREETYPE_APIENTRY *FT_Get_Sfnt_Name_Count) (  FT_Face  face  ) = nullptr;
    111 FT_Error (NV_FREETYPE_APIENTRY *FT_Get_Sfnt_Name) (  FT_Face face, FT_UInt idx, FT_SfntName  *aname  ) = nullptr;
    112 
    113 FT_StrokerBorder (NV_FREETYPE_APIENTRY *FT_Outline_GetInsideBorder) (  FT_Outline* outline  ) = nullptr;
    114 FT_StrokerBorder (NV_FREETYPE_APIENTRY *FT_Outline_GetOutsideBorder) (  FT_Outline* outline  ) = nullptr;
    115 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_New) (  FT_Library library, FT_Stroker *astroker  ) = nullptr;
    116 void (NV_FREETYPE_APIENTRY *FT_Stroker_Set) (  FT_Stroker stroker, FT_Fixed radius, FT_Stroker_LineCap line_cap, FT_Stroker_LineJoin line_join, FT_Fixed miter_limit  ) = nullptr;
    117 void (NV_FREETYPE_APIENTRY *FT_Stroker_Rewind) (  FT_Stroker stroker  ) = nullptr;
    118 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_ParseOutline) (  FT_Stroker stroker, FT_Outline* outline, FT_Bool opened  ) = nullptr;
    119 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_BeginSubPath) (  FT_Stroker stroker, FT_Vector* to, FT_Bool open  ) = nullptr;
    120 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_EndSubPath) (  FT_Stroker stroker  ) = nullptr;
    121 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_LineTo) (  FT_Stroker stroker, FT_Vector* to  ) = nullptr;
    122 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_ConicTo) (  FT_Stroker stroker, FT_Vector* control, FT_Vector* to  ) = nullptr;
    123 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_CubicTo) (  FT_Stroker stroker, FT_Vector* control1, FT_Vector* control2, FT_Vector* to  ) = nullptr;
    124 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_GetBorderCounts) (  FT_Stroker stroker, FT_StrokerBorder border, FT_UInt *anum_points, FT_UInt *anum_contours  ) = nullptr;
    125 void (NV_FREETYPE_APIENTRY *FT_Stroker_ExportBorder) (  FT_Stroker stroker, FT_StrokerBorder border, FT_Outline* outline  ) = nullptr;
    126 FT_Error (NV_FREETYPE_APIENTRY *FT_Stroker_GetCounts) (  FT_Stroker stroker, FT_UInt *anum_points, FT_UInt *anum_contours  ) = nullptr;
    127 void (NV_FREETYPE_APIENTRY *FT_Stroker_Export) (  FT_Stroker stroker, FT_Outline* outline  ) = nullptr;
    128 void (NV_FREETYPE_APIENTRY *FT_Stroker_Done) (  FT_Stroker stroker  ) = nullptr;
    129 FT_Error (NV_FREETYPE_APIENTRY *FT_Glyph_Stroke) (  FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool destroy  ) = nullptr;
    130 FT_Error (NV_FREETYPE_APIENTRY *FT_Glyph_StrokeBorder) (  FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool inside, FT_Bool destroy  ) = nullptr;
    131 
    132 FT_Fixed (NV_FREETYPE_APIENTRY *FT_Sin) (  FT_Angle angle  ) = nullptr;
    133 FT_Fixed (NV_FREETYPE_APIENTRY *FT_Cos) (  FT_Angle angle  ) = nullptr;
    134 FT_Fixed (NV_FREETYPE_APIENTRY *FT_Tan) (  FT_Angle angle  ) = nullptr;
    135 FT_Angle (NV_FREETYPE_APIENTRY *FT_Atan2) (  FT_Fixed x, FT_Fixed  y  ) = nullptr;
    136 FT_Angle (NV_FREETYPE_APIENTRY *FT_Angle_Diff) (  FT_Angle angle1, FT_Angle  angle2  ) = nullptr;
    137 void (NV_FREETYPE_APIENTRY *FT_Vector_Unit) (  FT_Vector* vec, FT_Angle angle  ) = nullptr;
    138 void (NV_FREETYPE_APIENTRY *FT_Vector_Rotate) (  FT_Vector* vec, FT_Angle angle  ) = nullptr;
    139 FT_Fixed (NV_FREETYPE_APIENTRY *FT_Vector_Length) (  FT_Vector* vec  ) = nullptr;
    140 void (NV_FREETYPE_APIENTRY *FT_Vector_Polarize) (  FT_Vector* vec, FT_Fixed *length, FT_Angle *angle  ) = nullptr;
    141 void (NV_FREETYPE_APIENTRY *FT_Vector_From_Polar) (  FT_Vector* vec, FT_Fixed length, FT_Angle angle  ) = nullptr;
    142 
    143 FT_Error (NV_FREETYPE_APIENTRY *FT_Library_SetLcdFilter) ( FT_Library library, FT_LcdFilter  filter ) = nullptr;
    144 FT_Error (NV_FREETYPE_APIENTRY *FT_Library_SetLcdFilterWeights) ( FT_Library library, unsigned char *weights ) = nullptr;
    145 
     13#define NV_FREETYPE_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr;
     14#include <nv/lib/detail/freetype2_functions.inc>
     15#undef NV_FREETYPE_FUN
    14616
    14717bool nv::load_freetype_library( const char* path )
    14818{
    149 #       define NV_FREETYPE_LOAD( symbol ) *(void **) (&symbol) = freetype_library.get(#symbol);
    15019        static nv::library freetype_library;
    15120        if ( freetype_library.is_open() ) return true;
    15221        freetype_library.open( path );
    15322
    154         NV_FREETYPE_LOAD( FT_Init_FreeType );
    155         NV_FREETYPE_LOAD( FT_Done_FreeType );
    156         NV_FREETYPE_LOAD( FT_New_Face );
    157         NV_FREETYPE_LOAD( FT_New_Memory_Face );
    158         NV_FREETYPE_LOAD( FT_Open_Face );
    159         NV_FREETYPE_LOAD( FT_Attach_File );
    160         NV_FREETYPE_LOAD( FT_Attach_Stream );
    161         NV_FREETYPE_LOAD( FT_Reference_Face );
    162         NV_FREETYPE_LOAD( FT_Done_Face );
    163         NV_FREETYPE_LOAD( FT_Select_Size );
    164         NV_FREETYPE_LOAD( FT_Request_Size );
    165         NV_FREETYPE_LOAD( FT_Set_Char_Size );
    166         NV_FREETYPE_LOAD( FT_Set_Pixel_Sizes );
    167         NV_FREETYPE_LOAD( FT_Load_Glyph );
    168         NV_FREETYPE_LOAD( FT_Load_Char );
    169         NV_FREETYPE_LOAD( FT_Set_Transform );
    170         NV_FREETYPE_LOAD( FT_Render_Glyph );
    171         NV_FREETYPE_LOAD( FT_Get_Kerning );
    172         NV_FREETYPE_LOAD( FT_Get_Track_Kerning );
    173         NV_FREETYPE_LOAD( FT_Get_Glyph_Name );
    174         NV_FREETYPE_LOAD( FT_Get_Postscript_Name );
    175         NV_FREETYPE_LOAD( FT_Select_Charmap );
    176         NV_FREETYPE_LOAD( FT_Set_Charmap );
    177         NV_FREETYPE_LOAD( FT_Get_Charmap_Index );
    178         NV_FREETYPE_LOAD( FT_Get_Char_Index );
    179         NV_FREETYPE_LOAD( FT_Get_First_Char );
    180         NV_FREETYPE_LOAD( FT_Get_Next_Char );
    181         NV_FREETYPE_LOAD( FT_Get_Name_Index );
    182         NV_FREETYPE_LOAD( FT_Get_SubGlyph_Info );
    183         NV_FREETYPE_LOAD( FT_Get_FSType_Flags );
    184         NV_FREETYPE_LOAD( FT_Face_GetCharVariantIndex );
    185         NV_FREETYPE_LOAD( FT_Face_GetCharVariantIsDefault );
    186         NV_FREETYPE_LOAD( FT_Face_GetVariantSelectors );
    187         NV_FREETYPE_LOAD( FT_Face_GetVariantsOfChar );
    188         NV_FREETYPE_LOAD( FT_Face_GetCharsOfVariant );
    189         NV_FREETYPE_LOAD( FT_MulFix );
    190         NV_FREETYPE_LOAD( FT_DivFix );
    191         NV_FREETYPE_LOAD( FT_RoundFix );
    192         NV_FREETYPE_LOAD( FT_CeilFix );
    193         NV_FREETYPE_LOAD( FT_FloorFix );
    194         NV_FREETYPE_LOAD( FT_Vector_Transform );
    195         NV_FREETYPE_LOAD( FT_Library_Version );
    196         NV_FREETYPE_LOAD( FT_Get_Glyph );
    197         NV_FREETYPE_LOAD( FT_Glyph_Copy );
    198         NV_FREETYPE_LOAD( FT_Glyph_Transform );
    199         NV_FREETYPE_LOAD( FT_Glyph_Get_CBox );
    200         NV_FREETYPE_LOAD( FT_Glyph_To_Bitmap );
    201         NV_FREETYPE_LOAD( FT_Done_Glyph );
    202         NV_FREETYPE_LOAD( FT_Matrix_Multiply );
    203         NV_FREETYPE_LOAD( FT_Matrix_Invert );
    204         NV_FREETYPE_LOAD( FT_Get_Renderer );
    205         NV_FREETYPE_LOAD( FT_Set_Renderer );
    206         NV_FREETYPE_LOAD( FT_Add_Module );
    207         NV_FREETYPE_LOAD( FT_Get_Module );
    208         NV_FREETYPE_LOAD( FT_Remove_Module );
    209         NV_FREETYPE_LOAD( FT_Reference_Library );
    210         NV_FREETYPE_LOAD( FT_New_Library );
    211         NV_FREETYPE_LOAD( FT_Done_Library );
    212         NV_FREETYPE_LOAD( FT_Set_Debug_Hook );
    213         NV_FREETYPE_LOAD( FT_Add_Default_Modules );
    214         NV_FREETYPE_LOAD( FT_Get_TrueType_Engine_Type );
    215         NV_FREETYPE_LOAD( FT_Get_Advance );
    216         NV_FREETYPE_LOAD( FT_Get_Advances );
    217         NV_FREETYPE_LOAD( FT_Outline_Decompose );
    218         NV_FREETYPE_LOAD( FT_Outline_New );
    219         NV_FREETYPE_LOAD( FT_Outline_New_Internal );
    220         NV_FREETYPE_LOAD( FT_Outline_Done );
    221         NV_FREETYPE_LOAD( FT_Outline_Done_Internal );
    222         NV_FREETYPE_LOAD( FT_Outline_Check );
    223         NV_FREETYPE_LOAD( FT_Outline_Get_CBox );
    224         NV_FREETYPE_LOAD( FT_Outline_Translate );
    225         NV_FREETYPE_LOAD( FT_Outline_Copy );
    226         NV_FREETYPE_LOAD( FT_Outline_Transform );
    227         NV_FREETYPE_LOAD( FT_Outline_Embolden );
    228         NV_FREETYPE_LOAD( FT_Outline_Reverse );
    229         NV_FREETYPE_LOAD( FT_Outline_Get_Bitmap );
    230         NV_FREETYPE_LOAD( FT_Outline_Render );
    231         NV_FREETYPE_LOAD( FT_Outline_Get_Orientation );
    232         NV_FREETYPE_LOAD( FT_Outline_Get_BBox );
    233         NV_FREETYPE_LOAD( FT_Bitmap_New );
    234         NV_FREETYPE_LOAD( FT_Bitmap_Copy );
    235         NV_FREETYPE_LOAD( FT_Bitmap_Embolden );
    236         NV_FREETYPE_LOAD( FT_Bitmap_Convert );
    237         NV_FREETYPE_LOAD( FT_GlyphSlot_Own_Bitmap );
    238         NV_FREETYPE_LOAD( FT_Bitmap_Done );
    239         NV_FREETYPE_LOAD( FT_Get_BDF_Charset_ID );
    240         NV_FREETYPE_LOAD( FT_Get_BDF_Property );
    241         NV_FREETYPE_LOAD( FT_Get_CID_Registry_Ordering_Supplement );
    242         NV_FREETYPE_LOAD( FT_Get_CID_Is_Internally_CID_Keyed );
    243         NV_FREETYPE_LOAD( FT_Get_CID_From_Glyph_Index );
    244         NV_FREETYPE_LOAD( FT_Get_PFR_Metrics );
    245         NV_FREETYPE_LOAD( FT_Get_PFR_Kerning );
    246         NV_FREETYPE_LOAD( FT_Get_PFR_Advance );
    247         NV_FREETYPE_LOAD( FT_Get_Gasp );
    248         NV_FREETYPE_LOAD( FT_New_Size );
    249         NV_FREETYPE_LOAD( FT_Done_Size );
    250         NV_FREETYPE_LOAD( FT_Activate_Size );
    251         NV_FREETYPE_LOAD( FT_Get_Sfnt_Name_Count );
    252         NV_FREETYPE_LOAD( FT_Get_Sfnt_Name );
    253 
    254         NV_FREETYPE_LOAD( FT_Outline_GetInsideBorder );
    255         NV_FREETYPE_LOAD( FT_Outline_GetOutsideBorder );
    256         NV_FREETYPE_LOAD( FT_Stroker_New );
    257         NV_FREETYPE_LOAD( FT_Stroker_Set );
    258         NV_FREETYPE_LOAD( FT_Stroker_Rewind );
    259         NV_FREETYPE_LOAD( FT_Stroker_ParseOutline );
    260         NV_FREETYPE_LOAD( FT_Stroker_BeginSubPath );
    261         NV_FREETYPE_LOAD( FT_Stroker_EndSubPath );
    262         NV_FREETYPE_LOAD( FT_Stroker_LineTo );
    263         NV_FREETYPE_LOAD( FT_Stroker_ConicTo );
    264         NV_FREETYPE_LOAD( FT_Stroker_CubicTo );
    265         NV_FREETYPE_LOAD( FT_Stroker_GetBorderCounts );
    266         NV_FREETYPE_LOAD( FT_Stroker_ExportBorder );
    267         NV_FREETYPE_LOAD( FT_Stroker_GetCounts );
    268         NV_FREETYPE_LOAD( FT_Stroker_Export );
    269         NV_FREETYPE_LOAD( FT_Stroker_Done );
    270         NV_FREETYPE_LOAD( FT_Glyph_Stroke );
    271         NV_FREETYPE_LOAD( FT_Glyph_StrokeBorder );
    272 
    273         NV_FREETYPE_LOAD( FT_Sin );
    274         NV_FREETYPE_LOAD( FT_Cos );
    275         NV_FREETYPE_LOAD( FT_Tan );
    276         NV_FREETYPE_LOAD( FT_Atan2 );
    277         NV_FREETYPE_LOAD( FT_Angle_Diff );
    278         NV_FREETYPE_LOAD( FT_Vector_Unit );
    279         NV_FREETYPE_LOAD( FT_Vector_Rotate );
    280         NV_FREETYPE_LOAD( FT_Vector_Length );
    281         NV_FREETYPE_LOAD( FT_Vector_Polarize );
    282         NV_FREETYPE_LOAD( FT_Vector_From_Polar );
    283         NV_FREETYPE_LOAD( FT_Library_SetLcdFilter );
    284         NV_FREETYPE_LOAD( FT_Library_SetLcdFilterWeights );
    285 
    286 #       undef NV_FREETYPE_LOAD
     23#       define NV_FREETYPE_FUN( rtype, fname, fparams ) *(void **) (&fname) = freetype_library.get(#fname);
     24#       include <nv/lib/detail/freetype2_functions.inc>
     25#       undef NV_FREETYPE_FUN
    28726        return true;
    28827}
  • trunk/src/lib/gl.cc

    r109 r167  
    1616#endif
    1717
    18 /* OpenGL 1.1 non-deprecated functions */
    19 void (NV_GL_APIENTRY *glCullFace) ( GLenum ) = nullptr;
    20 void (NV_GL_APIENTRY *glFrontFace) ( GLenum ) = nullptr;
    21 void (NV_GL_APIENTRY *glHint) ( GLenum, GLenum ) = nullptr;
    22 void (NV_GL_APIENTRY *glLineWidth) ( GLfloat ) = nullptr;
    23 void (NV_GL_APIENTRY *glPointSize) ( GLfloat ) = nullptr;
    24 void (NV_GL_APIENTRY *glPolygonMode) ( GLenum, GLenum ) = nullptr;
    25 void (NV_GL_APIENTRY *glScissor) ( GLint , GLint , GLsizei , GLsizei ) = nullptr;
    26 void (NV_GL_APIENTRY *glTexParameterf) ( GLenum , GLenum , GLfloat ) = nullptr;
    27 void (NV_GL_APIENTRY *glTexParameterfv) ( GLenum , GLenum , const GLfloat *) = nullptr;
    28 void (NV_GL_APIENTRY *glTexParameteri) ( GLenum , GLenum , GLint ) = nullptr;
    29 void (NV_GL_APIENTRY *glTexParameteriv) ( GLenum , GLenum , const GLint *) = nullptr;
    30 void (NV_GL_APIENTRY *glTexImage1D) ( GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *) = nullptr;
    31 void (NV_GL_APIENTRY *glTexImage2D) ( GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *) = nullptr;
    32 void (NV_GL_APIENTRY *glDrawBuffer) ( GLenum ) = nullptr;
    33 void (NV_GL_APIENTRY *glClear) ( GLbitfield ) = nullptr;
    34 void (NV_GL_APIENTRY *glClearColor) ( GLfloat , GLfloat , GLfloat , GLfloat ) = nullptr;
    35 void (NV_GL_APIENTRY *glClearStencil) ( GLint ) = nullptr;
    36 void (NV_GL_APIENTRY *glClearDepth) ( GLdouble ) = nullptr;
    37 void (NV_GL_APIENTRY *glStencilMask) ( GLuint ) = nullptr;
    38 void (NV_GL_APIENTRY *glColorMask) ( GLboolean , GLboolean , GLboolean , GLboolean ) = nullptr;
    39 void (NV_GL_APIENTRY *glDepthMask) ( GLboolean ) = nullptr;
    40 void (NV_GL_APIENTRY *glDisable) ( GLenum ) = nullptr;
    41 void (NV_GL_APIENTRY *glEnable) ( GLenum ) = nullptr;
    42 void (NV_GL_APIENTRY *glFinish) ( void ) = nullptr;
    43 void (NV_GL_APIENTRY *glFlush) ( void ) = nullptr;
    44 void (NV_GL_APIENTRY *glBlendFunc) ( GLenum, GLenum ) = nullptr;
    45 void (NV_GL_APIENTRY *glLogicOp) ( GLenum ) = nullptr;
    46 void (NV_GL_APIENTRY *glStencilFunc) ( GLenum , GLint , GLuint ) = nullptr;
    47 void (NV_GL_APIENTRY *glStencilOp) ( GLenum , GLenum , GLenum ) = nullptr;
    48 void (NV_GL_APIENTRY *glDepthFunc) ( GLenum ) = nullptr;
    49 void (NV_GL_APIENTRY *glPixelStoref) ( GLenum , GLfloat ) = nullptr;
    50 void (NV_GL_APIENTRY *glPixelStorei) ( GLenum , GLint ) = nullptr;
    51 void (NV_GL_APIENTRY *glReadBuffer) ( GLenum ) = nullptr;
    52 void (NV_GL_APIENTRY *glReadPixels) ( GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , GLvoid *) = nullptr;
    53 void (NV_GL_APIENTRY *glGetBooleanv) ( GLenum , GLboolean *) = nullptr;
    54 void (NV_GL_APIENTRY *glGetDoublev) ( GLenum , GLdouble *) = nullptr;
    55 GLenum (NV_GL_APIENTRY *glGetError) ( void ) = nullptr;
    56 void (NV_GL_APIENTRY *glGetFloatv) ( GLenum , GLfloat *) = nullptr;
    57 void (NV_GL_APIENTRY *glGetIntegerv) ( GLenum , GLint *) = nullptr;
    58 const GLubyte * (NV_GL_APIENTRY *glGetString) ( GLenum ) = nullptr;
    59 void (NV_GL_APIENTRY *glGetTexImage) ( GLenum , GLint , GLenum , GLenum , GLvoid *) = nullptr;
    60 void (NV_GL_APIENTRY *glGetTexParameterfv) ( GLenum , GLenum , GLfloat *) = nullptr;
    61 void (NV_GL_APIENTRY *glGetTexParameteriv) ( GLenum , GLenum , GLint *) = nullptr;
    62 void (NV_GL_APIENTRY *glGetTexLevelParameterfv) ( GLenum , GLint , GLenum , GLfloat *) = nullptr;
    63 void (NV_GL_APIENTRY *glGetTexLevelParameteriv) ( GLenum , GLint , GLenum , GLint *) = nullptr;
    64 GLboolean (NV_GL_APIENTRY *glIsEnabled) ( GLenum ) = nullptr;
    65 void (NV_GL_APIENTRY *glDepthRange) ( GLdouble , GLdouble ) = nullptr;
    66 void (NV_GL_APIENTRY *glViewport) ( GLint , GLint , GLsizei , GLsizei ) = nullptr;
    67 void (NV_GL_APIENTRY *glDrawArrays) ( GLenum , GLint , GLsizei ) = nullptr;
    68 void (NV_GL_APIENTRY *glDrawElements) ( GLenum , GLsizei , GLenum , const GLvoid *) = nullptr;
    69 void (NV_GL_APIENTRY *glGetPointerv) ( GLenum , GLvoid* *) = nullptr;
    70 void (NV_GL_APIENTRY *glPolygonOffset) ( GLfloat , GLfloat ) = nullptr;
    71 void (NV_GL_APIENTRY *glCopyTexImage1D) ( GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint ) = nullptr;
    72 void (NV_GL_APIENTRY *glCopyTexImage2D) ( GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint ) = nullptr;
    73 void (NV_GL_APIENTRY *glCopyTexSubImage1D) ( GLenum , GLint , GLint , GLint , GLint , GLsizei ) = nullptr;
    74 void (NV_GL_APIENTRY *glCopyTexSubImage2D) ( GLenum , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei ) = nullptr;
    75 void (NV_GL_APIENTRY *glTexSubImage1D) ( GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *) = nullptr;
    76 void (NV_GL_APIENTRY *glTexSubImage2D) ( GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *) = nullptr;
    77 void (NV_GL_APIENTRY *glBindTexture) ( GLenum , GLuint ) = nullptr;
    78 void (NV_GL_APIENTRY *glDeleteTextures) ( GLsizei , const GLuint *) = nullptr;
    79 void (NV_GL_APIENTRY *glGenTextures) ( GLsizei , GLuint *) = nullptr;
    80 GLboolean (NV_GL_APIENTRY *glIsTexture) ( GLuint ) = nullptr;
    81 void (NV_GL_APIENTRY *glIndexub) ( GLubyte ) = nullptr;
    82 void (NV_GL_APIENTRY *glIndexubv) ( const GLubyte *) = nullptr;
    83 
    84 /* OpenGL 1.2 non-deprecated functions */
    85 void (NV_GL_APIENTRY *glBlendColor) ( GLfloat , GLfloat , GLfloat , GLfloat ) = nullptr;
    86 void (NV_GL_APIENTRY *glBlendEquation) ( GLenum ) = nullptr;
    87 void (NV_GL_APIENTRY *glDrawRangeElements) ( GLenum , GLuint , GLuint , GLsizei , GLenum , const GLvoid *) = nullptr;
    88 void (NV_GL_APIENTRY *glTexSubImage3D) ( GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *) = nullptr;
    89 void (NV_GL_APIENTRY *glCopyTexSubImage3D) ( GLenum , GLint , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei ) = nullptr;
    90 
    91 /* OpenGL 1.3 non-deprecated functions */
    92 void (NV_GL_APIENTRY *glActiveTexture) ( GLenum ) = nullptr;
    93 void (NV_GL_APIENTRY *glSampleCoverage) ( GLfloat , GLboolean ) = nullptr;
    94 void (NV_GL_APIENTRY *glCompressedTexImage3D) ( GLenum , GLint , GLenum , GLsizei , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *) = nullptr;
    95 void (NV_GL_APIENTRY *glCompressedTexImage2D) ( GLenum , GLint , GLenum , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *) = nullptr;
    96 void (NV_GL_APIENTRY *glCompressedTexImage1D) ( GLenum , GLint , GLenum , GLsizei , GLint , GLsizei , const GLvoid *) = nullptr;
    97 void (NV_GL_APIENTRY *glCompressedTexSubImage3D) ( GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *) = nullptr;
    98 void (NV_GL_APIENTRY *glCompressedTexSubImage2D) ( GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *) = nullptr;
    99 void (NV_GL_APIENTRY *glCompressedTexSubImage1D) ( GLenum , GLint , GLint , GLsizei , GLenum , GLsizei , const GLvoid *) = nullptr;
    100 void (NV_GL_APIENTRY *glGetCompressedTexImage) ( GLenum , GLint , GLvoid *) = nullptr;
    101 
    102 /* OpenGL 1.4 non-deprecated functions */
    103 void (NV_GL_APIENTRY *glBlendFuncSeparate) ( GLenum , GLenum , GLenum , GLenum ) = nullptr;
    104 void (NV_GL_APIENTRY *glMultiDrawArrays) ( GLenum , const GLint *, const GLsizei *, GLsizei ) = nullptr;
    105 void (NV_GL_APIENTRY *glMultiDrawElements) ( GLenum , const GLsizei *, GLenum , const GLvoid* const *, GLsizei ) = nullptr;
    106 void (NV_GL_APIENTRY *glPointParameterf) ( GLenum , GLfloat ) = nullptr;
    107 void (NV_GL_APIENTRY *glPointParameterfv) ( GLenum , const GLfloat *) = nullptr;
    108 void (NV_GL_APIENTRY *glPointParameteri) ( GLenum , GLint ) = nullptr;
    109 void (NV_GL_APIENTRY *glPointParameteriv) ( GLenum , const GLint *) = nullptr;
    110 
    111 /* OpenGL 1.5 non-deprecated functions */
    112 void (NV_GL_APIENTRY *glGenQueries) ( GLsizei , GLuint *) = nullptr;
    113 void (NV_GL_APIENTRY *glDeleteQueries) ( GLsizei , const GLuint *) = nullptr;
    114 GLboolean (NV_GL_APIENTRY *glIsQuery) ( GLuint ) = nullptr;
    115 void (NV_GL_APIENTRY *glBeginQuery) ( GLenum , GLuint ) = nullptr;
    116 void (NV_GL_APIENTRY *glEndQuery) ( GLenum ) = nullptr;
    117 void (NV_GL_APIENTRY *glGetQueryiv) ( GLenum , GLenum , GLint *) = nullptr;
    118 void (NV_GL_APIENTRY *glGetQueryObjectiv) ( GLuint , GLenum , GLint *) = nullptr;
    119 void (NV_GL_APIENTRY *glGetQueryObjectuiv) ( GLuint , GLenum , GLuint *) = nullptr;
    120 void (NV_GL_APIENTRY *glBindBuffer) ( GLenum , GLuint ) = nullptr;
    121 void (NV_GL_APIENTRY *glDeleteBuffers) ( GLsizei , const GLuint *) = nullptr;
    122 void (NV_GL_APIENTRY *glGenBuffers) ( GLsizei , GLuint *) = nullptr;
    123 GLboolean (NV_GL_APIENTRY *glIsBuffer) ( GLuint ) = nullptr;
    124 void (NV_GL_APIENTRY *glBufferData) ( GLenum , GLsizeiptr , const GLvoid *, GLenum ) = nullptr;
    125 void (NV_GL_APIENTRY *glBufferSubData) ( GLenum , GLintptr , GLsizeiptr , const GLvoid *) = nullptr;
    126 void (NV_GL_APIENTRY *glGetBufferSubData) ( GLenum , GLintptr , GLsizeiptr , GLvoid *) = nullptr;
    127 GLvoid* (NV_GL_APIENTRY *glMapBuffer) ( GLenum , GLenum ) = nullptr;
    128 GLboolean (NV_GL_APIENTRY *glUnmapBuffer) ( GLenum ) = nullptr;
    129 void (NV_GL_APIENTRY *glGetBufferParameteriv) ( GLenum , GLenum , GLint *) = nullptr;
    130 void (NV_GL_APIENTRY *glGetBufferPointerv) ( GLenum , GLenum , GLvoid* *) = nullptr;
    131 
    132 /* OpenGL 2.0 non-deprecated functions */
    133 void (NV_GL_APIENTRY *glBlendEquationSeparate) ( GLenum , GLenum ) = nullptr;
    134 void (NV_GL_APIENTRY *glDrawBuffers) ( GLsizei , const GLenum *) = nullptr;
    135 void (NV_GL_APIENTRY *glStencilOpSeparate) ( GLenum , GLenum , GLenum , GLenum ) = nullptr;
    136 void (NV_GL_APIENTRY *glStencilFuncSeparate) ( GLenum , GLenum , GLint , GLuint ) = nullptr;
    137 void (NV_GL_APIENTRY *glStencilMaskSeparate) ( GLenum , GLuint ) = nullptr;
    138 void (NV_GL_APIENTRY *glAttachShader) ( GLuint , GLuint ) = nullptr;
    139 void (NV_GL_APIENTRY *glBindAttribLocation) ( GLuint , GLuint , const GLchar *) = nullptr;
    140 void (NV_GL_APIENTRY *glCompileShader) ( GLuint ) = nullptr;
    141 GLuint (NV_GL_APIENTRY *glCreateProgram) ( void ) = nullptr;
    142 GLuint (NV_GL_APIENTRY *glCreateShader) ( GLenum ) = nullptr;
    143 void (NV_GL_APIENTRY *glDeleteProgram) ( GLuint ) = nullptr;
    144 void (NV_GL_APIENTRY *glDeleteShader) ( GLuint ) = nullptr;
    145 void (NV_GL_APIENTRY *glDetachShader) ( GLuint, GLuint ) = nullptr;
    146 void (NV_GL_APIENTRY *glDisableVertexAttribArray) ( GLuint ) = nullptr;
    147 void (NV_GL_APIENTRY *glEnableVertexAttribArray) ( GLuint ) = nullptr;
    148 void (NV_GL_APIENTRY *glGetActiveAttrib) ( GLuint , GLuint , GLsizei , GLsizei *, GLint *, GLenum *, GLchar *) = nullptr;
    149 void (NV_GL_APIENTRY *glGetActiveUniform) ( GLuint , GLuint , GLsizei , GLsizei *, GLint *, GLenum *, GLchar *) = nullptr;
    150 void (NV_GL_APIENTRY *glGetAttachedShaders) ( GLuint , GLsizei , GLsizei *, GLuint *) = nullptr;
    151 GLint (NV_GL_APIENTRY *glGetAttribLocation) ( GLuint , const GLchar *) = nullptr;
    152 void (NV_GL_APIENTRY *glGetProgramiv) ( GLuint , GLenum , GLint *) = nullptr;
    153 void (NV_GL_APIENTRY *glGetProgramInfoLog) ( GLuint , GLsizei , GLsizei *, GLchar *) = nullptr;
    154 void (NV_GL_APIENTRY *glGetShaderiv) ( GLuint , GLenum , GLint *) = nullptr;
    155 void (NV_GL_APIENTRY *glGetShaderInfoLog) ( GLuint , GLsizei , GLsizei *, GLchar *) = nullptr;
    156 void (NV_GL_APIENTRY *glGetShaderSource) ( GLuint , GLsizei , GLsizei *, GLchar *) = nullptr;
    157 GLint (NV_GL_APIENTRY *glGetUniformLocation) ( GLuint , const GLchar *) = nullptr;
    158 void (NV_GL_APIENTRY *glGetUniformfv) ( GLuint , GLint , GLfloat *) = nullptr;
    159 void (NV_GL_APIENTRY *glGetUniformiv) ( GLuint , GLint , GLint *) = nullptr;
    160 void (NV_GL_APIENTRY *glGetVertexAttribdv) ( GLuint , GLenum , GLdouble *) = nullptr;
    161 void (NV_GL_APIENTRY *glGetVertexAttribfv) ( GLuint , GLenum , GLfloat *) = nullptr;
    162 void (NV_GL_APIENTRY *glGetVertexAttribiv) ( GLuint , GLenum , GLint *) = nullptr;
    163 void (NV_GL_APIENTRY *glGetVertexAttribPointerv) ( GLuint , GLenum , GLvoid* *) = nullptr;
    164 GLboolean (NV_GL_APIENTRY *glIsProgram) ( GLuint ) = nullptr;
    165 GLboolean (NV_GL_APIENTRY *glIsShader) ( GLuint ) = nullptr;
    166 void (NV_GL_APIENTRY *glLinkProgram) ( GLuint ) = nullptr;
    167 void (NV_GL_APIENTRY *glShaderSource) ( GLuint , GLsizei , const GLchar* const *, const GLint *) = nullptr;
    168 void (NV_GL_APIENTRY *glUseProgram) ( GLuint ) = nullptr;
    169 void (NV_GL_APIENTRY *glUniform1f) ( GLint , GLfloat ) = nullptr;
    170 void (NV_GL_APIENTRY *glUniform2f) ( GLint , GLfloat , GLfloat ) = nullptr;
    171 void (NV_GL_APIENTRY *glUniform3f) ( GLint , GLfloat , GLfloat , GLfloat ) = nullptr;
    172 void (NV_GL_APIENTRY *glUniform4f) ( GLint , GLfloat , GLfloat , GLfloat , GLfloat ) = nullptr;
    173 void (NV_GL_APIENTRY *glUniform1i) ( GLint , GLint ) = nullptr;
    174 void (NV_GL_APIENTRY *glUniform2i) ( GLint , GLint , GLint ) = nullptr;
    175 void (NV_GL_APIENTRY *glUniform3i) ( GLint , GLint , GLint , GLint ) = nullptr;
    176 void (NV_GL_APIENTRY *glUniform4i) ( GLint , GLint , GLint , GLint , GLint ) = nullptr;
    177 void (NV_GL_APIENTRY *glUniform1fv) ( GLint , GLsizei , const GLfloat *) = nullptr;
    178 void (NV_GL_APIENTRY *glUniform2fv) ( GLint , GLsizei , const GLfloat *) = nullptr;
    179 void (NV_GL_APIENTRY *glUniform3fv) ( GLint , GLsizei , const GLfloat *) = nullptr;
    180 void (NV_GL_APIENTRY *glUniform4fv) ( GLint , GLsizei , const GLfloat *) = nullptr;
    181 void (NV_GL_APIENTRY *glUniform1iv) ( GLint , GLsizei , const GLint *) = nullptr;
    182 void (NV_GL_APIENTRY *glUniform2iv) ( GLint , GLsizei , const GLint *) = nullptr;
    183 void (NV_GL_APIENTRY *glUniform3iv) ( GLint , GLsizei , const GLint *) = nullptr;
    184 void (NV_GL_APIENTRY *glUniform4iv) ( GLint , GLsizei , const GLint *) = nullptr;
    185 void (NV_GL_APIENTRY *glUniformMatrix2fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    186 void (NV_GL_APIENTRY *glUniformMatrix3fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    187 void (NV_GL_APIENTRY *glUniformMatrix4fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    188 void (NV_GL_APIENTRY *glValidateProgram) ( GLuint ) = nullptr;
    189 void (NV_GL_APIENTRY *glVertexAttribPointer) ( GLuint , GLint , GLenum , GLboolean , GLsizei , const GLvoid *) = nullptr;
    190 
    191 /* OpenGL 2.1 non-deprecated functions */
    192 void (NV_GL_APIENTRY *glUniformMatrix2x3fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    193 void (NV_GL_APIENTRY *glUniformMatrix3x2fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    194 void (NV_GL_APIENTRY *glUniformMatrix2x4fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    195 void (NV_GL_APIENTRY *glUniformMatrix4x2fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    196 void (NV_GL_APIENTRY *glUniformMatrix3x4fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
    197 void (NV_GL_APIENTRY *glUniformMatrix4x3fv) ( GLint , GLsizei , GLboolean , const GLfloat *) = nullptr;
     18#define NV_GL_FUN( rtype, fname, fparams ) rtype (NV_GL_APIENTRY *fname) fparams = nullptr;
     19#define NV_GL_FUN_EXT NV_GL_FUN
     20#include <nv/lib/detail/gl_functions.inc>
     21#undef NV_GL_FUN_EXT
     22#undef NV_GL_FUN
    19823
    19924bool nv::load_gl_library( const char* path )
     
    22247#endif
    22348
    224 /* OpenGL 1.1 non-deprecated functions */
    225         NV_GL_LOAD( glCullFace );
    226         NV_GL_LOAD( glFrontFace );
    227         NV_GL_LOAD( glHint );
    228         NV_GL_LOAD( glLineWidth );
    229         NV_GL_LOAD( glPointSize );
    230         NV_GL_LOAD( glPolygonMode );
    231         NV_GL_LOAD( glScissor );
    232         NV_GL_LOAD( glTexParameterf );
    233         NV_GL_LOAD( glTexParameterfv );
    234         NV_GL_LOAD( glTexParameteri );
    235         NV_GL_LOAD( glTexParameteriv );
    236         NV_GL_LOAD( glTexImage1D );
    237         NV_GL_LOAD( glTexImage2D );
    238         NV_GL_LOAD( glDrawBuffer );
    239         NV_GL_LOAD( glClear );
    240         NV_GL_LOAD( glClearColor );
    241         NV_GL_LOAD( glClearStencil );
    242         NV_GL_LOAD( glClearDepth );
    243         NV_GL_LOAD( glStencilMask );
    244         NV_GL_LOAD( glColorMask );
    245         NV_GL_LOAD( glDepthMask );
    246         NV_GL_LOAD( glDisable );
    247         NV_GL_LOAD( glEnable );
    248         NV_GL_LOAD( glFinish );
    249         NV_GL_LOAD( glFlush );
    250         NV_GL_LOAD( glBlendFunc );
    251         NV_GL_LOAD( glLogicOp );
    252         NV_GL_LOAD( glStencilFunc );
    253         NV_GL_LOAD( glStencilOp );
    254         NV_GL_LOAD( glDepthFunc );
    255         NV_GL_LOAD( glPixelStoref );
    256         NV_GL_LOAD( glPixelStorei );
    257         NV_GL_LOAD( glReadBuffer );
    258         NV_GL_LOAD( glReadPixels );
    259         NV_GL_LOAD( glGetBooleanv );
    260         NV_GL_LOAD( glGetDoublev );
    261         NV_GL_LOAD( glGetError );
    262         NV_GL_LOAD( glGetFloatv );
    263         NV_GL_LOAD( glGetIntegerv );
    264         NV_GL_LOAD( glGetString );
    265         NV_GL_LOAD( glGetTexImage );
    266         NV_GL_LOAD( glGetTexParameterfv );
    267         NV_GL_LOAD( glGetTexParameteriv );
    268         NV_GL_LOAD( glGetTexLevelParameterfv );
    269         NV_GL_LOAD( glGetTexLevelParameteriv );
    270         NV_GL_LOAD( glIsEnabled );
    271         NV_GL_LOAD( glDepthRange );
    272         NV_GL_LOAD( glViewport );
    273         NV_GL_LOAD( glDrawArrays );
    274         NV_GL_LOAD( glDrawElements );
    275         NV_GL_LOAD( glGetPointerv );
    276         NV_GL_LOAD( glPolygonOffset );
    277         NV_GL_LOAD( glCopyTexImage1D );
    278         NV_GL_LOAD( glCopyTexImage2D );
    279         NV_GL_LOAD( glCopyTexSubImage1D );
    280         NV_GL_LOAD( glCopyTexSubImage2D );
    281         NV_GL_LOAD( glTexSubImage1D );
    282         NV_GL_LOAD( glTexSubImage2D );
    283         NV_GL_LOAD( glBindTexture );
    284         NV_GL_LOAD( glDeleteTextures );
    285         NV_GL_LOAD( glGenTextures );
    286         NV_GL_LOAD( glIsTexture );
    287         NV_GL_LOAD( glIndexub );
    288         NV_GL_LOAD( glIndexubv );
    289 
    290 /* OpenGL 1.2 non-deprecated functions */
    291         NV_GL_LOAD_EXT( glBlendColor );
    292         NV_GL_LOAD_EXT( glBlendEquation );
    293         NV_GL_LOAD_EXT( glDrawRangeElements );
    294         NV_GL_LOAD_EXT( glTexSubImage3D );
    295         NV_GL_LOAD_EXT( glCopyTexSubImage3D );
    296 
    297 /* OpenGL 1.3 non-deprecated functions */
    298         NV_GL_LOAD_EXT( glActiveTexture );
    299         NV_GL_LOAD_EXT( glSampleCoverage );
    300         NV_GL_LOAD_EXT( glCompressedTexImage3D );
    301         NV_GL_LOAD_EXT( glCompressedTexImage2D );
    302         NV_GL_LOAD_EXT( glCompressedTexImage1D );
    303         NV_GL_LOAD_EXT( glCompressedTexSubImage3D );
    304         NV_GL_LOAD_EXT( glCompressedTexSubImage2D );
    305         NV_GL_LOAD_EXT( glCompressedTexSubImage1D );
    306         NV_GL_LOAD_EXT( glGetCompressedTexImage );
    307 
    308 /* OpenGL 1.4 non-deprecated functions */
    309         NV_GL_LOAD_EXT( glBlendFuncSeparate );
    310         NV_GL_LOAD_EXT( glMultiDrawArrays );
    311         NV_GL_LOAD_EXT( glMultiDrawElements );
    312         NV_GL_LOAD_EXT( glPointParameterf );
    313         NV_GL_LOAD_EXT( glPointParameterfv );
    314         NV_GL_LOAD_EXT( glPointParameteri );
    315         NV_GL_LOAD_EXT( glPointParameteriv );
    316 
    317 /* OpenGL 1.5 non-deprecated functions */
    318         NV_GL_LOAD_EXT( glGenQueries );
    319         NV_GL_LOAD_EXT( glDeleteQueries );
    320         NV_GL_LOAD_EXT( glIsQuery );
    321         NV_GL_LOAD_EXT( glBeginQuery );
    322         NV_GL_LOAD_EXT( glEndQuery );
    323         NV_GL_LOAD_EXT( glGetQueryiv );
    324         NV_GL_LOAD_EXT( glGetQueryObjectiv );
    325         NV_GL_LOAD_EXT( glGetQueryObjectuiv );
    326         NV_GL_LOAD_EXT( glBindBuffer );
    327         NV_GL_LOAD_EXT( glDeleteBuffers );
    328         NV_GL_LOAD_EXT( glGenBuffers );
    329         NV_GL_LOAD_EXT( glIsBuffer );
    330         NV_GL_LOAD_EXT( glBufferData );
    331         NV_GL_LOAD_EXT( glBufferSubData );
    332         NV_GL_LOAD_EXT( glGetBufferSubData );
    333         NV_GL_LOAD_EXT( glMapBuffer );
    334         NV_GL_LOAD_EXT( glUnmapBuffer );
    335         NV_GL_LOAD_EXT( glGetBufferParameteriv );
    336         NV_GL_LOAD_EXT( glGetBufferPointerv );
    337 
    338 /* OpenGL 2.0 non-deprecated functions */
    339         NV_GL_LOAD_EXT( glBlendEquationSeparate );
    340         NV_GL_LOAD_EXT( glDrawBuffers );
    341         NV_GL_LOAD_EXT( glStencilOpSeparate );
    342         NV_GL_LOAD_EXT( glStencilFuncSeparate );
    343         NV_GL_LOAD_EXT( glStencilMaskSeparate );
    344         NV_GL_LOAD_EXT( glAttachShader );
    345         NV_GL_LOAD_EXT( glBindAttribLocation );
    346         NV_GL_LOAD_EXT( glCompileShader );
    347         NV_GL_LOAD_EXT( glCreateProgram );
    348         NV_GL_LOAD_EXT( glCreateShader );
    349         NV_GL_LOAD_EXT( glDeleteProgram );
    350         NV_GL_LOAD_EXT( glDeleteShader );
    351         NV_GL_LOAD_EXT( glDetachShader );
    352         NV_GL_LOAD_EXT( glDisableVertexAttribArray );
    353         NV_GL_LOAD_EXT( glEnableVertexAttribArray );
    354         NV_GL_LOAD_EXT( glGetActiveAttrib );
    355         NV_GL_LOAD_EXT( glGetActiveUniform );
    356         NV_GL_LOAD_EXT( glGetAttachedShaders );
    357         NV_GL_LOAD_EXT( glGetAttribLocation );
    358         NV_GL_LOAD_EXT( glGetProgramiv );
    359         NV_GL_LOAD_EXT( glGetProgramInfoLog );
    360         NV_GL_LOAD_EXT( glGetShaderiv );
    361         NV_GL_LOAD_EXT( glGetShaderInfoLog );
    362         NV_GL_LOAD_EXT( glGetShaderSource );
    363         NV_GL_LOAD_EXT( glGetUniformLocation );
    364         NV_GL_LOAD_EXT( glGetUniformfv );
    365         NV_GL_LOAD_EXT( glGetUniformiv );
    366         NV_GL_LOAD_EXT( glGetVertexAttribdv );
    367         NV_GL_LOAD_EXT( glGetVertexAttribfv );
    368         NV_GL_LOAD_EXT( glGetVertexAttribiv );
    369         NV_GL_LOAD_EXT( glGetVertexAttribPointerv );
    370         NV_GL_LOAD_EXT( glIsProgram );
    371         NV_GL_LOAD_EXT( glIsShader );
    372         NV_GL_LOAD_EXT( glLinkProgram );
    373         NV_GL_LOAD_EXT( glShaderSource );
    374         NV_GL_LOAD_EXT( glUseProgram );
    375         NV_GL_LOAD_EXT( glUniform1f );
    376         NV_GL_LOAD_EXT( glUniform2f );
    377         NV_GL_LOAD_EXT( glUniform3f );
    378         NV_GL_LOAD_EXT( glUniform4f );
    379         NV_GL_LOAD_EXT( glUniform1i );
    380         NV_GL_LOAD_EXT( glUniform2i );
    381         NV_GL_LOAD_EXT( glUniform3i );
    382         NV_GL_LOAD_EXT( glUniform4i );
    383         NV_GL_LOAD_EXT( glUniform1fv );
    384         NV_GL_LOAD_EXT( glUniform2fv );
    385         NV_GL_LOAD_EXT( glUniform3fv );
    386         NV_GL_LOAD_EXT( glUniform4fv );
    387         NV_GL_LOAD_EXT( glUniform1iv );
    388         NV_GL_LOAD_EXT( glUniform2iv );
    389         NV_GL_LOAD_EXT( glUniform3iv );
    390         NV_GL_LOAD_EXT( glUniform4iv );
    391         NV_GL_LOAD_EXT( glUniformMatrix2fv );
    392         NV_GL_LOAD_EXT( glUniformMatrix3fv );
    393         NV_GL_LOAD_EXT( glUniformMatrix4fv );
    394         NV_GL_LOAD_EXT( glValidateProgram );
    395         NV_GL_LOAD_EXT( glVertexAttribPointer );
    396 
    397 /* OpenGL 2.1 non-deprecated functions */
    398         NV_GL_LOAD_EXT( glUniformMatrix2x3fv );
    399         NV_GL_LOAD_EXT( glUniformMatrix3x2fv );
    400         NV_GL_LOAD_EXT( glUniformMatrix2x4fv );
    401         NV_GL_LOAD_EXT( glUniformMatrix4x2fv );
    402         NV_GL_LOAD_EXT( glUniformMatrix3x4fv );
    403         NV_GL_LOAD_EXT( glUniformMatrix4x3fv );
     49#       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_LOAD( fname )
     50#       define NV_GL_FUN_EXT( rtype, fname, fparams ) NV_GL_LOAD_EXT( fname )
     51#       include <nv/lib/detail/gl_functions.inc>
     52#       undef NV_GL_FUN_EXT
     53#       undef NV_GL_FUN
    40454
    40555#       undef NV_GL_LOAD
Note: See TracChangeset for help on using the changeset viewer.