project_files/hwc/rtl/misc.h
changeset 15361 5c0479d0ed5b
parent 14159 0aeea29ef890
equal deleted inserted replaced
15354:dff37ac61dcf 15361:5c0479d0ed5b
     3 
     3 
     4 #include "pas2c.h"
     4 #include "pas2c.h"
     5 #include <assert.h>
     5 #include <assert.h>
     6 #include <stdbool.h>
     6 #include <stdbool.h>
     7 
     7 
     8 #ifdef EMSCRIPTEN
     8 #include "GL.h"
     9 #include <GL/gl.h>
       
    10 #else
       
    11 #include <GL/glew.h>
       
    12 #endif
       
    13 
     9 
    14 #define     VA_NUM_ARGS(...)                        VA_NUM_ARGS_IMPL(__VA_ARGS__, 5,4,3,2,1)
    10 #define     VA_NUM_ARGS(...)                        VA_NUM_ARGS_IMPL(__VA_ARGS__, 5,4,3,2,1)
    15 #define     VA_NUM_ARGS_IMPL(_1,_2,_3,_4,_5,N,...)  N
    11 #define     VA_NUM_ARGS_IMPL(_1,_2,_3,_4,_5,N,...)  N
    16 
    12 
    17 #define     macro_dispatcher(func, ...)             macro_dispatcher_(func, VA_NUM_ARGS(__VA_ARGS__))
    13 #define     macro_dispatcher(func, ...)             macro_dispatcher_(func, VA_NUM_ARGS(__VA_ARGS__))
    57 astring     fpcrtl_pchar2astr(const char *s);
    53 astring     fpcrtl_pchar2astr(const char *s);
    58 astring     fpcrtl_str2astr(const string255 s);
    54 astring     fpcrtl_str2astr(const string255 s);
    59 string255   fpcrtl_astr2str(const astring s);
    55 string255   fpcrtl_astr2str(const astring s);
    60 #define     fpcrtl_TypeInfo                         sizeof // dummy
    56 #define     fpcrtl_TypeInfo                         sizeof // dummy
    61 
    57 
    62 #ifdef EMSCRIPTEN
       
    63 #define     GLEW_OK                                 1
       
    64 GLenum      glewInit();
       
    65 #endif
    58 #endif
    66 
       
    67 #endif