Changeset 167 for trunk/src/lib


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/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.